<div class="gmail_quote">On Fri, Mar 5, 2010 at 8:41 AM, Sebastian Gatzka <span dir="ltr"><<a href="mailto:sebastian.gatzka@stud.tu-darmstadt.de">sebastian.gatzka@stud.tu-darmstadt.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<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><div bgcolor="#ffffff" text="#000000"><font size="-1"><font face="Helvetica, Arial, sans-serif"><br></font></font></div></blockquote><div class="gmail_quote"><br></div><div class="gmail_quote">You 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.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote"><span class="Apple-style-span" style="font-family: Helvetica, Arial, sans-serif; ">scalarIsoSurface->GenerateValues(0,0.1);</span></div><div class="gmail_quote">
<span class="Apple-style-span" style="font-family: Helvetica, Arial, sans-serif; ">scalarIsoSurface->Update();</span></div><div class="gmail_quote"><span class="Apple-style-span" style="font-family: Helvetica, Arial, sans-serif; "><br>
</span></div><div class="gmail_quote">before I dig too deep.</div><div class="gmail_quote"><br></div><div class="gmail_quote">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.</div>
<br clear="all">Thanks,<br><br><div>David</div></div>