Login  Register

getting the number of slices and divide it by a constant

Posted by dbrito10 on May 18, 2010; 2:52pm
URL: http://imagej.273.s1.nabble.com/getting-the-number-of-slices-and-divide-it-by-a-constant-tp3688278.html

I created a macro to process z-stacks of 3 fluorescence channels into RGB images. It includes using the GroupedZ Projector plugin, where you have to write the number of images per group. Because all my z-tacks have a different number of images, I would like for this macro to calculate this value automatically. I've tried using nSlices and variants to get the number of slices, but without luck. Check below:


run("Grouped ZProjector", "group=41 projection=[Max Intensity]");


In this line, instead of group=41 (this was the case where the z-stack had 123 slices, so each channel had 123:3=41) I would like for the macro to get the number of slices and divide it by 3, so that I don't have to write it everytime.

Any ideas?

Thank you in advance