<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Utkarsh,<br><br>actually I would like to get vtkPointData from Server, the nodes global id's. I'm taking a look at the<span style="text-decoration: underline;"></span> vtkPVDataSetAttributesInformation class, but I don't think it will provide this information, am I right ? As a meta data, I can't get really the data, just some information about it...<br><br>Regards,<br>Rafael.<br>--- On <b>Wed, 12/17/08, Utkarsh Ayachit <i><utkarsh.ayachit@kitware.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">From: Utkarsh Ayachit <utkarsh.ayachit@kitware.com><br>Subject: Re: [Paraview] Object Panel <-> Model Communication<br>To: rafaelmarch3@yahoo.com<br>Cc: paraview@paraview.org<br>Date: Wednesday, December 17, 2008, 9:32 PM<br><br><pre>Rafael,<br><br>It is possible to get the output
of a filter in a custom panel. But it<br>most certainly is not recommended. Fetching data from the output of<br>any filter/source should be done only by views such as the render<br>view/xy line plot view/ spreadsheet view etc. However if you insist on<br>getting the data to the client side create a client-delivery<br>representation. Look at the implementation of "Fetch()" function in<br>Utilities/VTKPythonWrapping/paraview/servermanager.py for details.<br>However I'd still recommend to rethink -- do you really need the full<br>data or just some meta-data that can be obtained from the<br>vtkPVDataInformation associated with the input?<br><br>Utkarsh<br><br>On Wed, Dec 17, 2008 at 10:58 AM, Rafael March <rafaelmarch3@yahoo.com><br>wrote:<br>> Thanks a lot Utkarsh,<br>><br>> I'm already testing and learning about the Information Properties, and<br>I<br>> realized this is exactly what I need, concerning the Client/Server<br>>
Communication.<br>><br>> Let me try to explain what I asked about the visualization pipeline:<br>> Suppose I have an unstructured grid.Then, my filter associate an integer<br>> number, from 0 to 6, to each cell, according to an algorithm. My filter<br>also<br>> implements a custom object panel. Then I clip my model, through the Clip<br>> Filter. Is it possible to get the output of the Clip (that is, the nodes<br>> that weren't cutted off )from my custom filter code (which stays<br>before the<br>> Clip filter in the pipeline) ?<br>><br>> Regards,<br>> Rafael March.<br>><br>> --- On Tue, 12/16/08, Utkarsh Ayachit <utkarsh.ayachit@kitware.com><br>wrote:<br>><br>> From: Utkarsh Ayachit <utkarsh.ayachit@kitware.com><br>> Subject: Re: [Paraview] Object Panel <-> Model Communication<br>> To: rafaelmarch3@yahoo.com<br>> Cc: paraview@paraview.org<br>> Date: Tuesday, December 16, 2008,
2:17 PM<br>><br>> To get back "values" from the server, you can use either<br>> "information<br>> properties" or "information objects".<br>><br>> Information properties are properites with information_only="1"<br>set<br>> in<br>> the XML (eg. in Servers/ServerManager/Resources/rendering.xml the<br>> "Camera" proxy has "CameraPositionInfo" as an<br>information<br>> property).<br>> Such properties need an "InformationHelper" which knows how to<br>obtain<br>> the values from the server. For simple Get*() methods, you can use the<br>> <SimpleDoubleInformationHelper/> or <SimpleIntInformationHelper<br>/><br>> etc. based on the type of the property. Complex information helpers<br>> can be written as well. Look at<br>> TimeStepsInformationHelper<br>> (vtkSMTimeStepsInformationHelper.h|cxx) as an example.<br>><br>> Information objects are used to get data from server which cannot be<br>>
simply put in a property for example information about the data object<br>> produced by a filter (vtkPVDataInformation). These are<br>> vtkPVInformation subclasses. You can create you own vtkPVInformation<br>> subclass that knows how to collect information and then<br>> serialize/deserialize it for transfer to the client from the server<br>> (if needed). To gather such information, one uses<br>> vtkProcessModule::GatherInformation(vtkIdType connectionID,<br>> vtkTypeUInt32 serverFlags, vtkPVInformation* info, vtkClientServerID<br>> id) where "id" is vtkSMProxy::GetID() returned for the proxy<br>from<br>> which you want to collect the information.<br>><br>> In your case, information property may be an easier solution -- if I<br>> understand your problem correctly.<br>><br>> There is a pqServerManagerModel instance<br>> accessible as<br>> pqApplicationCore::instance()->getServerManagerModel() that can
be<br>> used to access sources/filters their representations, views etc. Take<br>> a look at Qt/Core/pqServerManagerModel.h for the API. That should help<br>> you access the visualization pipeline.<br>><br>> "How to get, for instance, the ids of the nodes which are displayed<br>> after the application of a filter to the model ?"<br>> Not sure I understand what you mean by that. Can you please elaborate?<br>><br>> Utkarsh<br>><br>> On Tue, Dec 16, 2008 at 6:38 AM, Rafael March<br><rafaelmarch3@yahoo.com><br>> wrote:<br>>> Hey all,<br>>><br>>> I'm programming a filter with a custom Object Panel,<br>>> and I'm feeling a little bit lost about the ParaView architecture<br>and<br>>> code design.<br>>><br>>> My great problem is the comunication between the<br>>> Object Panel and the Model. I know I can't have a pointer to my<br>>> vtkUnstructuredGrid displayed,
'cause they are not<br>> necessarily at the<br>>> same machine or process. I also know that I'm able to send<br>information<br>>> to the model through properties, since I can get the vtkSMProxy in my<br>>> panel. But what about the way back ? Is there a way to send<br>information<br>>> from the display view to the panel ? How can I display in a QTable,<br>for<br>>> instance, the nodes of my model which have some property equals to 1 ?<br>>><br>>> Another problem is the Visualization Pipeline: is there a way to<br>> "walk" on<br>>> it ?<br>>> I mean, if I have a filter name, am I able to get the the filter no<br>>> matter where it is in the Pipeline ?<br>>><br>>> Sorry for the mess with the questions. I hope I made it clear and<br>someone<br>>> can help me ! :)<br>>><br>>> Regards,<br>>> Rafael March.<br>>><br>>>
_______________________________________________<br>>> ParaView mailing list<br>>> ParaView@paraview.org<br>>><br>> http://www.paraview.org/mailman/listinfo/paraview<br>>><br>>><br>><br>><br>> _______________________________________________<br>> ParaView mailing list<br>> ParaView@paraview.org<br>> http://www.paraview.org/mailman/listinfo/paraview<br>><br>><br></pre></blockquote></td></tr></table><br>