[Paraview] How to implement a multiview

pat marion pat.marion at kitware.com
Thu Jul 23 09:14:07 EDT 2009


Hi Jacques,

That depends on how familiar you are with paraview's servermanager c++ api
and pq (paraview qt) api.  I'm not sure what you had in mind, but you could
create a plugin that adds a panel/toolbar/menu to paraview in which you
provide a button that triggers some c++ code to setup the multiview for your
data.  Most of the c++ code could be written using just servermanager api,
but you'd have to touch some qt code to setup the view layout.

Except for the view layout problem, I think python is easier.  Often what
takes 10-20 lines in servermanager c++ takes just 1 line in python using the
paraview.simple module.

Pat

On Thu, Jul 23, 2009 at 4:32 AM, Jacques Papper <jacques.papper at gmail.com>wrote:

> It wouldn't be easier in C++ ?
> Jacques
>
>
> 2009/7/22 pat marion <pat.marion at kitware.com>
>
>> For a real solution I'd want to script it in python... the problem is that
>> you cannot easily specify the view layout in the gui from the python
>> interface.  Everything else can be done (creating views, camera links,
>> colormaps).  If you're interested, it might not be too hard to extend the
>> python interface to so that you can get the view layout that you want.
>> You'd have to get into paraview's qt code though.
>>
>> Pat
>>
>>
>> On Wed, Jul 22, 2009 at 12:38 PM, pat marion <pat.marion at kitware.com>wrote:
>>
>>> Correct, comparative view is only useful for viewing changes in filter
>>> properties or time.
>>>
>>> It may be possible to "cheat" to get comparative view to do some of what
>>> you want, but is definitely not an ideal solution...
>>>
>>> Instead of 1 dataset with 8 variables, save your dataset 8 times, each
>>> with a different variable but use the same variable name.  Now create a .pvd
>>> file that has 8 timesteps, each timestep points to one of the datasets.  The
>>> comparative view will automatically show one "timestep" in each view frame,
>>> but really you're looking at your 8 different data variables.  The cameras
>>> will be linked.  All datasets will have to share the same colormap.
>>>
>>> Pat
>>>
>>>
>>> On Wed, Jul 22, 2009 at 12:17 PM, Jacques Papper <
>>> jacques.papper at gmail.com> wrote:
>>>
>>>> I understand your example, but I am not interested in only 2
>>>> "dimensions" also, thes "dimensions" are filter properties to animate. What
>>>> I want is just to show as many views as I have of fields in my dataset
>>>> (Animation does not really matter at all). So I come back to my original
>>>> question.
>>>>
>>>> 2009/7/22 pat marion <pat.marion at kitware.com>
>>>>
>>>> Hi,
>>>>>
>>>>> Comparative view has two modes- filmstrip and comparative.  In
>>>>> filmstrip mode, only one variable changes and the views are ordered from
>>>>> left to right, top to bottom.  In comparative mode, you can specify an X
>>>>> dimension and a Y dimension and can have one variable change along X and
>>>>> another change along Y.
>>>>>
>>>>> Try this for a quick example:
>>>>>
>>>>> Create sphere source
>>>>> Convert view to 3D View (Comparative)
>>>>> Go to the View menu and toggle on the Comparative View Inspector
>>>>> Change the mode from filmstrip to comparative.
>>>>> Set 4 x frames and 4 y frames
>>>>> In Animated Source (X Axis) choose Phi Resolution as the Property To
>>>>> Animate
>>>>> Likewise, choose Theta Resolution for the Y Axis
>>>>> Use the timeline widgets below to step the phi and theta resolutions
>>>>> from 3 to 100.
>>>>> Click the Update Button (if you dont want to click the update button
>>>>> each time, change the Update Mode combobox from Root to All)
>>>>>
>>>>> Unforutnately when trying out this demo on my own computer I discovered
>>>>> a bug where some of the views do not get the correct property value :-(  Let
>>>>> me know if you have similar problems.
>>>>>
>>>>> Pat
>>>>>
>>>>>
>>>>> On Wed, Jul 22, 2009 at 8:28 AM, Jacques Papper <
>>>>> jacques.papper at gmail.com> wrote:
>>>>>
>>>>>> How do you specify the X and Y dimensions ?
>>>>>> How do you have one variable plotted per frame ? For example velocity
>>>>>> on the 1st quadrant, pressure on the 2nd, enthalpy on the 3rd etc .... ?
>>>>>>
>>>>>> 2009/7/22 David E DeMarle <dave.demarle at kitware.com>
>>>>>>
>>>>>> This is what comparative view is for.
>>>>>>> Pick one or two properties of any filter (or two) in the pipeline,
>>>>>>> specify the x and y dimensions and it will do it for you.
>>>>>>>
>>>>>>> David E DeMarle
>>>>>>> Kitware, Inc.
>>>>>>> R&D Engineer
>>>>>>> 28 Corporate Drive
>>>>>>> Clifton Park, NY 12065-8662
>>>>>>> Phone: 518-371-3971 x109
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jul 22, 2009 at 6:00 AM, Jacques Papper<
>>>>>>> jacques.papper at gmail.com> wrote:
>>>>>>> >
>>>>>>> > Hi,
>>>>>>> >
>>>>>>> > I would like to have the possibility to generate multiviews similar
>>>>>>> to the
>>>>>>> > one attached automatically.
>>>>>>> > That is, choose the variables to show, (let's say 8 variables for
>>>>>>> example),
>>>>>>> > and automatically have 8 subwindows that open up, with each camera
>>>>>>> linked to
>>>>>>> > the first window, and each colored by one of the variables, ideally
>>>>>>> with the
>>>>>>> > colormap for each as well, and the possibility to have all the
>>>>>>> colormap
>>>>>>> > ranges similar.
>>>>>>> > Do you think this is easily done, if so where should I start?
>>>>>>> > I would like to script or code this (either C++ or python).
>>>>>>> >
>>>>>>> > Thanks,
>>>>>>> > Jacques
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> > _______________________________________________
>>>>>>> > 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
>>>>>>> >
>>>>>>> >
>>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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/20090723/163730a3/attachment.htm>


More information about the ParaView mailing list