[Paraview-developers] render window size
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Fri Apr 13 15:28:42 EDT 2012
You can do something like what pqTestingReaction::lockViewSizeCustom() does.
Utkarsh
On Tue, Apr 10, 2012 at 4:34 PM, Li Guan <li.9uan at gmail.com> wrote:
> I see. If that's the case, my other try would be to lock it in my plugin
> code.
> To be more specific, I am not trying to create a new window for my plugin,
> but just to resize and lock the original render window.
> Do you think this is doable?
>
> Li
>
>
>
> On Tue, Apr 10, 2012 at 4:14 PM, Utkarsh Ayachit
> <utkarsh.ayachit at kitware.com> wrote:
>>
>> Ah, in that case you cannot set the view size from Python, the Qt GUI
>> always overrides it. I don't think there's a way to lock the view size
>> from Python for the GUI currently.
>>
>> On Tue, Apr 10, 2012 at 3:51 PM, Li Guan <li.9uan at gmail.com> wrote:
>> > I am doing this in python shell..
>> >
>> > On Tue, Apr 10, 2012 at 3:50 PM, Utkarsh Ayachit
>> > <utkarsh.ayachit at kitware.com> wrote:
>> >>
>> >> Are you doing this in the QT GUI or pvpython?
>> >>
>> >> On Tue, Apr 10, 2012 at 3:20 PM, Li Guan <li.9uan at gmail.com> wrote:
>> >> > Thank you Utkarsh,
>> >> >
>> >> > But even if I do as you said, the actual view size is still [648,
>> >> > 507].
>> >> >
>> >> > In fact, you could try the following code out, and check the dumped
>> >> > image
>> >> > size to be the wrong size as well.
>> >> >
>> >> > GetRenderView().ViewSize = [640, 480];
>> >> >
>> >> > GetActiveView().GetRenderWindow().Render();
>> >> >
>> >> > WriteImage("./RGB.bmp");
>> >> >
>> >> >
>> >> > I just wonder if there is a way in python script that I can lock the
>> >> > view
>> >> > size to custom size [640,480], just like we click on the paraview
>> >> > tools
>> >> > ->
>> >> > Lock View Size Custom...?
>> >> >
>> >> > Best,
>> >> >
>> >> > Li
>> >
>> >
>
>
More information about the Paraview-developers
mailing list