<div class="gmail_quote">On Sun, Apr 26, 2009 at 6:16 AM, Maxime Taquet <span dir="ltr"><<a href="mailto:hystomagna@gmail.com">hystomagna@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear all,<br>
<br>
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.<br>
<br>
Do you know any easy way to compute it?<br>
<br>
Best,<br>
<br>
Maxime<br>
_______________________________________________<br></blockquote><div> </div></div>Maybe you could just scale the polydata using<br>#include <vtkTransformPolyDataFilter.h><br><br>vtkSmartPointer<vtkTransformPolyDataFilter> TransFilter = vtkSmartPointer<vtkTransformPolyDataFilter>::New();<br>
TransFilter->SetInput(YourPolydata);<br> TransFilter->SetTransform(ScaleTransform); //use vtkTransform (or maybe vtkLinearTransform)<br> TransFilter->Update();<br> vtkPolyData* ScaledPolydata = TransFilter->GetOutput();<br>
<br><br>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.<br><br>Dave<br>