[vtkusers] Dilation of a vtkPolyData

Dominik Szczerba dominik at itis.ethz.ch
Sun Apr 26 08:18:50 EDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You might get acceptable results with just scaling, I am not sure.
In general the way to go is: make a distance transform (easiest onto a
Cartesian grid), offset the resulting level set function (with the
Calculator filter etc.), contour to get a new surface. This treatment
may, however, in general result in self intersecting new surface.
Third idea is to use a mechanical simulation with initial strain. You
just need to constrain one internal point and the rest will grow
uniformly. You will get a displacement field that you feed into the Warp
filter, manipulating the scale to achieve the desired offset.

- - Dominik

David Doria wrote:
> On Sun, Apr 26, 2009 at 6:16 AM, Maxime Taquet <hystomagna at gmail.com
> <mailto: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
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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


- --
Dominik Szczerba, PhD
Computational Physics Group
IT'IS Foundation for Research
www.itis.ethz.ch
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkn0USoACgkQ/EBMh9bUuzJR9QCfYc+CkggFHllG66kpD9cN4DEm
4psAn35MaK4PmwIRU4q97QlQlvlmJNV5
=kiDm
-----END PGP SIGNATURE-----



More information about the vtkusers mailing list