[vtkusers] Re: vtk Gurus

ddlima at ucsd.edu ddlima at ucsd.edu
Mon Jul 11 17:22:05 EDT 2005


Thanks to Steve & Dean who suggested the use of vtkImageStencil.
It seems like a viable approach that I had no knowledge of.  I also
looked up the ITK toolkit(as Dean suggested). The software guide does
mention the SpatialObject class which has the capacity to evaluate whether
a given point is inside a geometric shape.  At first glance at the header
files, the approach seems to be similar to the image stencil concept: in
that 2D slices are filtered against an outline.

Regards,

Darryl

>>From Dean
Darryl,
if you have a surface you could cut it with a cutting filter to get a 2D
polyline or polydata and feed that slice by slice into a pipeline similar
to what is done in the image stencil of
Examples/GUI/Tcl/ImageTracerWidget.tcl
or (recent cvs) Widgets/Testing/Cxx/TestImageTracerWidget.cxx
or (formerly) Hybrid/Testing/Cxx/TestImageTracerWidget.cxx
and then use vtkImageThreshold to null out what is inside the individual
slices.  Try building a simpler pipeline with one image slice to see how
this may work first.
ITK would probably do the 3D implementation more transparently though.
Dean

>>From Steve Humphries
I'm certainly no VTK guru, but did recently have a project with similar
requirements. I was able to do what I wanted with vtkImageStencil and
vtkPolyDataToImageStencil.
hth,
SH



More information about the vtkusers mailing list