[vtkusers] Dilation of a vtkPolyData
David Doria
daviddoria at gmail.com
Sun Apr 26 07:54:03 EDT 2009
On Sun, Apr 26, 2009 at 6:16 AM, Maxime Taquet <hystomagna at gmail.com>wrote:
> Dear all,
>
> I have a vtkPolyData object which represents the surface of a bone. I would
> like to enlarge this surface of 1mm in all directions. This can be seen as
> the new surface of a dilated version of the bone.
>
> Do you know any easy way to compute it?
>
> Best,
>
> Maxime
> _______________________________________________
>
Maybe you could just scale the polydata using
#include <vtkTransformPolyDataFilter.h>
vtkSmartPointer<vtkTransformPolyDataFilter> TransFilter =
vtkSmartPointer<vtkTransformPolyDataFilter>::New();
TransFilter->SetInput(YourPolydata);
TransFilter->SetTransform(ScaleTransform); //use vtkTransform (or maybe
vtkLinearTransform)
TransFilter->Update();
vtkPolyData* ScaledPolydata = TransFilter->GetOutput();
I think you'd have to center the data, scale it, and then move it back to
the original location. You'd have to figure out what % to scale to achieve
the 1mm goal.
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090426/8dbee690/attachment.htm>
More information about the vtkusers
mailing list