[vtkusers] vtkContourFilter not working on vtkStructuredGrid

Rakesh Patil rakeshthp at in.com
Fri Mar 5 10:24:33 EST 2010


 Ya, I had also done the same mistake... I had ommitted that update statement.. By putting that update statement is should definitley work.. (only if data is fed correctly) Original message From:David Doria< daviddoria+vtk at gmail.com >Date: 05 Mar 10 19:26:03Subject:Re: [vtkusers] vtkContourFilter not working on vtkStructuredGridTo: Sebastian Gatzka On Fri, Mar 5, 2010 at 8:41 AM, Sebastian Gatzkawrote:Hello.I really can't tell why my code is not gernerating the isosurface. I have a structured grid (sGrid) filled with scalars.I call the contour filtervtkContourFilter *scalarIsoSurface vtkContourFilter::New(); scalarIsoSurface>SetInput(sGrid); scalarIsoSurface>GenerateValues(0,0.1);Compute the normalvtkPolyDataNormals *sGridPolyDataNormal vtkPolyDataNormals::New(); sGridPolyDataNormal>SetInput(scalarIsoSurface>GetOutput());Put them into a poly data mappervtkPolyDataMapper *scalarIsoSurfaceMapper vtkPolyDataMapper::New(); scalarIsoSurfaceMapper>SetInput(sGridPolyDataNormal>GetOu
 tput());and into an actorvtkActor *scalarIsoSurfaceActor = vtkActor::New(); scalarIsoSurfaceActor>SetMapper(scalarIsoSurfaceMapper);which is passed on to the sceneren1>AddActor(scalarIsoSurfaceActor);and NOTHING happens.Any ideas what I have missed, or whats wrong?SebastianYou probably have a call to Render() after the code you sent us, which I believe updates the whole pipeline. Whenever I have something that is totally empty, I go back and put an Update() call on every object that is updatable. scalarIsoSurface>GenerateValues(0,0.1); scalarIsoSurface>Update(); before I dig too deep.If that doesn't change anything, try to create a demo involving some simple data (using a vtk*Source if you can, so we can reproduce it without needing your dataset). Then send us the smallest compilable code that demonstrates the problem. Thanks,David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100305/d9872ba2/attachment.htm>


More information about the vtkusers mailing list