[vtkusers] RE: vtkusers digest, Vol 1 #248 - 4 msgs

Seshan, Viswanathan (MED,ATC TKY JP ) Viswanathan.Seshan at gemsa.med.ge.com
Fri Jan 5 00:07:18 EST 2001


Hi,

Thanks for the tips. I am a relative newbie to VTK, and I was having the
same problem.
However, I got around it by simply rendering the window again just before I
wrote it.

Something like:

[snip]
iren.Initialize()
iren.Start()
renWin.SetSize(1000,1000)
renWin.Render()
iren.Start()
windowToimage = vtkWindowToImageFilter()
windowToimage.SetInput(ren.GetVTKWindow())
pnmWriter = vtkPNMWriter()
pnmWriter.SetInput(windowToimage.GetOutput())
pnmWriter.SetFileName("/tmp/plot.png")

renWin.Render()

pnmWriter.Write()
[snip]

If there are any disadvantages to this approach, I would really like to hear
about it.
Thank you.


Viswanathan Seshan.
GE Yokogawa Medical Systems
Email:Viswanathan.Seshan at med.ge.com


-----Original Message-----
From: vtkusers-admin at public.kitware.com
[mailto:vtkusers-admin at public.kitware.com]
Sent: Thursday, January 04, 2001 2:00 AM
To: vtkusers at public.kitware.com
Subject: vtkusers digest, Vol 1 #248 - 4 msgs

--__--__--

Message: 4
From: "Jorrit Schaap" <jorrit at lkeb.azl.nl>
To: "Prabhu Ramachandran" <prabhu at cyberwaveindia.com>,
"Christian Pfaffel" <flash at itp.tu-graz.ac.at>
Cc: <vtkusers at public.kitware.com>
Subject: RE: [vtkusers] Writing Pictures
Date: Wed, 3 Jan 2001 09:40:36 +0100
charset="iso-8859-1"

There's a better solution.

make a vtkWin32OffscreenRenderWindow (in the contrib directory).
Get the vtkRenderer from your current vtkRenderWindow and attach it to the
new offscreenrenderwindow.
attach the new offscreenrenderwindow to the vtkWindowToImageFilter. The rest
remains the same.

Good luck, Jorrit


>
>
> hi,
>
> >>>>> "Christian" == Christian Pfaffel <flash at itp.tu-graz.ac.at> writes:
>
> <snip>
>     Christian> when I try to write pictures and a window/taskbar is on
>     Christian> top of the renderwindow I get the window/taskbar on the
>     Christian> picture as well. I use code like this (iren is a
> <snip>
>
> Yeah, this happens (I dont know why) and the easiest solution is to
> "raise" the render window before you write it to an image.
>
> prabhu


--
Jorrit Schaap
Division of Image Processing
Leiden University Medical Center
+31 71 5266206




--__--__--

_______________________________________________
vtkusers mailing list
vtkusers at public.kitware.com
http://public.kitware.com/mailman/listinfo/vtkusers


End of vtkusers Digest




More information about the vtkusers mailing list