I believe you're looking for vtkCutter, or in the case of polyData, vtkClipPolyData: <a href="http://www.vtk.org/doc/release/5.0/html/a01243.html">http://www.vtk.org/doc/release/5.0/html/a01243.html</a><br><br>It clips against any implicit function, so if you h ave a ROI that's a box, then vtkBox should do it for ya:
<a href="http://www.vtk.org/doc/release/5.0/html/a01189.html">http://www.vtk.org/doc/release/5.0/html/a01189.html</a><br><br><div><span class="gmail_quote">On 3/9/06, <b class="gmail_sendername">Deepak Roy</b> <<a href="mailto:cdeepakroy@gmail.com">
cdeepakroy@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="direction: ltr;"><div>Hello everybody,
</div>
<div> </div>
<div>I have an open triangular mesh surface in the form of vtkPolyData.</div>
<div> </div>
<div>And i also have a Region of Interest ( ROI ) bounding box. </div>
<div> </div>
<div>How do i extract the geometry within this ROI bounding box from the vtkPolyData surface ?</div>
<div> </div>
<div>I know that, one method is to create a scalar array and assign all the geometry inside the ROI to be of one value ( inside value ) and all the geometry outside the ROI to be of another value ( outside value ).</div>
<div> </div>
<div>But for this, i have to write a loop which sets a scalar value for each and every point in the vtkPolyData, which will take a long time. </div>
<div> </div>
<div>I was looking for a vtk filter which can do this clipping faster.........or is there a way to generate the scalars faster ?</div>
<div> </div>
<div>I am sure there is a nice way of doing this and i am sure there might be a VTK filter for this job, since this is a very commonly performed operation. </div>
<div> </div>
<div>But i could not find a filter in vtk for this.</div>
<div> </div>
<div>Does any one know how to do this ?</div>
<div> </div>
<div>Thanks in advance.</div>
<div> </div>
<div>Regards,</div></div><div style="direction: ltr;"><span class="sg">
<div> </div>
<div>Deepak Roy</div>
<div> </div>
</span></div><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br><br></blockquote></div><br><br clear="all"><br>-- <br>Randall Hand<br>Visualization Scientist, <br>ERDC-MSRC Vicksburg, MS<br>Homepage: <a href="http://www.yeraze.com">http://www.yeraze.com</a>