[vtkusers] How do I save all slices of a volume from vtkCutter to another canvas?

Sankhesh Jhaveri sankhesh.jhaveri at kitware.com
Mon Sep 12 09:36:16 EDT 2016


Hi Magnus,

First of all, if the goal is to just slice the volume consider using
vtkImageReslice (
http://www.vtk.org/Wiki/VTK/Examples/Cxx/ImageData/ImageReslice) instead of
vtkCutter.

You can simply set the output image data of the vtkImageReslice to a
vtkImageActor and add it to a vtkRenderer as in
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/InteractWithImage

Hope that helps.



*Sankhesh Jhaveri*
*Sr. Research & Development Engineer* | Kitware
<http://www.kitware.com> | (518)
881-4417




On Sat, Sep 10, 2016 at 8:01 PM, Magnus Elden <magnus_elden at hotmail.com>
wrote:

> I have a volume that the class vtkCutter cuts into n slices. Now I need to
> save a render of each slice to another larger canvas to generate something
> similar to this: http://previews.123rf.com/images/bunyos/bunyos1403/
> bunyos140300039/26777884-MRI-scan-of-the-human-brain-Stock-Photo.jpg
>
>
>
> I am able to render it by linking the cutter output to a mapper and then
> into a vtkActor that I add to the renderer, but I have no idea how I can
> render each slice to a canvas. In the worst case I just want the renders to
> be all stored to disk.
>
>
>
> Thank you for your help.
>
>
>
> Yours,
>
> Magnus Elden
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160912/32414234/attachment.html>


More information about the vtkusers mailing list