Login  Register

Re: JACOP - macro - changing thresholds

Posted by Jacqueline Ross on Oct 15, 2017; 9:02pm
URL: http://imagej.273.s1.nabble.com/JACOP-macro-changing-thresholds-tp5019529p5019533.html

Hi Gabriel,

Thanks for your reply. Thanks also to Volko who replied and has suggested a similar approach.

The problem is that the JACOP plugin has its own automatic threshold built-in so I can't run the command separately.

What I thought might work is to ask the JACOP window to close and then re-open for each image. However, I don't know how to do that and the macro code includes specific values for each image threshold. If I can determine values for all of the images, then it's OK because I just populate with that but it would be nice if I could have the automatic threshold applied. The upper limit is easy but it's the lower limit that I want the macro to automatically populate.

This is the relevant line of code.

run("JACoP ", "imga=[C1] imgb=[C3] thra=2591 thrb=912 pearson mm");

Cheers,

Jacqui

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gabriel Landini
Sent: Friday, 13 October 2017 9:11 p.m.
To: [hidden email]
Subject: Re: JACOP - macro - changing thresholds

On Friday, 13 October 2017 02:51:22 BST [hidden email] wrote:
> Does anyone know if it's possible to add something into the macro that
> does a "refresh" of the threshold step so that each new image has a
> new automatic threshold set?
>
> I also thought of a "Wait for user" step so that the values could be
> changed as the macro progresses but that doesn't seem possible either.

Hi Jacqui,

Would this work:

selectImage(Your_image);
setAutoThreshold("Default");

(or any other AutoThresh method)?
Sorry if I misunderstood the question?

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html