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

Home » Public Forums » archive » Calculate maximum diameter?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Calculate maximum diameter? [message #47366 is a reply to message #47300] Mon, 06 February 2006 15:17 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Jeff N. wrote:
> Yep, it does need to go through the center. I may end up using a
> fitted ellipse as a starting point, so we'll just see what works best.
> Thanks for the ideas!

How do you define the center of your "roughly circular" ROI's? Geometric centroid? Does
this have to correspond to a discrete ROI pixel? And how do you define diameter? From one
ROI pixel through the "center" to another ROI pixel? Or can the centroid and the opposite
side pixel be non-discrete? Depending on how "big" a pixel is compared to your length
units, maybe it doesn't matter (e.g. if a length unit was a pixel)

After computing your centroid, why can't you just rotate through 180deg. from one ROI
pixel to the next, construct a line from your current pixel through your centroid and
determine where it intersects your ROI on the other side? It seems a bit ham-fisted maybe,
but it doesn't rely on any particular definition of "roughly circular."

I'm curious as to why you need the maximum diameter of your ROI's. If you have a lot of
them, usually a particular orientation is chosen -- with a common defined axis of symmetry
assumed to be random with respect to that orientation -- and the dimension of your ROI's
along that orientation is used (e.g. to compute statistics on particle sizes).

paulv


>
> Jeff
>
>
> kuyper@wizard.net wrote:
>
>> Jeff N. wrote:
>>
>>> Hi folks,
>>>
>>> I have a set of roughly circular ROI's for which I want to compute the
>>> maximum diameter - the longest straight line from one point on the
>>> boundary of the ROI, through the center, to the opposing boundary.
>>
>> Is it essential that it go through the center? In many contexts its
>> more useful to know the length of the longest straight line from any
>> given vertex to any other vertex. There's a pretty obvious O(N^2)
>> algorithm for finding that maximun distance.
>
>


--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Slowdown when creating/destroying Object Graphics components
Next Topic: projection info (.prj file) from ESRI Shape

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

Current Time: Sat Oct 11 08:58:52 PDT 2025

Total time taken to generate the page: 1.01035 seconds