[vtkusers] Writing renderwindow to an image

Carlos Martínez Burgos cmarbur at iti.upv.es
Thu Jul 4 11:08:56 EDT 2002


Yes, this is the idea. I get an vtkImageData object from 
vtkWindowToImageFilter output. Then I should get the pixel values from it.

The problem is that I have never worked with images in VTK so I have 
problems.

Why this object has three components (x,y,z)? I think that this is because 
an image are slices. Isn't it? If it is true, I supose that I have only 
one slice from the window. Is this slice z=0?

How can I get the pixels (rgb) values from the vtkImageData object? I 
supose that this should be sufficient.


Thanks again.


On Thu, 4 Jul 2002, Mathieu Malaterre wrote:

> Hi Carlos,
>    Why don't you use : vtkWindowToImageFilter.
> See:
> http://public.kitware.com/VTK/doc/nightly/html/classvtkWindowToImageFilter.html
> 
> mathieu
> 
> Carlos Martínez Burgos wrote:
> 
> > Hi all.
> >
> > I'm working with Java and I have to make reports with the contents of
> > VTK's renderwindow. I need to do a copy from the renderwindow to an array
> > of bytes, to build the image and show it.
> >
> > Has somebody any idea of doing this? Could somebody help me?
> >
> > Thanks.
> >
> > --
> > ----------------------------------------------------------------------
> > Carlos Martínez Burgos      |     Instituto Tecnológico de Informática
> > Ingeniero Informático       |      Universidad Politécnica de Valencia
> > Tlf: +34 963877237          |                        Camí de Vera, S/N
> > cmarbur at iti.upv.es          |                   46071 Valencia - Spain
> > www.iti.upv.es/~cmarbur     |                           www.iti.upv.es
> > ----------------------------------------------------------------------
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/vtkusers
> 
> --
> Malaterre, Mathieu
> The John P. Robarts Research Institute
> Imaging Research Laboratories
> http://www.imaging.robarts.ca/~mmalat
> 
> 
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
> 

-- 
----------------------------------------------------------------------
Carlos Martínez Burgos      |     Instituto Tecnológico de Informática
Ingeniero Informático       |      Universidad Politécnica de Valencia
Tlf: +34 963877237          |                        Camí de Vera, S/N
cmarbur at iti.upv.es          |                   46071 Valencia - Spain
www.iti.upv.es/~cmarbur     |                           www.iti.upv.es
----------------------------------------------------------------------




More information about the vtkusers mailing list