[vtkusers] how to generate a vtkOutlineFilter from vtkImageData
kdsfinger at gmail.com
kdsfinger at gmail.com
Tue Jun 20 17:09:21 EDT 2006
hi, all
I am trying to use the vtkImagePlaneWidget to show the image which was
read in itk and imported by using itkImageToVTKImageFilter.
itkImageToVTKImageFilter will export the data of vtkImageData. My
question is: with the vtkImageData in hand, how may I import it to a
vtkOutlineFilter?
Here is the part of the codes from the test of ImagePlaneWidget in vtk:
vtkVolume16Reader* v16 = vtkVolume16Reader::New();
v16->SetDataDimensions( 64, 64);
v16->SetDataByteOrderToLittleEndian();
v16->SetImageRange( 1, 93);
v16->SetDataSpacing( 3.2, 3.2, 1.5);
v16->SetFilePrefix( fname );
v16->SetDataMask( 0x7fff);
v16->Update();
delete[] fname;
vtkOutlineFilter* outline = vtkOutlineFilter::New();
outline->SetInputConnection(v16->GetOutputPort());
vtkPolyDataMapper* outlineMapper = vtkPolyDataMapper::New();
outlineMapper->SetInputConnection(outline->GetOutputPort());
Thanks for help.
zl2k
More information about the vtkusers
mailing list