[Paraview] setting graphical window size

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue May 12 08:58:20 EDT 2009


John,

What are describing is not a bug at all. And even if you set the GUI size
explicitly before saving the image you will indeed get exactly the same
effect. Here's the reason: all 3D actors in the scene as positioned using 3D
world coordinates, however all 2D entities such as scalar bar, orientation
axes etc. are position using display coordinates. So whenever you change the
aspect ratio as dramatically as you are, you can expect considerable
placement changes with legends and such. For fun, setup the paraview gui and
then resize the paraview windows to mimic the aspect ratios you are using
and you shall see that the GUI behaves no differently.

Utkarsh

On Mon, May 11, 2009 at 7:25 PM, John <bitumen.surfer at gmail.com> wrote:

>  Hi Utkarsh,
>
> I did attempt to attach images to my original response. (as my wording
> indicated) - perhaps because of their nature and it being a mailing list
> they were pruned ? (for this reason I dropped the list from this email)
>
> Anyway - have attached three images to this email to illustrate.
> a) the first ("as_displayed.png"): I made no changes to the resolution when
> I saved this (760x620) so this is what I see on my screen layout. Call it
> the reference image (it's purely created for the purpose of displaying this
> issue - had to omit large sections of my image for proprietary reasons)
> b) "height_200.png" - ok, same screen layout. The only change is that
> during the "save screenshot" process I used a vertical resolution of 200
> (instead of 620). The resultant image has the dummy shrunk - but the legend
> has not changed scale (and actually obscures the foot slightly). Also the
> axes indicator has scaled down.
> c)  "width_1000.png" - same scenario as before, except this time I exported
> as a width of 1000 (versus 760 originally). In this image the axes indicator
> has not scaled visibly (but it did with a vertical change in resolution).
> Also the legend has increased in size (width and height - to maintain aspect
> ratio I suspect) - text size has also increased.
>
> The resultant issue is that some elements of an image behave differently
> depending on the chosen resolution - if I can't see (& specify) the
> resolution on my screen as I compose the image how do I know exactly what I
> will get when I save the screenshot. It is arising from the issue of
> repeatability - as numerical simulations conclude I want to be able to bring
> up the same viewing , angle, zoom, etc, as a previous image. However as my
> screen layout may have changed I was wanting to be able to specify the size
> of it (or failing that, be able to easily see its size so as to drag
> manually to that desired). Lookmarks don't work as the underlying dataset
> and elements may actually changed (different surfaces/filters, etc)
>
> In regard to setting the sizes, I'd only listed the options I'd
> found/played with - hadn't actually used the "Info" variants to set the
> size. Couldn't understand why a unique variant required as it was possible
> to obtain information from non "Info" name. Thanks for the heads up.
>
> Cheers,
>
> John
>
>
>
>
> Utkarsh Ayachit wrote:
>
> John,
>
> The "Info" properties are information-only properties which are used to get
> information about certain ivars from the server. These should never be set
> by the client/python script. These are managed by ParaView server manager.
>
> As far as specifying GUI size goes, you have set both GUISize and ViewSize;
> GUISize is the size of the entire view including all views in a multiview
> layout while view size is the size of each individual view. However it's not
> recommended to use these properties through the python shell in the GUI.
> (It's totally valid to use them in pvpython or pvbatch). Reason being the
> GUI is free to change them whenever it feel like to ensure that layout is
> correct.
>
> You say there are issues with legend which depend on actual GUI size, which
> is why you are not using the save image with resolution API. Can you attach
> a screenshot with the issue you are referring to?
>
> The axes indicators cannot be moved through python. You have to use "View
> Settings" (Edit|View Settings) for that.
>
> Utkarsh
>
> On Sun, May 10, 2009 at 10:01 PM, John <bitumen.surfer at gmail.com> wrote:
>
>> Hi David,
>>
>> David Doria wrote:
>>
>>
>>
>>  On Thu, May 7, 2009 at 1:28 AM, John <bitumen.surfer at gmail.com> wrote:
>>
>>>
>>> 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
>>> ?
>>>
>>>
>>>  _______________________________________________
>>>
>>
>>
>> Is it view.ViewSize you are looking for?
>>
>> http://www.paraview.org/Wiki/ParaView/Python_Scripting#Take_a_Screenshot_of_a_VTP_File
>> That is in my "outside paraview" area, which means I've only tried it from
>> a terminal, running the script with
>> pvpython ./script.py
>>
>>   Actually this page was part of my inspiration in writing my original
>> script (thanks BTW if you are responsible for this page). I guess I was
>> after the ability to change my GUI window to match what would be produced at
>> the 'save screenshot' stage. In part because we are not overly automating
>> each image and in general might be making tweaks to each image of a set. We
>> also wanted to avoid going to another program (i.e. gimp) to clip/resize our
>> image.
>> As we are not graphical experts (scientists/engineers) we are learning
>> some of this on the fly.
>> Our approach in the past has been to compose our image (w.r.t. to axes
>> indicators, legends, etc) based on what we can see. In this respect we are
>> used to setting our window size (perhaps scaled to fit display constraints)
>> and placing our objects on this canvas.
>>
>> Additionally, if the resolution we specify at 'save screenshot' stage is
>> different to what we can see in the GUI some elements do change. I've
>> attached two images to illustrate.
>> One is when we simply saved with no change to the resolution (760x620) the
>> other when we changed the width to 1000 (in the save GUI) and saved (because
>> this may match a previous image resolution to which we will compare with).
>> What happens is that some image elements are dependent, such as the legend
>> in this case. (& axes indicators also - but this seems to only apply to
>> height scaling from what I've seen - bug ?) Actually - I've attached 3
>> images - all produced from same GUI window, but with different export
>> resolutions.
>>
>> It was for this reason we wanted to be able to specify the GUI window
>> size. I've tried it, but with limited luck as I don't know how to (or which)
>> object controls the GUI.
>> I've tried setting these:
>> view.ViewSize=[900,700]
>> view.RenderWindowSizeInfo=[900,700]
>> view.RenderWindowSize=[900,700]
>> view.GUISize=[900,700]
>>
>> Separate queries:
>> 1)  what is the significance of the "Info" variants? 4 or 5 properties
>> seem to have a duplicate with only "Info" tacked onto the end of the name.
>> 2) Anyone know how to move/specify the location of the axes indicators ?
>>
>> Cheers,
>> John
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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/20090512/ef4ec2ac/attachment.htm>


More information about the ParaView mailing list