Cutting the ROI of an IP

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

Cutting the ROI of an IP

Mohamed Tleis
Dear List members,

I would like to ask you how can I get the ROI of an ImageProcessor; Into a
separate ImageProcessor to do my measurements on that new IP.
I want to do that in Java.
I would appreciate any tutorials or example on this issure.

Best Regards,
Mohamed Tleis
Reply | Threaded
Open this post in threaded view
|

Re: Cutting the ROI of an IP

Mohamed Tleis
Thank you Wayne, the setRoi(roi) mehtod worked fine for me. But now I came
into another problem.
I am doing a measurement for all instances of a RoiManager as follows:
manager.runCommand("Measure");

Now I want to do the measurement for each instance alone, Is there a way to
loop through all instances of RoiManager?

Best Regards,
Mohamed Tleis

On Wed, Feb 22, 2012 at 2:58 PM, Rasband, Wayne (NIH/NIMH) [E] <
[hidden email]> wrote:

> On Feb 22, 2012, at 6:35 AM, Mohammed Tlais wrote:
>
> > Dear List members,
> >
> > I would like to ask you how can I get the ROI of an ImageProcessor; Into
> a
> > separate ImageProcessor to do my measurements on that new IP.
> > I want to do that in Java.
> > I would appreciate any tutorials or example on this issure.
>
> Dear Mohammed ,
>
> For rectangular ROIs, you can use the getRoi() method of the
> ImageProcessor class. For non-rectangular ROIs, I would get the ROI from
> the associated ImagePlus and apply it to the separate ImageProcessor using
> the setRoi(Roi) method.
>
> Best regards,
>
> -wayne
>
>