How to record manually entered values in Fiji macro?

Hey there,

I’m using a macro to process all my .czi files in a folder for image presentation (z-project, adjust brightness/contrast, merging channels and so forth). Since the images vary quite strongly, I need to manually adjust the brightness/contrast values for each image and channel. I do so using the following code:

run(“Brightness/Contrast…”);
waitForUser( “Set threshold and click OK.” );

Now my question is: Is there any way to record the values that I enter (manually) in the Brightness/Contrast pop-up?

Thanks for your help,
Karen

Hi @Karen,

Welcome to the forum.

Once you’ve clicked okay you can use

getMinAndMax(min, max);

To get the min and max settings you have set and either print them or save them to an array.

3 Likes

Hi @lmurphy,

works like a charm. Thanks a lot! :slight_smile:

Karen

1 Like