<div dir="ltr">Yes, you are correct.<br><br>I should be GenerateValues(NumOfContours,Range)<br><br>Jothy<br><br><div class="gmail_quote">On Thu, Mar 11, 2010 at 7:24 PM, Darshan Pai <span dir="ltr"><<a href="mailto:darshanpai@gmail.com">darshanpai@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">just wondering. The first parameter to the GenerateValues(). Isn't it the number of contours that you want?<br>
<br>You have set it to zero . so no contours will be drawn ..<br><br>Regards<br>Darshan<br><br><div class="gmail_quote">
On Thu, Mar 11, 2010 at 10:51 AM, da <span dir="ltr"><<a href="mailto:frinxor@gmail.com" target="_blank">frinxor@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Try a vtkAssignAttribute filter before the contour filter.<div><br></div><div>vtkAssignAttribute assignFilter = vtkAssignAttribute::New();</div><div>assignFilter->SetInput(sGrid);</div><div>assignFilter->Assign( {your scalar array name}, vtkDataSetAttributes::Scalars, vtkAssignAttribute::CELL_DATA);</div>
<div><br></div><div>...</div><div><span style="font-family: Helvetica,Arial,sans-serif;">scalarIsoSurface->SetInputConnection(assginFilter->GetOutputPort() );</span></div><div><br><br><div class="gmail_quote"><div>
On Fri, Mar 5, 2010 at 6:41 AM, Sebastian Gatzka <span dir="ltr"><<a href="mailto:sebastian.gatzka@stud.tu-darmstadt.de" target="_blank">sebastian.gatzka@stud.tu-darmstadt.de</a>></span> wrote:<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div>
<div bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Helvetica, Arial, sans-serif">Hello.<br>
<br>
I really can't tell why my code is not gernerating the iso-surface.<br>
I have a structured grid (sGrid) filled with scalars.<br>
<br>
I call the contour filter<br>
<br>
vtkContourFilter *scalarIsoSurface =
vtkContourFilter::New();<br>
scalarIsoSurface->SetInput(sGrid);<br>
scalarIsoSurface->GenerateValues(0,0.1);<br>
<br>
Compute the normal<br>
<br>
vtkPolyDataNormals *sGridPolyDataNormal =
vtkPolyDataNormals::New();<br>
sGridPolyDataNormal->SetInput(scalarIsoSurface->GetOutput());<br>
<br>
Put them into a poly data mapper<br>
<br>
vtkPolyDataMapper *scalarIsoSurfaceMapper =
vtkPolyDataMapper::New();<br>
scalarIsoSurfaceMapper->SetInput(sGridPolyDataNormal->GetOutput());<br>
<br>
and into an actor<br>
<br>
vtkActor *scalarIsoSurfaceActor = vtkActor::New();<br>
scalarIsoSurfaceActor->SetMapper(scalarIsoSurfaceMapper);<br>
<br>
which is passed on to the scene<br>
<br>
ren1->AddActor(scalarIsoSurfaceActor);<br>
<br>
and NOTHING happens.<br>
<br>
Any ideas what I have missed, or whats wrong?<br>
<br>
Sebastian<br>
</font></font>
</div>
<br></div></div><div class="im">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></div></blockquote></div><br></div><div class="im">
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></div></blockquote></div><br>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>