[vtkusers] Overlay Contour on vtkImageViewer2
S, Navneeth (GE, Research)
navneeth.s at ge.com
Tue Feb 24 03:32:24 EST 2009
Hello,
I'm trying to overlay a contour corresponding to a segmentation mask
on an image displayed using vtkImageViewer2.
However, the iso contour lines do not show up correctly (corresponding
to the actual boundary)
For example if the mask is formated such that the object has label=1,
and I use the following to generate the contour:
maskContourer = vtkMarchingContourFilter::New();
maskContourer->SetInput( maskImage );
maskContourer->SetValue(0, 1);
vtkPolyDataNormals *normals = vtkPolyDataNormals::New();
normals->SetInputConnection( maskContourer->GetOutputPort());
normals->SetFeatureAngle(60.0);
vtkPolyDataMapper *contourMapper = vtkPolyDataMapper::New();
contourMapper->SetInputConnection(normals->GetOutputPort());
contourMapper->ScalarVisibilityOff();
vtkActor *contour = vtkActor::New();
contour->SetMapper(contourMapper);
myVtkIMageViewer2->GetRenderer()->AddActor( skin );
What could be the reason ? Pl help.
thanks,
navneeth
More information about the vtkusers
mailing list