Setting the slice of an ROI

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting the slice of an ROI

Jonathan Jackson-2
Dear List,

This is a question about using ROI's on an image stack in a macro.

I would like to take an ROI that was created on slice 1 and change / update
/ duplicate it so that I have the same ROI but linked to a different slice.
Starting with an ROI in the ROI Manager, on slice 1 of a 4 slice stack, I
ran this code

roiManager("Select", 0);
setSlice(3);
roiManager("Add");

but the new ROI was also attached to slice 1.  Can anyone suggest a way to
change the ROI's slice?

Thanks,
Jon
Reply | Threaded
Open this post in threaded view
|

Re: Setting the slice of an ROI

Wayne Rasband
> This is a question about using ROI's on an image stack in a macro.
>
> I would like to take an ROI that was created on slice 1 and change /
> update / duplicate it so that I have the same ROI but linked to a
> different slice. Starting with an ROI in the ROI Manager, on slice
> 1 of a 4 slice stack, I ran this code
>
> roiManager("Select", 0);
> setSlice(3);
> roiManager("Add");
>
> but the new ROI was also attached to slice 1.  Can anyone
> suggest a way to change the ROI's slice?

This is a bug that will be fixed in ImageJ 1.37b.

-wayne