Clipping of a volume

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Clipping of a volume

Rhys Thomas
Hello all,

    I was wondering if anyone could provide some hints on the following
problem: I wish to clip an instance of/ vtkStructuredPoints/ using a
/vtkPlane/. I want the output to be an instance of /vtkStructuredPoints/
so that I can insert it into my graphics pipeline in place of another
instance of /vtkStructuredPoints/ because I am performing other
operations on the data (changing opacity of certain voxels, contrast
stretching). I am currently using /vtkRenderer::AddVolume /to add a
/vtkVolume/ to the pipeline. I have tried variations of /vtkCutter,
vtkClipVolume /and/ vtkProbeFilter, /but with disappointing results.
Does anyone have  any suggestions as to the quickest (i.e. least
processor intensive) solution to this problem?

Thanks

Rhys
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Clipping of a volume

Goodwin Lawlor
Hi Rys,

Have a look at vtkExtractVOI
http://www.vtk.org/doc/release/5.0/html/a01382.html

hth

Goodwin

"Rhys Thomas" <[hidden email]> wrote in message
news:[hidden email]...

> Hello all,
>
>    I was wondering if anyone could provide some hints on the following
> problem: I wish to clip an instance of/ vtkStructuredPoints/ using a
> /vtkPlane/. I want the output to be an instance of /vtkStructuredPoints/
> so that I can insert it into my graphics pipeline in place of another
> instance of /vtkStructuredPoints/ because I am performing other operations
> on the data (changing opacity of certain voxels, contrast stretching). I
> am currently using /vtkRenderer::AddVolume /to add a /vtkVolume/ to the
> pipeline. I have tried variations of /vtkCutter, vtkClipVolume /and/
> vtkProbeFilter, /but with disappointing results. Does anyone have  any
> suggestions as to the quickest (i.e. least processor intensive) solution
> to this problem?
>
> Thanks
>
> Rhys
> _______________________________________________
> 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
>



_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Clipping of a volume

markww
In reply to this post by Rhys Thomas
Have you checked out vtkBoxWidget? It takes care of a lot of cropping work for you automatically. There is an example file that shows how to enable cropping of a volume with it (check the online class documentation for the link). I've only used vtkImageData -> vtkVolume as its input, but it will probably work with vtkStructuredPoints -> vtkVolume too,
 
Mark

 
On 2/10/06, Rhys Thomas <[hidden email]> wrote:
Hello all,

   I was wondering if anyone could provide some hints on the following
problem: I wish to clip an instance of/ vtkStructuredPoints/ using a
/vtkPlane/. I want the output to be an instance of /vtkStructuredPoints/
so that I can insert it into my graphics pipeline in place of another
instance of /vtkStructuredPoints/ because I am performing other
operations on the data (changing opacity of certain voxels, contrast
stretching). I am currently using /vtkRenderer::AddVolume /to add a
/vtkVolume/ to the pipeline. I have tried variations of /vtkCutter,
vtkClipVolume /and/ vtkProbeFilter, /but with disappointing results.
Does anyone have  any suggestions as to the quickest ( i.e. least
processor intensive) solution to this problem?

Thanks

Rhys
_______________________________________________
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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Clipping of a volume

Randall Hand
In reply to this post by Rhys Thomas
Well, is your vtkPlane Axis Aligned? If it is, then try looking into the vtkExtractVOI filter, which will return a vtkStructuredPoints for you.

If the plane is arbitrarily positioned in space, then you need to think about what you want to do with all the "clipped" cells along the edge.  That's why the result is an vtkUnstructuredGrid, because of the prisms, triangles, and tetrahedra that occur along angular cuts.  You would need to find a way to return this to a vtkStructuredPoints, probably with a vtkProbeFilter & a blank vtkImageData (vtkStructuredPoints) of the desired size..  But this will be extremely slow and wasteful of memory.  Best to just use the vtkUnstructuredGrid as-is :)

On 2/10/06, Rhys Thomas <[hidden email]> wrote:
Hello all,

    I was wondering if anyone could provide some hints on the following
problem: I wish to clip an instance of/ vtkStructuredPoints/ using a
/vtkPlane/. I want the output to be an instance of /vtkStructuredPoints/
so that I can insert it into my graphics pipeline in place of another
instance of /vtkStructuredPoints/ because I am performing other
operations on the data (changing opacity of certain voxels, contrast
stretching). I am currently using /vtkRenderer::AddVolume /to add a
/vtkVolume/ to the pipeline. I have tried variations of /vtkCutter,
vtkClipVolume /and/ vtkProbeFilter, /but with disappointing results.
Does anyone have  any suggestions as to the quickest (i.e. least
processor intensive) solution to this problem?

Thanks

Rhys
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Clipping of a volume

Dean N. Williams
Thanks Dan...

-Dean

> Well, is your vtkPlane Axis Aligned? If it is, then try looking into
> the vtkExtractVOI filter, which will return a vtkStructuredPoints for you.
>
> If the plane is arbitrarily positioned in space, then you need to
> think about what you want to do with all the "clipped" cells along the
> edge.  That's why the result is an vtkUnstructuredGrid, because of the
> prisms, triangles, and tetrahedra that occur along angular cuts.  You
> would need to find a way to return this to a vtkStructuredPoints,
> probably with a vtkProbeFilter & a blank vtkImageData
> (vtkStructuredPoints) of the desired size..  But this will be
> extremely slow and wasteful of memory.  Best to just use the
> vtkUnstructuredGrid as-is :)
>
> On 2/10/06, *Rhys Thomas* <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hello all,
>
>         I was wondering if anyone could provide some hints on the
>     following
>     problem: I wish to clip an instance of/ vtkStructuredPoints/ using a
>     /vtkPlane/. I want the output to be an instance of
>     /vtkStructuredPoints/
>     so that I can insert it into my graphics pipeline in place of another
>     instance of /vtkStructuredPoints/ because I am performing other
>     operations on the data (changing opacity of certain voxels, contrast
>     stretching). I am currently using /vtkRenderer::AddVolume /to add a
>     /vtkVolume/ to the pipeline. I have tried variations of /vtkCutter,
>     vtkClipVolume /and/ vtkProbeFilter, /but with disappointing results.
>     Does anyone have  any suggestions as to the quickest (i.e. least
>     processor intensive) solution to this problem?
>
>     Thanks
>
>     Rhys
>     _______________________________________________
>     This is the private VTK discussion list.
>     Please keep messages on-topic. Check the FAQ at:
>     http://www.vtk.org/Wiki/VTK_FAQ <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
>  
>

_______________________________________________
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