Re: Freehand ROIs and Spline curves [message #47700] |
Thu, 23 February 2006 17:03  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Robbie writes:
> Just to clarify.
>
> I'm actually talking about a spline curve here. The problem is that I
> need to approximate a freehand ROI with a piecewise polynomial
> function. The number of control points would be an issue too. I would
> have to avoid a very complex shape tending towards an infinte number of
> control points.
I've never done this in IDL, but ArcSample might
be a place to start in choosing control points. It
resamples a closed curve in approximately equal
arc lengths.
http://www.dfanning.com/programs/arcsample.pro
It might be faster than calculating a distance then
deciding how to divide the distance up into control
spaces, etc.
Rather than using spline curves, I have written
an application that allows the user to "nudge"
a free-hand ROI with objects of various shapes.
As the object touches the line, from either the
inside or the outside, the curve takes the shape of
the object in that location. Typically, variously
sized circles are all anyone really needs to get
the line in the right position.
The code is not available, but it was very simple.
Just creative use of pixmaps, like everything else. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|