Re: Using Objects-Urgent (To David et al) [message #41470] |
Thu, 28 October 2004 00:41 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Pravesh writes:
> U have got it right. I have read the documentation carefully. Let me
> explain it fully. Using region grow, i have obtained a vector of
> indices (1-d). Now, suppose image is my image array. i have to compute
> the geometric area of the roi whose indices are the returned array.
One way to calculate the area of the ROI is to multiply
the number of elements in your vector by the area of
a single image pixel. The "geometric" area is sometimes
a bit smaller than this, but there are at least two
or three different algorithms that are used to calculate
it. Each of these gives a different number.
In the cases I am familiar with, it is not the absolute
area I am interested in. Rather, I care about relative
areas, since I am comparing one area to another. The
method above is preferred for this sort of analysis,
since it is extremely fast.
If you have to have perimeters of the outside, and holes
inside, etc., then you have to take your indices and
contour them. Use the CONTOUR command, for example,
and save the path information in PATH_INFO and PATH_XY
keywords. These will give you boundary points that you
can feed into an IDLanROI object. Then you can use the
ComputeGeometry method of that object to obtain parameters
of interest.
> i also know oroi = obj_new('idlanroi', some array]
> let me know what the some array will be in the above scenario. it has
> to be a 2-d or 3-d array.
The documentation may be misleading you. It will be
a 2xN array, if you have XY pairs of points describing
an ROI in 2D. It will be a 3xN array of points if you
have XYZ points describing an ROI in 3D.
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: Using Objects-Urgent (To David et al) [message #41472 is a reply to message #41470] |
Wed, 27 October 2004 21:34  |
praveshsubramanian
Messages: 15 Registered: September 2004
|
Junior Member |
|
|
Hello Mr.Mark:
Sorry for that annoying mail.
U have got it right. I have read the documentation carefully. Let me
explain it fully. Using region grow, i have obtained a vector of
indices (1-d). Now, suppose image is my image array. i have to compute
the geometric area of the roi whose indices are the returned array.
i also know oroi = obj_new('idlanroi', some array]
let me know what the some array will be in the above scenario. it has
to be a 2-d or 3-d array.
thanks
pravesh
Mark Hadfield <m.hadfield@niwa.co.nz> wrote in message news:<clp2sm$vsm$1@newsreader.mailgate.org>...
> Pravesh wrote:
>> David et al:
>> Please let me know how do i solve the finding area of ROI using
>> objects. i have the roi with me. u said i should feed it to contour
>> proc, isnt it?
>>
>> Please let me know details.
>
> Calm down.
>
> If your problem really is that urgent, then I suggest you get out your
> cheque book and contact an IDL consultant (like David Fanning, but there
> are others) and offer him/her a large amount of money to get his/her
> attention.
>
> Failing that, you must accept that people who follow this newsgroup can
> be very helpful, for free, but *in their own time* and they prefer to
> see evidence that the person they are helping has made some effort to
> help him/herself.
>
> Now, please take the time to explain carefully what you are trying to
> do, what you have done so far, what problems you have encountered and
> exactly what you want help with.
>
> What does "I have the ROI with me" mean? Have you read the IDL
> documentation for the IDLanROI class? Do you understand how to create an
> IDLanROI object given a list of vertices? And then to use the
> ComputeGeometry method to calculate various geometric parameters,
> including area? Do you want some example code that uses this?
|
|
|
Re: Using Objects-Urgent (To David et al) [message #41480 is a reply to message #41472] |
Wed, 27 October 2004 14:10  |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
Pravesh wrote:
> David et al:
> Please let me know how do i solve the finding area of ROI using
> objects. i have the roi with me. u said i should feed it to contour
> proc, isnt it?
>
> Please let me know details.
Calm down.
If your problem really is that urgent, then I suggest you get out your
cheque book and contact an IDL consultant (like David Fanning, but there
are others) and offer him/her a large amount of money to get his/her
attention.
Failing that, you must accept that people who follow this newsgroup can
be very helpful, for free, but *in their own time* and they prefer to
see evidence that the person they are helping has made some effort to
help him/herself.
Now, please take the time to explain carefully what you are trying to
do, what you have done so far, what problems you have encountered and
exactly what you want help with.
What does "I have the ROI with me" mean? Have you read the IDL
documentation for the IDLanROI class? Do you understand how to create an
IDLanROI object given a list of vertices? And then to use the
ComputeGeometry method to calculate various geometric parameters,
including area? Do you want some example code that uses this?
--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
|
|
|