Re: array of ROIs

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

Re: array of ROIs

dscho
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).

Hth,
Dscho

ROI_3D.java (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: array of ROIs

Tony De Vivo
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[]??
Reply | Threaded
Open this post in threaded view
|

Re: array of ROIs

dscho
Hi,

On Thu, 20 Jul 2006, Tony De Vivo wrote:

> 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[]??

There is not yet any code for this in ImageJ. So, if you want to store it,
add a function to the plugin. Likewise for loading. If you make these
functions static (detecting dynamically if IJ.getImage().getWindow() is an
instance of the custom StackWindow, and erroring out if not), you can call
them via a macro.

Hth,
Dscho