[vtkusers] x-y-z coordinates from vtkPolyData from vtkContourFilter

Luke hazelnusse at gmail.com
Fri Dec 2 15:06:35 EST 2011


> You can try to cast the cells to different types. Or, you can use
> polydata->GetCellType() and compare the value returned to this list:
> http://www.vtk.org/doc/nightly/html/vtkCellType_8h_source.html

Ok, this makes sense now.

>> and how can I get the x-y-z coordinates of each point on the isosurface?
>
> I think you're just looking for
>
> vtkPoints* points = contourFilter->GetOutput()->GetPoints();
>

Aha!  Thanks!  This is exactly what I was looking for.

> To actually run the filter, you need contourFilter->Update() (since
> you have the filter connected to the renderer, calling Render()
> updates everything "upstream", including the contourFilter.

Ok, duly noted.

Thanks for the help.

~Luke



More information about the vtkusers mailing list