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

Home » Public Forums » archive » Re: Important! Regarding Objects
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: Important! Regarding Objects [message #41350] Wed, 27 October 2004 01:33
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Pravesh writes:

> Thanks for that response, david.
> Though i have a feeling that find_boundary will not work for regions
> with holes.

No, for that you would need something like CONTOUR,
or ISOCONTOUR, if you can figure out how it works, I
can't.

> Can u tell me how to go about using objects! keeping in mind the
> scenario i put in front of u in the last mail!
> using objects seems much simpler. please tell me asap.

When I work with blobs (the technical term for these
kind of things, after an hour or so they become known
as the damn blobs, but that's another story) I usually
put them in a fresh 2D array of the same size of the
image. Set all the pixel values to 255. Then I contour
the thing with a value of, say, 128. I use PATH_INFO
and PATH_XY to get the contours. I pull each contour
out (holes, etc., too) and use these as input to an
IDLanROI object. I use the various methods of the
object (ComputeGeometry, etc.) to gather the information
I need.

But, this *never* goes smoothly. There are *always*
problems, sometimes lots of them. You have to be agile
and nimble on your feet. It can be done, but probably
not under the time pressure you are apparently feeling.
At least *I* wouldn't be able to do it under pressure.
It requires too much concentration.

Just remember Erosion and Dilation are your friends. :-)

Cheers,

David


--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
Re: Important! Regarding Objects [message #41353 is a reply to message #41350] Tue, 26 October 2004 20:22 Go to previous message
praveshsubramanian is currently offline  praveshsubramanian
Messages: 15
Registered: September 2004
Junior Member
Thanks for that response, david.
Though i have a feeling that find_boundary will not work for regions
with holes.
Can u tell me how to go about using objects! keeping in mind the
scenario i put in front of u in the last mail!
using objects seems much simpler. please tell me asap.

Thanks
PRavesh


David Fanning <david@dfanning.com> wrote in message news:<MPG.1be8778b1109eab49896be@news.frii.com>...
> Pravesh writes:
>
>> now, i want to get the geometric area and perimeter of this region.
>> How is it possible?
>
> You could try Find_Boundary:
>
> http://www.dfanning.com/ip_tips/boundary.html
>
>> Moreover, is it
>> necessary to use objects?
>
> It is not "necessary", although it is often convenient.
>
>> In that case, I am not able to initialize
>> objects as it says that params x and y supplied to obj_new should have
>> (2,n) or (3,n) dimensions. now, assuming image is the original image
>> array and newroipixels are the locations of my roi in image. how do
>> get the geom. area of my roi?
>
> You could contour it, and use the contours as the
> input to an IDLanROI object.
>
>> Also, is it possible to output data from a program to another window.
>
> Not with the GUI Builder, probably. :-(
>
> Cheers,
>
> David
>
> P.S. Just open another window from your event handler
> and dump the data into it.
Re: Important! Regarding Objects [message #41356 is a reply to message #41353] Tue, 26 October 2004 15:03 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Pravesh writes:

> now, i want to get the geometric area and perimeter of this region.
> How is it possible?

You could try Find_Boundary:

http://www.dfanning.com/ip_tips/boundary.html

> Moreover, is it
> necessary to use objects?

It is not "necessary", although it is often convenient.

> In that case, I am not able to initialize
> objects as it says that params x and y supplied to obj_new should have
> (2,n) or (3,n) dimensions. now, assuming image is the original image
> array and newroipixels are the locations of my roi in image. how do
> get the geom. area of my roi?

You could contour it, and use the contours as the
input to an IDLanROI object.

> Also, is it possible to output data from a program to another window.

Not with the GUI Builder, probably. :-(

Cheers,

David

P.S. Just open another window from your event handler
and dump the data into it.

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: GUI Programming in IDL
Next Topic: Using Objects-Urgent (To David et al)

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

Current Time: Fri Nov 28 09:42:55 PST 2025

Total time taken to generate the page: 0.03175 seconds