Login  Register

Re: array of ROIs

Posted by Tony De Vivo on Jul 20, 2006; 1:17pm
URL: http://imagej.273.s1.nabble.com/Re-array-of-ROIs-tp3702070p3702071.html

Johannes Schindelin wrote
Hi,

On Tue, 18 Jul 2006, ytsejam11 wrote:

> i'm writing a plug-in that needs to paint different ROIs for each slice.
> How can i save every ROI and show it only when i'm in the right slice?

You need to listen to changes of StackWindow's sliceSelector (see attached
plugin for a proof of concept).

HOWEVER, most likely you want more: If you _fill_ the Roi, it only fills
in the current window, _not_ on the whole stack. You have to reimplement
this functionality (either as macro, or as plugin).
Thanks for this very useful code for adding a listener to the slice selector.
now i explain my goal:

i have a stack of slices;
a method has to create a polygonal roi for each slice.
Obviously, I have to be able to move through slices and for each slice I have to obtain the relative roi.
Now the question is:
How can I store the roi? Can I use an array roi[]??