[vtkusers] vtkImageStencilData to vtkImageData

David Gobbi david.gobbi at gmail.com
Thu Jul 31 09:14:53 EDT 2008


Hi Luis,

Two steps are required.  First vtkPolyDataToImageStencil, and then
vtkImageStencil to apply the stencil to an image.  See the following
example:

Hybrid/Testing/Tcl/TestImageStencilWithPolydata.tcl

If you just want to create a binary image, then you will have to
replace the "reader" in the example with something that will
create a blank image.

    David


On Thu, Jul 31, 2008 at 1:43 AM, Luis Cordova <cordoval at gmail.com> wrote:
> I am getting a runtime error of "type vtkImageStencilData, but a
> vtkImageData is required."
>
> I was before needing to convert from PolyData to ImageData, then I use
> vtkPolyDataToImageStencil, but now this error from Stencil to Image.
>
> Anyone hints?
>
> Thanks,
> _______________________________________________
> 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
>



More information about the vtkusers mailing list