Moreland, Kenneth wrote:
Re: [Paraview] setting graphical window size
When you write an image, you can specify a
resolution to use independent of the size of the GUI. If you type in
the same resolution every time, you should get the same projection.
Hmm, I did consider this (as mentioned below) but this approach has a
couple of issues and unknowns. Keep in mind that I'm after consistency
so that when I load up paraview days/weeks later that I can produce an
image that is comparable. Imagine that I compose my image in a 4:3
scaled window (say 1200x900) when I specify the resolution in the
export option does it clip/scale /keep the aspect ratio if the values I
select are different from the 1200x900. E.g. if I used 1100x1000 as my
export resolution (because it matched a previous instance), would I end
up with an image that was enlarged in one direction but reduced in the
other - or would it be clipped ? and if so how (equally from sides/
from one side ?) . I really don't want distorted images (at least not
inconsistently distorted images ;) ). P.S. I wouldn't actually use
this resolution, but was for sake of an example.
Plus the overall composition does depend on the window resolution/size.
This is easily verified:
a) add a legend to a 3D plot of your choice (also include orientation
axes on image)
b) orient legend horizontally (can use vertical - but mine is
horizontal)
c) drag the edge of window across to reduce horizontal size - the
legend scales itself based on the window dimension - but the axes do not
Ideally I want to capture the window dimensions in a python script (and
the camera & zoom also) so that I do have consistency &
repeatability. For reference I did try lookmarks, but this captures
other details and data that are not required. I only want to capture
the display setup and camera positioning.
Is there a webpage/file that lists the actions/properties associated
with the view class (as returned by
view = servermanager.GetRenderView() ) - found Vtk references but
haven't found the reference for the paraview classes
Cheers
John
On 5/6/09 11:28 PM, "John" <[email protected]> wrote:
Hi,
I'm using to paraview to create screenshots of multiple sets of data
(12+). Each dataset is located in a separate file and may have different
boundary conditions or different surfaces. (i.e. they are not identical
- although they *might* have elements in common and their domain size is
the same). I've written a simple script (below) using python to set my
camera angle the same between loading the state for each scenario
However, I have one difficulty, if I have exited paraview or resized the
windows (or ....@.. it crashed ) the size & aspect ratio of the
window
displaying my 3D view may change. This results in my screenshots have
differing resolutions i.e. my first series had 1198x712 but my next was
1106x780. I know you can specify this resolution in the save screenshot
dialog - however this is after the fact and some elements seem to differ
based on the real size (i.e. legends)
I can't seem to find an option to specify the size of this window, but I
assume I may be able to via python ? can anyone help with this ?
Also would love to know how to move the location of the orientation
axes ?
For reference, I am not a python programmer ( but can program C, C++,
Fortran ... ) so forgive any style mistakes.
Thanks, John
My quick script to set camera state is: (iso_L.py)
#!/usr/bin/env python
from paraview.servermanager import *
if not servermanager.ActiveConnection:
connection = servermanager.Connect()
view = servermanager.GetRenderView()
camera = view.GetActiveCamera()
view.CameraPosition=[0.5,-4,4]
view.CameraFocalPoint=[2.915, 0, 0.821]
view.CameraViewUp=[0, 0, 1]
view.CameraViewAngle=30
#view.ResetCamera()
view.StillRender()
_______________________________________________
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
**** Kenneth Moreland
*** Sandia National Laboratories
***********
*** *** *** email: [email protected]
** *** ** phone: (505) 844-8919
*** web: http://www.cs.unm.edu/~kmorel
|
_______________________________________________
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