Re: Extracting ROI without IDL objects is it possible [message #37813 is a reply to message #37731] |
Fri, 23 January 2004 06:35  |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
Nuno Oliveira wrote:
> I'm having a little trouble with extracting ROI with IDL. I'm trying to make
> a little application for temporary use while I don't learn how to manage
> IDLanROI objects.
>
>
>
> Suppose I have a variable image from I want to extract the ROI and that I've
> defined a draw with widget_draw function. Then I make:
>
>
>
> ROI=cw_defroi(draw) ;and here I draw my region of interest
>
> How can I visualize my region of interest
>
> I can define a second image, per example image2=FLTARR(xdim, ydim)
>
> And make image2=image(ROI) and do TV, image2 and I see only my roi but I
> want to see both, i. e., the roi over the image, perhaps with another colour
>
>
> (cw_defroi does it in part, but I want save those roi indeces and calling
> back in the future and also apply from the window that defines the roi to
> others)
>
> It would help another thing, get the boarders of the roi, and make it red,
> blue, white.
>
>
>
> Cheers,
>
>
>
> N.
>
>
Hello,
I'm sure your aversion to object graphics is well founded (although it's
a hurdle *well* worth clearing sometime - you won't have any regrets.)
However, there is a built-in package for drawing ROIs on an image in
XROI. You can get the region information out as an IDLgrROI (don't
worry!) from which you can get the ROI vertices. Then you can destroy
the object if you don't want it, but you will still have the information
you want. XROI can be called as part of a larger widget application or
as a stand-alone called from the command line.
Cheers,
Ben
|
|
|