[Paraview] WriteImage Arguments

Andy Bauer andy.bauer at kitware.com
Tue Jul 17 12:15:46 EDT 2012


The third argument is a magnification factor.  I guess there wasn't a
default value of 1 set for the magnification factor so you need to put that
in automatically.

You should be able to just use WriteImage(<output file name>) without using
the view object. It determines the image output type from the file
extension.

Andy

On Tue, Jul 17, 2012 at 11:26 AM, Roba Binyahib
<roba.binyahib at kaust.edu.sa>wrote:

> Hello
>
> I'm want to write the result of this code to png file and I found the
> writer
>
> WriteImage()
>
> the thing is that in Paraview's tutorials I found the writer with two
> arguments like the following
>
>
> view.WriteImage("example.png","vtkPNGWriter")
>
> but when I run that from the termianl using pvpython I got an error says
> that WriteImage() takes three arguments, so I found the following in one of
> the websites
>
> view.WriteImage("example.png","vtkPNGWriter",1)
>
> and when I did that, it worked and wrote an image that has a size of
> 400*400
>
> when I changed the last argument to 2 I got an image that have the size
> 800*800
>
> so what does the third argument refers to ? and why is it not working with
> only two arguments ?
>
> hope someone can help
>
> thanks
>
> ------------------------------
> This message and its contents, including attachments are intended solely
> for the original recipient. If you are not the intended recipient or have
> received this message in error, please notify me immediately and delete
> this message from your computer system. Any unauthorized use or
> distribution is prohibited. Please consider the environment before printing
> this email.
> _______________________________________________
> 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 ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120717/eef34174/attachment.htm>


More information about the ParaView mailing list