[Paraview] Is There A 3d Widget Plugin Demo Available?

Christoffer Green christoffer.green at gmail.com
Wed Dec 14 04:30:54 EST 2011


After a bit of thinking/searching I have now managed to create a very
simple widget plugin. The problem was in me not understanding the vtk hints
file (finding documentation for how it worked was not easy). Here is a page
that explain it though:
http://wenku.baidu.com/view/df92936825c52cc58bd6bef5.html

Attached is a small sample file that creates a widget plugin if anyone ever
has need for it.

BR/ Christoffer

On Thu, Dec 8, 2011 at 10:53 AM, Christoffer Green <
christoffer.green at gmail.com> wrote:

> Thank you for your reply.
>
> Currently I have been attempting something along those lines, though I
> started with the vtkLineWidget2 instead of the vtkBoxWidget2. So I copied
> all the files that appeared to be needed and changed the names of the
> classes (this widget is going to be manipulating a plane so it got named
> PlaneWidget). I have a problem now however that I do not understand. The
> vtkLineRepresentation (vtkPlaneRepresentation now after name change) that
> got copied has a function called SetPoint1WorldPosition that takes an array
> of 3 double values as input.
> On creation of the widget this function gets called correctly once but
> then later on it gets called again but this time paraview tries to send an
> array with only 2 double values in it even thought this directly
> contradicts the xml definition for the function so then the generated
> vtkPlaneRepresentationClientServer function locator fails to find it. Does
> anybody have any clue why this is? I have tried to debug the call stack but
> i can not make any sense of it. I have attached a zip file of the widget
> source (after adding the plugin to paraview simply create a "Line Source
> Plane" from the sources menu to create the widget).
>
> """""""""""""" The error message i get is:
> ERROR: In
> ..\..\..\ParaView-3.12.0\ParaViewCore\ServerImplementation\vtkPVSessionCore.cxx,
> line 324
>
>  vtkPVSessionCore (09369450): Object type: vtkPlaneRepresentation, could
> not find requested method: "SetPoint1WorldPosition"
>
> or the method was called with incorrect arguments.
>
> while processing
>
> Message 0 = Invoke
>
> Argument 0 = vtk_object_pointer {vtkPlaneRepresentation (0C27AE80)}
>
> Argument 1 = string_value {SetPoint1WorldPosition}
>
> Argument 2 = float64_array {0, 0}
>
> """"""""""""""
>
> Thanks.
>
> BR/ Christoffer Green
>
>
>
> On Wed, Dec 7, 2011 at 3:51 PM, Robert Maynard <robert.maynard at kitware.com
> > wrote:
>
>> 3D widgets separate the logic of display from interaction be
>> specifying two classes. The widget class it self handles the
>> interaction, and a widget representation handles the how to display
>> the widget. The documentation for vtkBoxWidget2 is a good starting
>> place to understand the widget concept in VTK (
>> http://www.vtk.org/doc/nightly/html/classvtkBoxWidget2.html ).
>>
>> To register your custom made widget with ParaView follow the
>> directions found in this email conversation:
>> http://www.cmake.org/pipermail/paraview/2011-July/022122.html
>>
>>
>>
>> On Tue, Dec 6, 2011 at 10:07 AM, Christoffer Green
>> <christoffer.green at gmail.com> wrote:
>> > Hello!
>> >
>> > I have been trying to figure out how to write a 3d widget plugin for
>> > Paraview 3.12. By 3d widget I mean a widget in the 3d view like the
>> already
>> > available ones such as for implicit planes or lines. I am however
>> finding it
>> > hard to figure out what kind of things need to go into
>> the CMakeLists.txt
>> > and what classes are needed and such since it appears to be somewhat
>> > complicated. Is there an example of such a plugin available somewhere?
>> >
>> > Thanks.
>> >
>> > BR/ Christoffer Green
>> >
>> > _______________________________________________
>> > 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
>> >
>>
>>
>>
>> --
>> Robert Maynard
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20111214/0890aeb0/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FourFlowPlaneWidget.zip
Type: application/zip
Size: 20955 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20111214/0890aeb0/attachment-0001.zip>


More information about the ParaView mailing list