Re: setSlice and composite pb
Posted by Wayne Rasband on Apr 03, 2009; 2:04pm
URL: http://imagej.273.s1.nabble.com/setSlice-and-composite-pb-tp3693106p3693107.html
> In a macro I had a line that would access a given slice in hyperstack
> presented as composite stack (4 channels and 8 z) using setSlice. I
> wanted
> to do the same in a plug-in and it failed. As long as the channel
> dimension is present, ij.SetSlice do nothing. (no errors , it just
> doesn't
> move from slice 1) If I reduce the dimension to z only then it work.
Use
imp.setPosition(imp.getChannel(), slice, imp.getFrame());
in a plugin or script to select a given slice in a hyperstack. In a
macro, use
Stack.setSlice(slice);
-wayne