Antw: Re: [vtkusers] REPOST, (No Answer)- vtkImagePlaneWidget-TexturePlaneActor

Karl Fritscher Karl.Fritscher at umit.at
Thu Nov 18 05:05:15 EST 2004


Thank you very much. I ve been able to solve the problem. I treid to
convert the imagePlaneWidget->GetTexture()->GetInput() into an itk image
and tried to save it with the itk writer. For some reason this didn t
work. Then I tried to save it with the vtkTIFFWriter(just the way you
are proposing it), which also crashed. Thus, I tried the vtkBMPWriter
and for some reason it works with this writer, which is ok for me. (and
yes, it also works with the PNG writer. Maybe it was just a problem with
the dimensions.) Anyway, thank you very much again.

Karl


>>> cpbotha at gmail.com 11/17 11:45  >>>
On Wed, 17 Nov 2004 15:21:33 +0100, Karl Fritscher
<karl.fritscher at umit.at> wrote:
> Thanks for your help!! In fact all I wanna do is saving the "output"
of
> the texture plane actor. I tried
> imagePlaneWidget->GetTexture()->GetInput() and put this into a
writer,
> but unfortunately the program crashes when the writer should start
to
> write. Im very new to vtk and when you would have any idea
concerning
> this problem, I would really appreciate your comments.

Let's keep this on the list.  That way more people could possibly help
and these posts might turn up in searches later.

Can you show the few lines of code you used to write the input of the
vtkTexture?  Something like this should do the trick (untested Python,
translation to C++ straight-forward):

writer = vtk.vtkPNGWriter()
writer.SetInput(imagePlaneWidget->GetTexture()->GetInput())
writer.SetFileName('thetexture.png')
writer.Write()

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/



More information about the vtkusers mailing list