comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Image and ROI Help
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Image and ROI Help [message #50950] Fri, 27 October 2006 07:28 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jimoid writes:

> My next stage is how to use the ROI data to select the region of the
> image. As I see it there are two possibilities:
>
> (i) a graphical approach where I turn the ROI data into a polygon and
> use it mask the image, or
> (ii) a computaional approach where I take the image data values and use
> the ROI coordiante data to calculate the image ROI information I need.
>
> My feeling is that the second approach would be better as it is more
> direct; the first approach uses an extra graphical step to arrive at
> the same result. What do others think?
>
> My second question is can anyone suggest methods for the second
> (computational) approach? I have been thinking that I could create an
> array filled with zeros the same size as my image, and use the ROI data
> to create an area within the array filled with ones and then multiply
> the two arrays. I am sure there must be better methods however.

I think I would put the ROI into an IDLanROI object,
and then just about everything you wanted to do with
an ROI would be sitting there in front of you. -)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Image and ROI Help [message #50951 is a reply to message #50950] Fri, 27 October 2006 07:27 Go to previous messageGo to next message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Jimoid wrote:
> I am a novice at IDL and would like some help please. I am working with
> dicom files and extracting the image contained within and the ROI data.
> The ROI data is not straight forward and I have to manipulate it a
> little to get it into coordinate pairs.
>
> My next stage is how to use the ROI data to select the region of the
> image. As I see it there are two possibilities:
>
> (i) a graphical approach where I turn the ROI data into a polygon and
> use it mask the image, or
> (ii) a computaional approach where I take the image data values and use
> the ROI coordiante data to calculate the image ROI information I need.
>
> My feeling is that the second approach would be better as it is more
> direct; the first approach uses an extra graphical step to arrive at
> the same result. What do others think?
>
> My second question is can anyone suggest methods for the second
> (computational) approach? I have been thinking that I could create an
> array filled with zeros the same size as my image, and use the ROI data
> to create an area within the array filled with ones and then multiply
> the two arrays. I am sure there must be better methods however.

Have you looked at IDLanROI::ComputeMask()?
Re: Image and ROI Help [message #51126 is a reply to message #50950] Sat, 28 October 2006 08:33 Go to previous message
Jimoid is currently offline  Jimoid
Messages: 3
Registered: October 2006
Junior Member
Thanks David and James, I'll try the IDLanROI approach.

Jimmy

On Oct 27, 3:28 pm, David Fanning <n...@dfanning.com> wrote:
> Jimoid writes:
>> My next stage is how to use the ROI data to select the region of the
>> image. As I see it there are two possibilities:
>
>> (i) a graphical approach where I turn the ROI data into a polygon and
>> use it mask the image, or
>> (ii) a computaional approach where I take the image data values and use
>> the ROI coordiante data to calculate the image ROI information I need.
>
>> My feeling is that the second approach would be better as it is more
>> direct; the first approach uses an extra graphical step to arrive at
>> the same result. What do others think?
>
>> My second question is can anyone suggest methods for the second
>> (computational) approach? I have been thinking that I could create an
>> array filled with zeros the same size as my image, and use the ROI data
>> to create an area within the array filled with ones and then multiply
>> the two arrays. I am sure there must be better methods however.I think I would put the ROI into an IDLanROI object,
> and then just about everything you wanted to do with
> an ROI would be sitting there in front of you. -)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: function signature
Next Topic: Re: Title in iPlot

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:35:31 PDT 2025

Total time taken to generate the page: 0.00610 seconds