[vtkusers] vtkContourFilter not working on vtkStructuredGrid
Sebastian Gatzka
sebastian.gatzka at stud.tu-darmstadt.de
Fri Mar 5 08:41:34 EST 2010
Hello.
I really can't tell why my code is not gernerating the iso-surface.
I have a structured grid (sGrid) filled with scalars.
I call the contour filter
vtkContourFilter *scalarIsoSurface = vtkContourFilter::New();
scalarIsoSurface->SetInput(sGrid);
scalarIsoSurface->GenerateValues(0,0.1);
Compute the normal
vtkPolyDataNormals *sGridPolyDataNormal =
vtkPolyDataNormals::New();
sGridPolyDataNormal->SetInput(scalarIsoSurface->GetOutput());
Put them into a poly data mapper
vtkPolyDataMapper *scalarIsoSurfaceMapper =
vtkPolyDataMapper::New();
scalarIsoSurfaceMapper->SetInput(sGridPolyDataNormal->GetOutput());
and into an actor
vtkActor *scalarIsoSurfaceActor = vtkActor::New();
scalarIsoSurfaceActor->SetMapper(scalarIsoSurfaceMapper);
which is passed on to the scene
ren1->AddActor(scalarIsoSurfaceActor);
and NOTHING happens.
Any ideas what I have missed, or whats wrong?
Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100305/ff29b2a6/attachment.htm>
More information about the vtkusers
mailing list