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

Home » Public Forums » archive » Re: Catch the area outside a contour
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: Catch the area outside a contour [message #44099] Sat, 21 May 2005 06:33 Go to next message
Chris Lee is currently offline  Chris Lee
Messages: 101
Registered: August 2003
Senior Member
James wrote:
> Hi Folks !
>
> Can anyone help me with the following problem. For example, there is an
> area
> of the image withing some contour level. How to determine and get
> parameters for a region otside that contour level withing the next N
> pixels ?
> Is there any IDL procedure/function for that ?
>
> Thanks in advance,
> James

You can get the X/Y coordinates of a contour levels with the PATH_INFO
keyword (and a few others). If you then want a fixed area outside this
you need to either

1. Use an IDL built in function (whose name I can't remember) which
'expands' an area by a fixed amount (then subtract the original)

or.

2. Draw the new path yourself. This would involve something like finding
the local normal at each point along the path. Calculate the path length
of the contour, expand along the the local normal to get the desired area.

Chris.
Re: Catch the area outside a contour [message #44100 is a reply to message #44099] Sat, 21 May 2005 00:36 Go to previous messageGo to next message
Adam[1] is currently offline  Adam[1]
Messages: 2
Registered: May 2005
Junior Member
I'm sorry, I don't seem to understand the problem. Are you trying to
extract how many pixels are outside a given contour level? And by
"Fixed Size" do you mean that you want every pixel to represent the
same value of area? I may be able to help with some elaboration on the
topic.
Re: Catch the area outside a contour [message #44112 is a reply to message #44100] Fri, 20 May 2005 07:16 Go to previous messageGo to next message
James[1] is currently offline  James[1]
Messages: 9
Registered: August 2004
Junior Member
> contourLevel = .5
> outside = where(array LT contourLevel)
>
> here "outside" will hold an index for every pixel that is below the
> contour level.

Thanks for the answer, but this is not exactly what is needed. The point
is to get a *fixed size* area outside the contour in pixels, but not
in units of contour levels.

Imagine, there is a smooth image and I'm going to extract some region
oustide the contour. Since the gradient is negligible, operating with s
contour
level you can give a region of 1000.. pixels wide (depends on the
gradient) ...

James
Re: Catch the area outside a contour [message #44115 is a reply to message #44112] Fri, 20 May 2005 07:08 Go to previous messageGo to next message
Adam[1] is currently offline  Adam[1]
Messages: 2
Registered: May 2005
Junior Member
Im not sure this is what you are asking for but if you want all
elements that are below or above the contour then you can use the
function where().

;array is the array containing your contour data.
;contourLevel = the value of the contour line you are interested in.

contourLevel = .5
outside = where(array LT contourLevel)

here "outside" will hold an index for every pixel that is below the
contour level.
Re: Catch the area outside a contour [message #44190 is a reply to message #44100] Mon, 23 May 2005 04:20 Go to previous message
James[1] is currently offline  James[1]
Messages: 9
Registered: August 2004
Junior Member
> I'm sorry, I don't seem to understand the problem. Are you trying to
> extract how many pixels are outside a given contour level? And by
> "Fixed Size" do you mean that you want every pixel to represent the
> same value of area? I may be able to help with some elaboration on the
> topic.

Chris Lee gave the right idea ! The question now, what is the name
of that function, which allows one to expand the area ... Anybody
can help with that ? I'm trying to find someting in IDL's help, but
still without a success
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: converting floats to doubles
Next Topic: GUI strategy advice needed

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

Current Time: Wed Oct 08 11:41:50 PDT 2025

Total time taken to generate the page: 0.00609 seconds