Extracting ROI without IDL objects is it possible [message #37731] |
Thu, 22 January 2004 08:11  |
Nuno Oliveira
Messages: 75 Registered: October 2003
|
Member |
|
|
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.
|
|
|
Re: Extracting ROI without IDL objects is it possible [message #37803 is a reply to message #37731] |
Sat, 24 January 2004 09:56  |
justspam03
Messages: 36 Registered: October 2003
|
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.
[house advertising on]
if you're willing to use object graphics and objects, but don't want to
dig too deep into that, maybe check
http://www.jubileum.lu.se/MR_Physics/software.htm
Example program 6 does pretty much exactly what you want, incl. a primitive
ROI evaluation which you could use as template for your own.
[house advertising off]
Cheers
Oliver
|
|
|
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
|
|
|