Adding "apply to stack" step to macro for image multiplication

fiji
imagej

#1

Hi all,

I am currently writing a macro and I need to add a step where I multiply every image in a stack by another image. When I do this step manually after I do Image Calculator image1 multiply by image2 I get a pop up window asking if I want to apply this action to the whole stack and I say yes. As a result of this function I get a new stack where all the images in the original stack were multiplied by image 2. However, that pop up window step is not recorded in the macro and I was wondering if there is a way to add the apply to whole stack option to the script because as of now I am just getting one of the slices of my stack multiplied by image2.

Thanks for your help!


#2

Good day,

it records for me:

imageCalculator("Multiply create 32-bit stack", "Untitled","Untitled-1");

If you don’t want the operation for the whole stack the word “stack” is missing:

imageCalculator("Multiply create 32-bit", "Untitled","Untitled-1");

HTH

Herbie