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

Home » Public Forums » archive » Re: Finding boundary and using plots
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: Finding boundary and using plots [message #37952] Fri, 06 February 2004 06:21
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nuno Oliveira writes:

> I'm doing little tests in here. And this doesn't bother you because if you
> have your own ROI tool, and probably you prevent this in other place. But if
> you call your find boundary with two regions that are not connected it will
> only return one of them.

Yes, exactly. FIND_BOUNDARY was developed as a method
for getting quantitative information about "blobs".
(And because I got a strange and inexplicable
fascination with chain-code algorithms one morning.)
If you have more than one blob, use LABEL_REGION
to identify them and process them one by one. I think
this is explained in the documentation for FIND_BOUNDARY.
(If not, it will be, since you are not the first to ask
about this.)

> Referring to my question yesterday, and while and I'm still using cw_defroi,
> the only solution indeed to return not only an array but as many arrays as
> the regions not connected. It means more pointers but I think that's the
> only solution to non-contiguous regions. Then I use PLOTS individually for
> each region.

Sounds like a winner to me. :-)

Cheers,

David

P.S. You are checking to be sure you are not
leaking memory, right?

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Finding boundary and using plots [message #37953 is a reply to message #37952] Fri, 06 February 2004 04:01 Go to previous message
Nuno Oliveira is currently offline  Nuno Oliveira
Messages: 75
Registered: October 2003
Member
I'm doing little tests in here. And this doesn't bother you because if you
have your own ROI tool, and probably you prevent this in other place. But if
you call your find boundary with two regions that are not connected it will
only return one of them.



Referring to my question yesterday, and while and I'm still using cw_defroi,
the only solution indeed to return not only an array but as many arrays as
the regions not connected. It means more pointers but I think that's the
only solution to non-contiguous regions. Then I use PLOTS individually for
each region.



Cheers,





Nuno.
Re: Finding boundary and using plots [message #37960 is a reply to message #37953] Thu, 05 February 2004 08:53 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nuno Oliveira writes:

> I have a little problem in here. I'm (still) dealing with ROIs) .

Not still using CW_DEFROI, I hope. :-(

> The case is that making the roi with cw_defroi, then I want to visualize it
> in a window over the image.

Oh, my gosh!

> I get the points of the boundary, with my own
> function that returns the boundary points. Everything was okay while when
> the rois where rectangular or circles (besides the fact that has more points
> than Fanning's boundary because of diagonals I presume).
>
> But when the roi is a polygon I get a strange thing. After the boundary has
> been displayed there lines connecting the peaks, particularly when the angle
> is little.
>
> I made a helping tool, that gives the mask of the boundary and surprise if
> has not those lines! So I thought I would be from plot command, but when I
> used Fanning's boundary the strange lines were not there!
>
> Someone experienced something like this?

Oh, we've experienced everything, pretty much. :-(

Hard to say what is going on here without seeing the code,
but I'm pretty sure this will turn out to be an ordering
problem (no, this doesn't surprise me, given what CW_ROI
was designed to do). One thing we know for sure, Fanning's
boundary is ORDERED! (Probably the result of experience,
tempered with great frustration, no doubt.)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: using icontour multiple times
Next Topic: Mathematical manipulations

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

Current Time: Wed Oct 08 19:23:16 PDT 2025

Total time taken to generate the page: 0.00547 seconds