Well, I see 3 options:<br><br>1) Use multiple cuts with "vtkPlanes".. I'm not 100% on this, but I believe if you define 6 planes with normals pointing inwards, it'll work.<br>2) Take the vtkBox.cxx & vtkBox.h
from 5.0, and include it in your project with whatever modifications are needed to get it working with 4.2. It's just derived from vtkImplicitFunction, which does exist in 4.2, so it should be easy work as the vtkImplicitFunction model is pretty simple & easy to use.
<br>3) Upgrade to vtk5.<br><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;"><span class="e" id="q_109e0149f3da0ef4_0"><div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">
<div>Hello,</div>
<div> </div>
<div>Thanks for the reply.</div>
<div> </div>
<div>But i am using the vtk version 4.2 which does not seem to have the vtkBox class.</div>
<div> </div>
<div>Is there an alternative way ?</div>
<div> </div>
<div>Regards,.</div></div>
<div style="direction: ltr;"><span>
<div> </div>
<div>Deepak Roy<br><br> </div></span></div>
<div style="direction: ltr;"><span>
<div><span class="gmail_quote">On 3/9/06, <b class="gmail_sendername">Randall Hand</b> <<a href="mailto:randall.hand@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">randall.hand@gmail.com
</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.vtk.org/doc/release/5.0/html/a01189.html</a><br><br>
<div></div>
<div style="direction: ltr;"><span><span class="gmail_quote">On 3/9/06, <b class="gmail_sendername">Deepak Roy</b> <<a href="mailto:cdeepakroy@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
cdeepakroy@gmail.com</a>> wrote:</span></span></div>
<div style="direction: ltr;">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"></blockquote></div>
<div style="direction: ltr;"><span>
<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></span></div>
<div style="direction: ltr;">
<div style="direction: ltr;"><span>
<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 href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br><br>
<blockquote></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/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.yeraze.com</a> </div></blockquote></div><br></span></div></blockquote></div><br>
</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>