Thanks!<br><br>Does the SetOrigin(100,0,0) mean a sagitall cut or cut in the X-plane at 100th pixel and what does SetValue(0, 0.5) mean?<br><br>Many thanks again<br><br>Jothy<br><br><div class="gmail_quote">On Thu, Dec 24, 2009 at 3:50 AM, Jinyoung Hwang <span dir="ltr">&lt;<a href="mailto:hwangjinyoung@gmail.com">hwangjinyoung@gmail.com</a>&gt;</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;"><div>Hello,</div>
<div> </div>
<div>I made an example you want, but it may not be.</div>
<div>
<div>If not, repost again, then other will help you.</div></div>
<div> </div>
<div>Jinyoung</div>
<div> </div>
<div>--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
<div> // data load<br> vtkSmartPointer&lt;vtkStructuredPointsReader&gt; reader = vtkSmartPointer&lt;vtkStructuredPointsReader&gt;::New();<br> reader-&gt;SetFileName(&quot;test.vtk&quot;);<br> reader-&gt;Update();</div>
<div> // MC is used to display in 3D<br> vtkSmartPointer&lt;vtkMarchingCubes&gt; cubes = vtkSmartPointer&lt;vtkMarchingCubes&gt;::New();<br> cubes-&gt;SetInputConnection(reader-&gt;GetOutputPort());<br> cubes-&gt;ComputeNormalsOn();<br>

 cubes-&gt;ComputeGradientsOn();<br> cubes-&gt;SetValue(0, 20);<br> cubes-&gt;Update();</div>
<div>// create a plane, and specify it</div>
<div> vtkSmartPointer&lt;vtkPlane&gt; plane = vtkSmartPointer&lt;vtkPlane&gt;::New();<br> plane-&gt;SetOrigin(100,0,0);<br> plane-&gt;SetNormal(1,0,0);</div>
<div>// create a cutter</div>
<div> vtkSmartPointer&lt;vtkCutter&gt; cutter = vtkSmartPointer&lt;vtkCutter&gt;::New();<br> cutter-&gt;SetInputConnection(cubes-&gt;GetOutputPort());<br> cutter-&gt;SetCutFunction(plane);<br> cutter-&gt;GenerateCutScalarsOn();<br>

 cutter-&gt;SetValue(0, 0.5);</div>
<div> // create a mapper<br> vtkSmartPointer&lt;vtkPolyDataMapper&gt; mapper = vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();<br> mapper-&gt;SetInputConnection(cutter-&gt;GetOutputPort());<br> mapper-&gt;ScalarVisibilityOn(); <br>

 mapper-&gt;Update();</div>
<div> </div>
<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>