[vtkusers] Unable to generate contour points.

abhishek abhishek at meddiff.com
Wed Oct 3 03:07:26 EDT 2012


Hello Group, 

I am trying to use following code to generate contour points in c++. 

vtkContourFilter* contour=vtkContourFilter::New();
contour->SetInput(_vtkImage);
contour->GenerateValues(1,300000.0F,300000.0F);
contour->Update();
			
vtkPoints* points= contour->GetOutput()->GetPoints();
points->Print(cout);

*************************************************
Similar code written in python works well.
Python code: 

contours = vtk.vtkContourFilter()
contours.SetInput(imageDataArray)
contours.GenerateValues(1, 300000.0, 300000.0)
contours.Update()
print contours.GetOutput().GetPoints()


Is there something I'm missing out?

Regards
Abhishek.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Unable-to-generate-contour-points-tp5716409.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list