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 -&gt; vtkPolydataToImageStencil -&gt; stencil<br>

<br>image (first input) and stencil (2nd input) -&gt; vtkImageAccumulate -&gt; 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 &lt;<a href="mailto:sistephan@gmail.com">sistephan@gmail.com</a>&gt; wrote:<br>

&gt;<br>&gt; David,<br>&gt;<br>&gt; I want to use VTK to see how many of the pixels from the Dicom Image are<br>&gt; within the Model.  I&#39;m not sure the Stencil approach will answer that<br>&gt; question because I can only set the Model as the input not the DICOM Image.<br>

&gt; Can you provide me with more information or even some pseudo code?<br>&gt; --<br>&gt; 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>

&gt; Sent from the VTK - Users mailing list archive at Nabble.com.<br>&gt; _______________________________________________<br>&gt; Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>&gt;<br>&gt; 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>

&gt;<br>&gt; 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>&gt;<br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>

&gt;<br><br></div>