Hi Ye,<br><br>You can use vtkPolyDataToImageStencil in combination with vtkImageStencil. <br><br>Something like<br><br>polydataToImageStencil->SetInput( polydata );<br>imageStencil->SetStencil( polydataToImageStencil->GetOutput());
<br>imageStencil->SetInput( imagedata );<br><br>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.
<br><br>--<br>karthik<br><br><br><div><span class="gmail_quote">On 3/11/07, <b class="gmail_sendername">Ye Jun</b> <<a href="mailto:yejun078@gmail.com">yejun078@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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.
<br>
<br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br></blockquote></div>