[vtkusers] how can i clip the vtkImageData using the vtkPolyData? thank you in advance~

Karthik Krishnan karthik.krishnan at kitware.com
Sun Mar 11 12:52:04 EDT 2007


Hi Ye,

You can use vtkPolyDataToImageStencil in combination with vtkImageStencil.

Something like

polydataToImageStencil->SetInput( polydata );
imageStencil->SetStencil( polydataToImageStencil->GetOutput());
imageStencil->SetInput( imagedata );

The output of imageStencil is your clipped polydata. I've seen some issues
with the class in the past though, leaking through tight edges of the
polydata etc, but it might work for you.

--
karthik


On 3/11/07, Ye Jun <yejun078 at gmail.com> wrote:
>
> hi, everyone. i want to clip the vtkImageData using the self-created
> vtkPolyData. i want to get the vtkImageData as result. but i find that there
> is only a class named vtkClipVolume to clip the imagedata, but its output is
> vtkUnstructuredGrid which is not what i expected. what can i do to get the
> result imagedata? Any advice is  required~ thank you in advance.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070311/e58a738a/attachment.htm>


More information about the vtkusers mailing list