[vtkusers] How to extact the geometry within a bounding box from a vtkPolyData ? Please Help !!!!!
Randall Hand
randall.hand at gmail.com
Thu Mar 9 12:43:57 EST 2006
Well, I see 3 options:
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.
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.
3) Upgrade to vtk5.
On 3/9/06, Deepak Roy <cdeepakroy at gmail.com> wrote:
>
> Hello,
> >
> > Thanks for the reply.
> >
> > But i am using the vtk version 4.2 which does not seem to have the
> > vtkBox class.
> >
> > Is there an alternative way ?
> >
> > Regards,.
> >
> > Deepak Roy
> >
> >
> > On 3/9/06, Randall Hand <randall.hand at gmail.com > wrote:
> > >
> > > I believe you're looking for vtkCutter, or in the case of polyData,
> > > vtkClipPolyData: http://www.vtk.org/doc/release/5.0/html/a01243.html
> > >
> > > It clips against any implicit function, so if you h ave a ROI that's a
> > > box, then vtkBox should do it for ya:
> > > http://www.vtk.org/doc/release/5.0/html/a01189.html
> > >
> > > On 3/9/06, Deepak Roy < cdeepakroy at gmail.com> wrote:
> > >
> > > > Hello everybody,
> > >
> > > I have an open triangular mesh surface in the form of vtkPolyData.
> > >
> > > And i also have a Region of Interest ( ROI ) bounding box.
> > >
> > > How do i extract the geometry within this ROI bounding box from the
> > > vtkPolyData surface ?
> > >
> > > 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 ).
> > >
> > > 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.
> > >
> > > I was looking for a vtk filter which can do this clipping
> > > faster.........or is there a way to generate the scalars faster ?
> > >
> > > 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.
> > >
> > > But i could not find a filter in vtk for this.
> > >
> > > Does any one know how to do this ?
> > >
> > > Thanks in advance.
> > >
> > > Regards,
> > >
> > > Deepak Roy
> > >
> > >
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at:
> > > http://www.vtk.org/Wiki/VTK_FAQ
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.vtk.org/mailman/listinfo/vtkusers
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Randall Hand
> > > Visualization Scientist,
> > > ERDC-MSRC Vicksburg, MS
> > > Homepage: http://www.yeraze.com
> > >
> >
> >
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
--
Randall Hand
Visualization Scientist,
ERDC-MSRC Vicksburg, MS
Homepage: http://www.yeraze.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060309/74da8e3d/attachment.htm>
More information about the vtkusers
mailing list