[vtkusers] Unable to generate contour points.

David Doria daviddoria at gmail.com
Wed Oct 3 07:59:37 EDT 2012


On Wed, Oct 3, 2012 at 3:07 AM, abhishek <abhishek at meddiff.com> wrote:
> 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?

What is the problem with the c++ version? Please include a compilable
example that demonstrates the problem.

David



More information about the vtkusers mailing list