[vtk-developers] Use vtkContour to find outline of mask in	vtkImageData?
    kent williams 
    nkwmailinglists at gmail.com
       
    Wed Jan  9 11:36:02 EST 2008
    
    
  
I posted this to VTKUsers and got no suggestions.  Anyone here want to comment?
I need to go from a binary image, representing a 3D mask, to a set of
outlines on each slice of the binary image.
It seems like something like this would work:
Use vtkImageReslice to extract 2D slices from the 3D volume
For each slice, use vtkContourFilter to extract contours around areas
of set pixels.
Right now I have a tracer that uses one or more vtkContourWidgets to
interactively generate a set of contours defining a mask.  I just
finished code that iterates through the contour set a slice at a time,
and generates a binary image volume where a non-zero pixel value is
inside the mask, and zero pixel value is outside the mask.  What I
want to do is reverse this process -- given a binary image, generate
the countour set.
It looks like I should maybe use GenerateValues to generate contours,
but I don't understand the relationship between the output data of
vtkContour filter and the data i would need to initialize a
vtkContourWidget.  The few examples extant don't make that clear to me
either.
Thanks!
    
    
More information about the vtk-developers
mailing list