[vtkusers] Interpolation between two contours
David Gobbi
david.gobbi at gmail.com
Sun Jun 26 01:28:56 EDT 2011
Hi Markus,
Converting the contours to binary images as part of your solution will
really increase the computational cost, so I would suggest not taking
that approach.
You should try parameterizing the contours with splines (two splines
per contour, one for x vs. t and one for y vs. t, where t is the
parameter). The parameter can either be the fractional distance
around the contour, or it can be an angle using the center of the
contour as a reference point. Then, to interpolate, do a for-loop
where you take small steps in t (the parameter value) and compute
the (x,y) points for each of the two contours. Interpolate between
these (x,y) points to create your interpolated contour.
- David
On Sat, Jun 25, 2011 at 7:46 PM, Markus <vishapxtreme at googlemail.com> wrote:
> Hi all,
>
> I am pretty new to the VTK and I got the assignment to interpolate between
> two contours. What I have done so far is converting the contours to an
> binary image (area inside 0, outside 1) and computed an
> vtkEuclideanDistance.
>
> The missing step is the interpolation between contour one and two, of which
> I both have a binary image and a distance map computed, but I am missing the
> final step to the interpolation.
>
> I took a look at vtkTemporalDataSet, but I am stuck how to use it.
> vtkTemporalInterpolator seems to be a good match for what I want to do (I
> want to be able to set the number of frames in between the images and then
> get the interpolated image for frame x), but I did not understand how to use
> those for my purpose from the examples at
> http://www.vtk.org/Wiki/VTK/Time_Support
>
> I would appreciate your help on how to solve this,
> thanks
>
> Markus
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list