Stack.setChannel works inconsistently?

Posted by TimFeinstein on
URL: http://imagej.273.s1.nabble.com/Stack-setChannel-works-inconsistently-tp5017161.html

Hi folks,

Here is a large macro that I am working on which is a bit of a stretch for my skills, but it seems to be pretty close.  I am specifically pinging the board about the Stack.SetChannel() command, which only seems to work once.  The first time I use Stack.setChannel() it correctly selects stain#2 ("GPR161Channel") for thresholding.  However the next time when I want it to duplicate stain#1 ("ciliaChannel") for analysis in a smaller window it just copies stain#2 again.  This is line 59 in the macro.  I don't see why Stack.setChannel() should work the first time and not the second.

I am also working out how to correctly call up point ROIs from the ROI manager one at a time for making rectangles (lines 62 and 68) but that looks more like I need to keep learning the syntax of working with arrays.  The select channels problem feels like it might be a bug.

Here is a link to the macro and an example image:

https://www.dropbox.com/sh/gh0zkznpsrkalfi/AAAL_gqTXoKCTbjGegpN2AjNa?dl=0

Thanks!


Tim

Timothy Feinstein, Ph.D.
Research Scientist
University of Pittsburgh Department of Developmental Biology


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