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

Home » Public Forums » archive » Average outline of several contours
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: Average outline of several contours [message #37114 is a reply to message #37021] Fri, 21 November 2003 07:14 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <f40e34db.0311202122.37499b6@posting.google.com>,
Beat.Schmutz@flinders.edu.au (Beat Schmutz) wrote:

> I have combined 8 contours of bone cross-sections into one image
> (individual ROIs in a IDLgrROIGroup). Now I like to determine the
> path/outline which represents the average of these 8 contours. Is
> anyone aware of a program/code/method that enables me to achieve this?
> Any help would be greatly appreciated.
>
> Beat Schmutz

Assuming the contours are roughly circular, you could do this:

Compute the centroid (average position) of all the points in all the
contours.

Transform the contours to polar coordinates centered on the centroid.

Interpolate each contour to regularly spaced points in theta.

Average the radial values of the contours at each regular theta.

Transform back to Cartesion coordinates, if necessary.

The only tricky thing I see is doing the interpolation in theta across
the "seam" (where theta equals both 0 and 2 pi). That should be easy to
fix by rotating the coordinates by pi for points near the seam.

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: modifying itools (ivolume)
Next Topic: Re: creating elliptically shaped images

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

Current Time: Fri Oct 10 17:56:53 PDT 2025

Total time taken to generate the page: 0.24107 seconds