<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<vtkStructuredPointsReader> reader = vtkSmartPointer<vtkStructuredPointsReader>::New();<br> reader->SetFileName("test.vtk");<br> reader->Update();</div>
<div> // MC is used to display in 3D<br> vtkSmartPointer<vtkMarchingCubes> cubes = vtkSmartPointer<vtkMarchingCubes>::New();<br> cubes->SetInputConnection(reader->GetOutputPort());<br> cubes->ComputeNormalsOn();<br>
cubes->ComputeGradientsOn();<br> cubes->SetValue(0, 20);<br> cubes->Update();</div>
<div>// create a plane, and specify it</div>
<div> vtkSmartPointer<vtkPlane> plane = vtkSmartPointer<vtkPlane>::New();<br> plane->SetOrigin(100,0,0);<br> plane->SetNormal(1,0,0);</div>
<div>// create a cutter</div>
<div> vtkSmartPointer<vtkCutter> cutter = vtkSmartPointer<vtkCutter>::New();<br> cutter->SetInputConnection(cubes->GetOutputPort());<br> cutter->SetCutFunction(plane);<br> cutter->GenerateCutScalarsOn();<br>
cutter->SetValue(0, 0.5);</div>
<div> // create a mapper<br> vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();<br> mapper->SetInputConnection(cutter->GetOutputPort());<br> mapper->ScalarVisibilityOn(); <br>
mapper->Update();</div>
<div> </div>