Hi Sam,<br><br>The vtkPolyDataToImageStencil just creates the stencil. After that, you need to use one of the image filters to apply the stencil to the image.<div><br>polydata -> vtkPolydataToImageStencil -> stencil<br>
<br>image (first input) and stencil (2nd input) -> vtkImageAccumulate -> image histogram/statistics<br><br>The first filter just produces the stencil, but then the stencil is used as the 2nd input (via SetStencil) for image filters like vtkImageStencil, vtkImageBlend, vtkImageAccumulate, etc.</div>
<div><br></div><div>The test file VTK/Hybrid/Testing/Tcl/TestImageStencilWithPolydata.tcl is an example of how to use it.</div><div><br></div><div> David<br><br>On Sat, Nov 20, 2010 at 3:15 PM, Sam <<a href="mailto:sistephan@gmail.com">sistephan@gmail.com</a>> wrote:<br>
><br>> David,<br>><br>> I want to use VTK to see how many of the pixels from the Dicom Image are<br>> within the Model. I'm not sure the Stencil approach will answer that<br>> question because I can only set the Model as the input not the DICOM Image.<br>
> Can you provide me with more information or even some pseudo code?<br>> --<br>> View this message in context: <a href="http://vtk.1045678.n5.nabble.com/VTK-Model-and-ITKImageBase-itkImage-UC3-tp3273888p3273920.html">http://vtk.1045678.n5.nabble.com/VTK-Model-and-ITKImageBase-itkImage-UC3-tp3273888p3273920.html</a><br>
> Sent from the VTK - Users mailing list archive at Nabble.com.<br>> _______________________________________________<br>> Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>><br>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
><br>> Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br><br></div>