<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt">In the past, I have used vtkExtractPolyDataGeometry with a vtkBoxWidget2 to get 6 planes for the implicit function. Worked with a triangulated surface; can't see why it wouldn't work with vertices.<br><br>Maarten<br><div><span><br></span></div><div style="display: block;" class="yahoo_quoted"> <br> <br> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Tuesday, November 5, 2013 6:09:24 AM, mahendra &lt;mahendra123awale@gmail.com&gt; wrote:<br> </font> </div>  <div class="y_msg_container">OK let me try one more time!<br clear="none"><br clear="none">Below is java
 source code, which generate the vtkpoints and displays it. <br clear="none">The attached image shows the generated view<br clear="none"><br clear="none">//========================================================================================<br clear="none">import java.io.BufferedReader;<br clear="none">import java.io.FileNotFoundException;<br clear="none">import java.io.FileReader;<br clear="none">import java.io.IOException;<br clear="none">import vtk.*;<br clear="none"><br clear="none">public class cutter {<br clear="none"><br clear="none">&nbsp; &nbsp; static vtkRenderWindowPanel renderWindowPanel = new<br clear="none">vtkRenderWindowPanel();<br clear="none">&nbsp; &nbsp; static vtkPoints points = new vtkPoints();<br clear="none">&nbsp; &nbsp; static vtkPointData pointdata = new vtkPointData();<br clear="none">&nbsp; &nbsp; static vtkUnsignedCharArray colors = new vtkUnsignedCharArray();<br clear="none">&nbsp; &nbsp; static vtkCellArray
 vtkCellArray = new vtkCellArray();<br clear="none">&nbsp; &nbsp; static vtkPolyData polydata = new vtkPolyData();<br clear="none">&nbsp; &nbsp; static vtkPolyDataMapper mainMapper = new vtkPolyDataMapper();<br clear="none">&nbsp; &nbsp; static vtkInteractorStyleTrackballCamera vInStylCamera = new<br clear="none">vtkInteractorStyleTrackballCamera();<br clear="none">&nbsp; &nbsp; static vtkActor mainActor = new vtkActor();<br clear="none">&nbsp; &nbsp; static vtkInteractorStyleImage vInStylImage = new<br clear="none">vtkInteractorStyleImage();<br clear="none"><br clear="none">&nbsp; &nbsp; static {<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; System.loadLibrary("vtkCommonJava");<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; System.loadLibrary("vtkFilteringJava");<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; System.loadLibrary("vtkIOJava");<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; System.loadLibrary("vtkImagingJava");<br clear="none">&nbsp; &nbsp; &nbsp;
 &nbsp; System.loadLibrary("vtkGraphicsJava");<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; System.loadLibrary("vtkRenderingJava");<br clear="none">&nbsp; &nbsp; }<br clear="none"><br clear="none">&nbsp; &nbsp; public static void main(String[] args) throws FileNotFoundException,<br clear="none">IOException {<br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; //Read the points<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; readPoints02();<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; polydata.SetPoints(points);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; polydata.GetPointData().SetScalars(colors);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; polydata.SetVerts(vtkCellArray);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; mainMapper.SetInput(polydata);<br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; //create a plane to cut<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; vtkPlane plane = new vtkPlane();<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp;
 plane.SetOrigin(mainMapper.GetInput().GetCenter());<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; plane.SetNormal(1, 0, 0);<br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; //create cutter, map it and set the actor<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; vtkCutter cutter = new vtkCutter();<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; cutter.SetCutFunction(plane);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; cutter.SetInput(mainMapper.GetInput());<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; cutter.Update();<br clear="none"><br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; vtkPolyDataMapper cutterMapper = new vtkPolyDataMapper();<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; cutterMapper.SetInputConnection(cutter.GetOutputPort());<br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; //create plane actor<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; vtkActor planeActor = new vtkActor();<br clear="none">&nbsp; &nbsp; &nbsp;
 &nbsp; planeActor.GetProperty().SetColor(1.0, 1, 0);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; planeActor.GetProperty().SetLineWidth(20);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; planeActor.SetMapper(cutterMapper);<br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; //Another actor for my data<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; vtkActor myActor = new vtkActor();<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; myActor.SetMapper(mainMapper);<br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; //create renderers and add actors of plane and cube<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; vtkRenderer ren = new vtkRenderer();<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; ren.AddActor(planeActor);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; ren.AddActor(myActor);<br clear="none"><br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; //Add renderer to renderwindow and render<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp;
 vtkRenderWindow renWin = new vtkRenderWindow();<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; renWin.AddRenderer(ren);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; renWin.SetSize(600, 600);<br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; iren.SetRenderWindow(renWin);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; ren.SetBackground(0, 0, 0);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; renWin.Render();<br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; iren.Start();<br clear="none">&nbsp; &nbsp; }<br clear="none"><br clear="none"><br clear="none">&nbsp; &nbsp; static void readPoints02() throws FileNotFoundException, IOException {<br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; colors.SetNumberOfComponents(3);<br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; for (int a = 0; a &lt; 10000; a++) {<br
 clear="none">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double randomX = Math.random();<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double randomY = Math.random();<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double randomZ = Math.random();<br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; points.InsertPoint(a, randomX*300, randomY*300, randomZ*300);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vtkCellArray.InsertNextCell(1);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vtkCellArray.InsertCellPoint(a);<br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; colors.InsertTuple3(a, 255, 255, 0);<br clear="none"><br clear="none">&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; <br clear="none">&nbsp; &nbsp; }<br clear="none">}<br clear="none"><br clear="none">//=====================================================================================<br clear="none"><br
 clear="none">&lt;<a shape="rect" href="http://vtk.1045678.n5.nabble.com/file/n5724301/view.png" target="_blank">http://vtk.1045678.n5.nabble.com/file/n5724301/view.png</a>&gt; <br clear="none"><br clear="none">I wanted to allow user to make the cut on this points with predefined box. I<br clear="none">mean user should place the box where he want and i want to display only<br clear="none">those part (subparts of the whole view). <br clear="none"><br clear="none">Looking forward for suggestions!!!!<br clear="none"><br clear="none"><br clear="none">Thanks<br clear="none"><br clear="none"><br clear="none"><br clear="none">--<br clear="none">View this message in context: <a shape="rect" href="http://vtk.1045678.n5.nabble.com/Slicing-on-the-VTK-points-tp5724228p5724301.html" target="_blank">http://vtk.1045678.n5.nabble.com/Slicing-on-the-VTK-points-tp5724228p5724301.html</a><div class="yqt7406510042" id="yqtfd06425"><br clear="none">Sent from the VTK - Users
 mailing list archive at Nabble.com.<br clear="none">_______________________________________________<br clear="none">Powered by www.kitware.com<br clear="none"><br clear="none">Visit other Kitware open-source projects at <a shape="rect" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br clear="none"><br clear="none">Please keep messages on-topic and check the VTK FAQ at: <a shape="rect" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br clear="none"><br clear="none">Follow this link to subscribe/unsubscribe:<br clear="none"><a shape="rect" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br clear="none"></div><br><br></div>  </div> </div>  </div> </div></body></html>