Re: [Paraview] Object Panel - Model Communication
Thanks for your responses. I know how to create a custom panel and how to use SimpleDoubleInformationHelper. My problem is how to get a DoubleArrayInformationHelper from a vtkDoubleArray with unknown size and send it to my custom panel. The compoment of this vtkDoubleArray ( called VolumesArray here) will be added in ResquestData(). I found a way to do it: XML: StringVectorProperty name=VolumesArray command=GetVolumesArray information_only=1 SimpleStringInformationHelper/ /StringVectorProperty In RequestData(), I will set VolumesArray to some values like 1223.44|2244.09|233232|... Note the | separator after each volume. In my .ui, I created a QLineEdit with the same name (VolumesArray). In my pqCustomPanel.cxx: pqComputeVolumes::pqComputeVolumes(pqProxy* pxy, QWidget* p) : pqLoadedFormObjectPanel(:/CustomWidget/pqComputeVolumes.ui, pxy, p) { this-volumes = this-findChildQLineEdit*(VolumesArray); this-volumesList = this-findChildQListWidget*(volumesList); this-volumes-setVisible(false); QObject::connect(this-volumes, SIGNAL(textChanged(const QString)), this, SLOT(onShowVolumesList(const QString)),Qt::QueuedConnection); this-linkServerManagerProperties(); } void pqComputeVolumes::onShowVolumesList(const QString text) { int i=0; QStringList list = text.split(|,QString::SkipEmptyParts); foreach( QString v, list) { i++; this-volumesList-addItem(Volume + QString::number(i) + + v); } } This works fine for me but I think there is an easier way. Nehme On Sat, 03 Jan 2009 21:08:46 -0700 Clinton Stimpson clin...@elemtech.com wrote: If its because its an information property, I think adding a show=1 attribute to the property will make it show up. Clint Utkarsh Ayachit wrote: You will have to create a custom panel. Look at the custom panel example in Examples/Plugin. Utkarsh On Sat, Jan 3, 2009 at 4:29 PM, Nehme Bilal nbi...@mirarco.org wrote: Hi, I am trying to use DoubleArrayInformationHelper to get a vtkDoubleArray from server side and show it in my filter GUI. XML code: DoubleVectorProperty name=volumesArray command=GetVolumesArray information_only=1 DoubleArrayInformationHelper/ /DoubleVectorProperty C++: vtkDoubleArray* GetVolumesArray() { return this-volumesArray; } The current code don't show anything in the GUI. I would like to see the content of volumesArray in a Table, List or a Tree widget. How can I do that ? Nehme From: Utkarsh Ayachit utkarsh.ayac...@kitware.com Subject: Re: [Paraview] Object Panel - Model Communication To: rafaelmar...@yahoo.com Cc: paraview@paraview.org Date: Tuesday, December 16, 2008, 2:17 PM To get back values from the server, you can use either information properties or information objects. Information properties are properites with information_only=1 set in the XML (eg. in Servers/ServerManager/Resources/rendering.xml the Camera proxy has CameraPositionInfo as an information property). Such properties need an InformationHelper which knows how to obtain the values from the server. For simple Get*() methods, you can use the SimpleDoubleInformationHelper/ or SimpleIntInformationHelper / etc. based on the type of the property. Complex information helpers can be written as well. Look at TimeStepsInformationHelper (vtkSMTimeStepsInformationHelper.h|cxx) as an example. Information objects are used to get data from server which cannot be simply put in a property for example information about the data object produced by a filter (vtkPVDataInformation). These are vtkPVInformation subclasses. You can create you own vtkPVInformation subclass that knows how to collect information and then serialize/deserialize it for transfer to the client from the server (if needed). To gather such information, one uses vtkProcessModule::GatherInformation(vtkIdType connectionID, vtkTypeUInt32 serverFlags, vtkPVInformation* info, vtkClientServerID id) where id is vtkSMProxy::GetID() returned for the proxy from which you want to collect the information. In your case, information property may be an easier solution -- if I understand your problem correctly. There is a pqServerManagerModel instance accessible as pqApplicationCore::instance()-getServerManagerModel() that can be used to access sources/filters their representations, views etc. Take a look at Qt/Core/pqServerManagerModel.h for the API. That should help you access the visualization pipeline. How to get, for instance, the ids of the nodes which are displayed after the application of a filter to the model ? Not sure I understand what you mean by that. Can you please elaborate? Utkarsh On Tue, Dec 16, 2008 at 6:38 AM, Rafael March rafaelmar...@yahoo.com wrote: Hey all, I'm
Re: [Paraview] Object Panel - Model Communication
Hi, I am trying to use DoubleArrayInformationHelper to get a vtkDoubleArray from server side and show it in my filter GUI. XML code: DoubleVectorProperty name=volumesArray command=GetVolumesArray information_only=1 DoubleArrayInformationHelper/ /DoubleVectorProperty C++: vtkDoubleArray* GetVolumesArray() { return this-volumesArray; } The current code don't show anything in the GUI. I would like to see the content of volumesArray in a Table, List or a Tree widget. How can I do that ? Nehme From: Utkarsh Ayachit utkarsh.ayac...@kitware.com Subject: Re: [Paraview] Object Panel - Model Communication To: rafaelmar...@yahoo.com Cc: paraview@paraview.org Date: Tuesday, December 16, 2008, 2:17 PM To get back values from the server, you can use either information properties or information objects. Information properties are properites with information_only=1 set in the XML (eg. in Servers/ServerManager/Resources/rendering.xml the Camera proxy has CameraPositionInfo as an information property). Such properties need an InformationHelper which knows how to obtain the values from the server. For simple Get*() methods, you can use the SimpleDoubleInformationHelper/ or SimpleIntInformationHelper / etc. based on the type of the property. Complex information helpers can be written as well. Look at TimeStepsInformationHelper (vtkSMTimeStepsInformationHelper.h|cxx) as an example. Information objects are used to get data from server which cannot be simply put in a property for example information about the data object produced by a filter (vtkPVDataInformation). These are vtkPVInformation subclasses. You can create you own vtkPVInformation subclass that knows how to collect information and then serialize/deserialize it for transfer to the client from the server (if needed). To gather such information, one uses vtkProcessModule::GatherInformation(vtkIdType connectionID, vtkTypeUInt32 serverFlags, vtkPVInformation* info, vtkClientServerID id) where id is vtkSMProxy::GetID() returned for the proxy from which you want to collect the information. In your case, information property may be an easier solution -- if I understand your problem correctly. There is a pqServerManagerModel instance accessible as pqApplicationCore::instance()-getServerManagerModel() that can be used to access sources/filters their representations, views etc. Take a look at Qt/Core/pqServerManagerModel.h for the API. That should help you access the visualization pipeline. How to get, for instance, the ids of the nodes which are displayed after the application of a filter to the model ? Not sure I understand what you mean by that. Can you please elaborate? Utkarsh On Tue, Dec 16, 2008 at 6:38 AM, Rafael March rafaelmar...@yahoo.com wrote: Hey all, I'm programming a filter with a custom Object Panel, and I'm feeling a little bit lost about the ParaView architecture and code design. My great problem is the comunication between the Object Panel and the Model. I know I can't have a pointer to my vtkUnstructuredGrid displayed, 'cause they are not necessarily at the same machine or process. I also know that I'm able to send information to the model through properties, since I can get the vtkSMProxy in my panel. But what about the way back ? Is there a way to send information from the display view to the panel ? How can I display in a QTable, for instance, the nodes of my model which have some property equals to 1 ? Another problem is the Visualization Pipeline: is there a way to walk on it ? I mean, if I have a filter name, am I able to get the the filter no matter where it is in the Pipeline ? Sorry for the mess with the questions. I hope I made it clear and someone can help me ! :) Regards, Rafael March. ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] Object Panel - Model Communication
You will have to create a custom panel. Look at the custom panel example in Examples/Plugin. Utkarsh On Sat, Jan 3, 2009 at 4:29 PM, Nehme Bilal nbi...@mirarco.org wrote: Hi, I am trying to use DoubleArrayInformationHelper to get a vtkDoubleArray from server side and show it in my filter GUI. XML code: DoubleVectorProperty name=volumesArray command=GetVolumesArray information_only=1 DoubleArrayInformationHelper/ /DoubleVectorProperty C++: vtkDoubleArray* GetVolumesArray() { return this-volumesArray; } The current code don't show anything in the GUI. I would like to see the content of volumesArray in a Table, List or a Tree widget. How can I do that ? Nehme From: Utkarsh Ayachit utkarsh.ayac...@kitware.com Subject: Re: [Paraview] Object Panel - Model Communication To: rafaelmar...@yahoo.com Cc: paraview@paraview.org Date: Tuesday, December 16, 2008, 2:17 PM To get back values from the server, you can use either information properties or information objects. Information properties are properites with information_only=1 set in the XML (eg. in Servers/ServerManager/Resources/rendering.xml the Camera proxy has CameraPositionInfo as an information property). Such properties need an InformationHelper which knows how to obtain the values from the server. For simple Get*() methods, you can use the SimpleDoubleInformationHelper/ or SimpleIntInformationHelper / etc. based on the type of the property. Complex information helpers can be written as well. Look at TimeStepsInformationHelper (vtkSMTimeStepsInformationHelper.h|cxx) as an example. Information objects are used to get data from server which cannot be simply put in a property for example information about the data object produced by a filter (vtkPVDataInformation). These are vtkPVInformation subclasses. You can create you own vtkPVInformation subclass that knows how to collect information and then serialize/deserialize it for transfer to the client from the server (if needed). To gather such information, one uses vtkProcessModule::GatherInformation(vtkIdType connectionID, vtkTypeUInt32 serverFlags, vtkPVInformation* info, vtkClientServerID id) where id is vtkSMProxy::GetID() returned for the proxy from which you want to collect the information. In your case, information property may be an easier solution -- if I understand your problem correctly. There is a pqServerManagerModel instance accessible as pqApplicationCore::instance()-getServerManagerModel() that can be used to access sources/filters their representations, views etc. Take a look at Qt/Core/pqServerManagerModel.h for the API. That should help you access the visualization pipeline. How to get, for instance, the ids of the nodes which are displayed after the application of a filter to the model ? Not sure I understand what you mean by that. Can you please elaborate? Utkarsh On Tue, Dec 16, 2008 at 6:38 AM, Rafael March rafaelmar...@yahoo.com wrote: Hey all, I'm programming a filter with a custom Object Panel, and I'm feeling a little bit lost about the ParaView architecture and code design. My great problem is the comunication between the Object Panel and the Model. I know I can't have a pointer to my vtkUnstructuredGrid displayed, 'cause they are not necessarily at the same machine or process. I also know that I'm able to send information to the model through properties, since I can get the vtkSMProxy in my panel. But what about the way back ? Is there a way to send information from the display view to the panel ? How can I display in a QTable, for instance, the nodes of my model which have some property equals to 1 ? Another problem is the Visualization Pipeline: is there a way to walk on it ? I mean, if I have a filter name, am I able to get the the filter no matter where it is in the Pipeline ? Sorry for the mess with the questions. I hope I made it clear and someone can help me ! :) Regards, Rafael March. ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] Object Panel - Model Communication
If its because its an information property, I think adding a show=1 attribute to the property will make it show up. Clint Utkarsh Ayachit wrote: You will have to create a custom panel. Look at the custom panel example in Examples/Plugin. Utkarsh On Sat, Jan 3, 2009 at 4:29 PM, Nehme Bilal nbi...@mirarco.org wrote: Hi, I am trying to use DoubleArrayInformationHelper to get a vtkDoubleArray from server side and show it in my filter GUI. XML code: DoubleVectorProperty name=volumesArray command=GetVolumesArray information_only=1 DoubleArrayInformationHelper/ /DoubleVectorProperty C++: vtkDoubleArray* GetVolumesArray() { return this-volumesArray; } The current code don't show anything in the GUI. I would like to see the content of volumesArray in a Table, List or a Tree widget. How can I do that ? Nehme From: Utkarsh Ayachit utkarsh.ayac...@kitware.com Subject: Re: [Paraview] Object Panel - Model Communication To: rafaelmar...@yahoo.com Cc: paraview@paraview.org Date: Tuesday, December 16, 2008, 2:17 PM To get back values from the server, you can use either information properties or information objects. Information properties are properites with information_only=1 set in the XML (eg. in Servers/ServerManager/Resources/rendering.xml the Camera proxy has CameraPositionInfo as an information property). Such properties need an InformationHelper which knows how to obtain the values from the server. For simple Get*() methods, you can use the SimpleDoubleInformationHelper/ or SimpleIntInformationHelper / etc. based on the type of the property. Complex information helpers can be written as well. Look at TimeStepsInformationHelper (vtkSMTimeStepsInformationHelper.h|cxx) as an example. Information objects are used to get data from server which cannot be simply put in a property for example information about the data object produced by a filter (vtkPVDataInformation). These are vtkPVInformation subclasses. You can create you own vtkPVInformation subclass that knows how to collect information and then serialize/deserialize it for transfer to the client from the server (if needed). To gather such information, one uses vtkProcessModule::GatherInformation(vtkIdType connectionID, vtkTypeUInt32 serverFlags, vtkPVInformation* info, vtkClientServerID id) where id is vtkSMProxy::GetID() returned for the proxy from which you want to collect the information. In your case, information property may be an easier solution -- if I understand your problem correctly. There is a pqServerManagerModel instance accessible as pqApplicationCore::instance()-getServerManagerModel() that can be used to access sources/filters their representations, views etc. Take a look at Qt/Core/pqServerManagerModel.h for the API. That should help you access the visualization pipeline. How to get, for instance, the ids of the nodes which are displayed after the application of a filter to the model ? Not sure I understand what you mean by that. Can you please elaborate? Utkarsh On Tue, Dec 16, 2008 at 6:38 AM, Rafael March rafaelmar...@yahoo.com wrote: Hey all, I'm programming a filter with a custom Object Panel, and I'm feeling a little bit lost about the ParaView architecture and code design. My great problem is the comunication between the Object Panel and the Model. I know I can't have a pointer to my vtkUnstructuredGrid displayed, 'cause they are not necessarily at the same machine or process. I also know that I'm able to send information to the model through properties, since I can get the vtkSMProxy in my panel. But what about the way back ? Is there a way to send information from the display view to the panel ? How can I display in a QTable, for instance, the nodes of my model which have some property equals to 1 ? Another problem is the Visualization Pipeline: is there a way to walk on it ? I mean, if I have a filter name, am I able to get the the filter no matter where it is in the Pipeline ? Sorry for the mess with the questions. I hope I made it clear and someone can help me ! :) Regards, Rafael March. ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] Object Panel - Model Communication
Rafael, You are correct. DataSetAttributesInformation cannot provide you with the actual data. I guess you will have fetch the whole data client. Utkarsh On Thu, Dec 18, 2008 at 11:04 AM, Rafael March rafaelmar...@yahoo.com wrote: Utkarsh, actually I would like to get vtkPointData from Server, the nodes global id's. I'm taking a look at the 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... Regards, Rafael. --- On Wed, 12/17/08, Utkarsh Ayachit utkarsh.ayac...@kitware.com wrote: From: Utkarsh Ayachit utkarsh.ayac...@kitware.com Subject: Re: [Paraview] Object Panel - Model Communication To: rafaelmar...@yahoo.com Cc: paraview@paraview.org Date: Wednesday, December 17, 2008, 9:32 PM Rafael, It is possible to get the output of a filter in a custom panel. But it most certainly is not recommended. Fetching data from the output of any filter/source should be done only by views such as the render view/xy line plot view/ spreadsheet view etc. However if you insist on getting the data to the client side create a client-delivery representation. Look at the implementation of Fetch() function in Utilities/VTKPythonWrapping/paraview/servermanager.py for details. However I'd still recommend to rethink -- do you really need the full data or just some meta-data that can be obtained from the vtkPVDataInformation associated with the input? Utkarsh On Wed, Dec 17, 2008 at 10:58 AM, Rafael March rafaelmar...@yahoo.com wrote: Thanks a lot Utkarsh, I'm already testing and learning about the Information Properties, and I realized this is exactly what I need, concerning the Client/Server Communication. Let me try to explain what I asked about the visualization pipeline: Suppose I have an unstructured grid.Then, my filter associate an integer number, from 0 to 6, to each cell, according to an algorithm. My filter also implements a custom object panel. Then I clip my model, through the Clip Filter. Is it possible to get the output of the Clip (that is, the nodes that weren't cutted off )from my custom filter code (which stays before the Clip filter in the pipeline) ? Regards, Rafael March. --- On Tue, 12/16/08, Utkarsh Ayachit utkarsh.ayac...@kitware.com wrote: From: Utkarsh Ayachit utkarsh.ayac...@kitware.com Subject: Re: [Paraview] Object Panel - Model Communication To: rafaelmar...@yahoo.com Cc: paraview@paraview.org Date: Tuesday, December 16, 2008, 2:17 PM To get back values from the server, you can use either information properties or information objects. Information properties are properites with information_only=1 set in the XML (eg. in Servers/ServerManager/Resources/rendering.xml the Camera proxy has CameraPositionInfo as an information property). Such properties need an InformationHelper which knows how to obtain the values from the server. For simple Get*() methods, you can use the SimpleDoubleInformationHelper/ or SimpleIntInformationHelper / etc. based on the type of the property. Complex information helpers can be written as well. Look at TimeStepsInformationHelper (vtkSMTimeStepsInformationHelper.h|cxx) as an example. Information objects are used to get data from server which cannot be simply put in a property for example information about the data object produced by a filter (vtkPVDataInformation). These are vtkPVInformation subclasses. You can create you own vtkPVInformation subclass that knows how to collect information and then serialize/deserialize it for transfer to the client from the server (if needed). To gather such information, one uses vtkProcessModule::GatherInformation(vtkIdType connectionID, vtkTypeUInt32 serverFlags, vtkPVInformation* info, vtkClientServerID id) where id is vtkSMProxy::GetID() returned for the proxy from which you want to collect the information. In your case, information property may be an easier solution -- if I understand your problem correctly. There is a pqServerManagerModel instance accessible as pqApplicationCore::instance()-getServerManagerModel() that can be used to access sources/filters their representations, views etc. Take a look at Qt/Core/pqServerManagerModel.h for the API. That should help you access the visualization pipeline. How to get, for instance, the ids of the nodes which are displayed after the application of a filter to the model ? Not sure I understand what you mean by that. Can you please elaborate? Utkarsh On Tue, Dec 16, 2008 at 6:38 AM, Rafael March rafaelmar...@yahoo.com wrote: Hey all, I'm programming a filter with a custom Object Panel, and I'm feeling a little bit lost about the ParaView architecture and code design. My great problem is the comunication between the Object Panel and the Model. I know I can't have a pointer to my vtkUnstructuredGrid displayed, 'cause
Re: [Paraview] Object Panel - Model Communication
Utkarsh, actually I would like to get vtkPointData from Server, the nodes global id's. I'm taking a look at the 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... Regards, Rafael. --- On Wed, 12/17/08, Utkarsh Ayachit utkarsh.ayac...@kitware.com wrote: From: Utkarsh Ayachit utkarsh.ayac...@kitware.com Subject: Re: [Paraview] Object Panel - Model Communication To: rafaelmar...@yahoo.com Cc: paraview@paraview.org Date: Wednesday, December 17, 2008, 9:32 PM Rafael, It is possible to get the output of a filter in a custom panel. But it most certainly is not recommended. Fetching data from the output of any filter/source should be done only by views such as the render view/xy line plot view/ spreadsheet view etc. However if you insist on getting the data to the client side create a client-delivery representation. Look at the implementation of Fetch() function in Utilities/VTKPythonWrapping/paraview/servermanager.py for details. However I'd still recommend to rethink -- do you really need the full data or just some meta-data that can be obtained from the vtkPVDataInformation associated with the input? Utkarsh On Wed, Dec 17, 2008 at 10:58 AM, Rafael March rafaelmar...@yahoo.com wrote: Thanks a lot Utkarsh, I'm already testing and learning about the Information Properties, and I realized this is exactly what I need, concerning the Client/Server Communication. Let me try to explain what I asked about the visualization pipeline: Suppose I have an unstructured grid.Then, my filter associate an integer number, from 0 to 6, to each cell, according to an algorithm. My filter also implements a custom object panel. Then I clip my model, through the Clip Filter. Is it possible to get the output of the Clip (that is, the nodes that weren't cutted off )from my custom filter code (which stays before the Clip filter in the pipeline) ? Regards, Rafael March. --- On Tue, 12/16/08, Utkarsh Ayachit utkarsh.ayac...@kitware.com wrote: From: Utkarsh Ayachit utkarsh.ayac...@kitware.com Subject: Re: [Paraview] Object Panel - Model Communication To: rafaelmar...@yahoo.com Cc: paraview@paraview.org Date: Tuesday, December 16, 2008, 2:17 PM To get back values from the server, you can use either information properties or information objects. Information properties are properites with information_only=1 set in the XML (eg. in Servers/ServerManager/Resources/rendering.xml the Camera proxy has CameraPositionInfo as an information property). Such properties need an InformationHelper which knows how to obtain the values from the server. For simple Get*() methods, you can use the SimpleDoubleInformationHelper/ or SimpleIntInformationHelper / etc. based on the type of the property. Complex information helpers can be written as well. Look at TimeStepsInformationHelper (vtkSMTimeStepsInformationHelper.h|cxx) as an example. Information objects are used to get data from server which cannot be simply put in a property for example information about the data object produced by a filter (vtkPVDataInformation). These are vtkPVInformation subclasses. You can create you own vtkPVInformation subclass that knows how to collect information and then serialize/deserialize it for transfer to the client from the server (if needed). To gather such information, one uses vtkProcessModule::GatherInformation(vtkIdType connectionID, vtkTypeUInt32 serverFlags, vtkPVInformation* info, vtkClientServerID id) where id is vtkSMProxy::GetID() returned for the proxy from which you want to collect the information. In your case, information property may be an easier solution -- if I understand your problem correctly. There is a pqServerManagerModel instance accessible as pqApplicationCore::instance()-getServerManagerModel() that can be used to access sources/filters their representations, views etc. Take a look at Qt/Core/pqServerManagerModel.h for the API. That should help you access the visualization pipeline. How to get, for instance, the ids of the nodes which are displayed after the application of a filter to the model ? Not sure I understand what you mean by that. Can you please elaborate? Utkarsh On Tue, Dec 16, 2008 at 6:38 AM, Rafael March rafaelmar...@yahoo.com wrote: Hey all, I'm programming a filter with a custom Object Panel, and I'm feeling a little bit lost about the ParaView architecture and code design. My great problem is the comunication between the Object Panel and the Model. I know I can't have a pointer to my vtkUnstructuredGrid displayed, 'cause they are not necessarily at the same machine or process. I also know that I'm able to send information to the model through properties, since I can get the vtkSMProxy in my panel. But what about the way back ? Is there a way to send information from the display view to the panel ? How
Re: [Paraview] Object Panel - Model Communication
Thanks a lot Utkarsh, I'm already testing and learning about the Information Properties, and I realized this is exactly what I need, concerning the Client/Server Communication. Let me try to explain what I asked about the visualization pipeline: Suppose I have an unstructured grid.Then, my filter associate an integer number, from 0 to 6, to each cell, according to an algorithm. My filter also implements a custom object panel. Then I clip my model, through the Clip Filter. Is it possible to get the output of the Clip (that is, the nodes that weren't cutted off )from my custom filter code (which stays before the Clip filter in the pipeline) ? Regards, Rafael March. --- On Tue, 12/16/08, Utkarsh Ayachit utkarsh.ayac...@kitware.com wrote: From: Utkarsh Ayachit utkarsh.ayac...@kitware.com Subject: Re: [Paraview] Object Panel - Model Communication To: rafaelmar...@yahoo.com Cc: paraview@paraview.org Date: Tuesday, December 16, 2008, 2:17 PM To get back values from the server, you can use either information properties or information objects. Information properties are properites with information_only=1 set in the XML (eg. in Servers/ServerManager/Resources/rendering.xml the Camera proxy has CameraPositionInfo as an information property). Such properties need an InformationHelper which knows how to obtain the values from the server. For simple Get*() methods, you can use the SimpleDoubleInformationHelper/ or SimpleIntInformationHelper / etc. based on the type of the property. Complex information helpers can be written as well. Look at TimeStepsInformationHelper (vtkSMTimeStepsInformationHelper.h|cxx) as an example. Information objects are used to get data from server which cannot be simply put in a property for example information about the data object produced by a filter (vtkPVDataInformation). These are vtkPVInformation subclasses. You can create you own vtkPVInformation subclass that knows how to collect information and then serialize/deserialize it for transfer to the client from the server (if needed). To gather such information, one uses vtkProcessModule::GatherInformation(vtkIdType connectionID, vtkTypeUInt32 serverFlags, vtkPVInformation* info, vtkClientServerID id) where id is vtkSMProxy::GetID() returned for the proxy from which you want to collect the information. In your case, information property may be an easier solution -- if I understand your problem correctly. There is a pqServerManagerModel instance accessible as pqApplicationCore::instance()-getServerManagerModel() that can be used to access sources/filters their representations, views etc. Take a look at Qt/Core/pqServerManagerModel.h for the API. That should help you access the visualization pipeline. How to get, for instance, the ids of the nodes which are displayed after the application of a filter to the model ? Not sure I understand what you mean by that. Can you please elaborate? Utkarsh On Tue, Dec 16, 2008 at 6:38 AM, Rafael March rafaelmar...@yahoo.com wrote: Hey all, I'm programming a filter with a custom Object Panel, and I'm feeling a little bit lost about the ParaView architecture and code design. My great problem is the comunication between the Object Panel and the Model. I know I can't have a pointer to my vtkUnstructuredGrid displayed, 'cause they are not necessarily at the same machine or process. I also know that I'm able to send information to the model through properties, since I can get the vtkSMProxy in my panel. But what about the way back ? Is there a way to send information from the display view to the panel ? How can I display in a QTable, for instance, the nodes of my model which have some property equals to 1 ? Another problem is the Visualization Pipeline: is there a way to walk on it ? I mean, if I have a filter name, am I able to get the the filter no matter where it is in the Pipeline ? Sorry for the mess with the questions. I hope I made it clear and someone can help me ! :) Regards, Rafael March. ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] Object Panel - Model Communication
Rafael, It is possible to get the output of a filter in a custom panel. But it most certainly is not recommended. Fetching data from the output of any filter/source should be done only by views such as the render view/xy line plot view/ spreadsheet view etc. However if you insist on getting the data to the client side create a client-delivery representation. Look at the implementation of Fetch() function in Utilities/VTKPythonWrapping/paraview/servermanager.py for details. However I'd still recommend to rethink -- do you really need the full data or just some meta-data that can be obtained from the vtkPVDataInformation associated with the input? Utkarsh On Wed, Dec 17, 2008 at 10:58 AM, Rafael March rafaelmar...@yahoo.com wrote: Thanks a lot Utkarsh, I'm already testing and learning about the Information Properties, and I realized this is exactly what I need, concerning the Client/Server Communication. Let me try to explain what I asked about the visualization pipeline: Suppose I have an unstructured grid.Then, my filter associate an integer number, from 0 to 6, to each cell, according to an algorithm. My filter also implements a custom object panel. Then I clip my model, through the Clip Filter. Is it possible to get the output of the Clip (that is, the nodes that weren't cutted off )from my custom filter code (which stays before the Clip filter in the pipeline) ? Regards, Rafael March. --- On Tue, 12/16/08, Utkarsh Ayachit utkarsh.ayac...@kitware.com wrote: From: Utkarsh Ayachit utkarsh.ayac...@kitware.com Subject: Re: [Paraview] Object Panel - Model Communication To: rafaelmar...@yahoo.com Cc: paraview@paraview.org Date: Tuesday, December 16, 2008, 2:17 PM To get back values from the server, you can use either information properties or information objects. Information properties are properites with information_only=1 set in the XML (eg. in Servers/ServerManager/Resources/rendering.xml the Camera proxy has CameraPositionInfo as an information property). Such properties need an InformationHelper which knows how to obtain the values from the server. For simple Get*() methods, you can use the SimpleDoubleInformationHelper/ or SimpleIntInformationHelper / etc. based on the type of the property. Complex information helpers can be written as well. Look at TimeStepsInformationHelper (vtkSMTimeStepsInformationHelper.h|cxx) as an example. Information objects are used to get data from server which cannot be simply put in a property for example information about the data object produced by a filter (vtkPVDataInformation). These are vtkPVInformation subclasses. You can create you own vtkPVInformation subclass that knows how to collect information and then serialize/deserialize it for transfer to the client from the server (if needed). To gather such information, one uses vtkProcessModule::GatherInformation(vtkIdType connectionID, vtkTypeUInt32 serverFlags, vtkPVInformation* info, vtkClientServerID id) where id is vtkSMProxy::GetID() returned for the proxy from which you want to collect the information. In your case, information property may be an easier solution -- if I understand your problem correctly. There is a pqServerManagerModel instance accessible as pqApplicationCore::instance()-getServerManagerModel() that can be used to access sources/filters their representations, views etc. Take a look at Qt/Core/pqServerManagerModel.h for the API. That should help you access the visualization pipeline. How to get, for instance, the ids of the nodes which are displayed after the application of a filter to the model ? Not sure I understand what you mean by that. Can you please elaborate? Utkarsh On Tue, Dec 16, 2008 at 6:38 AM, Rafael March rafaelmar...@yahoo.com wrote: Hey all, I'm programming a filter with a custom Object Panel, and I'm feeling a little bit lost about the ParaView architecture and code design. My great problem is the comunication between the Object Panel and the Model. I know I can't have a pointer to my vtkUnstructuredGrid displayed, 'cause they are not necessarily at the same machine or process. I also know that I'm able to send information to the model through properties, since I can get the vtkSMProxy in my panel. But what about the way back ? Is there a way to send information from the display view to the panel ? How can I display in a QTable, for instance, the nodes of my model which have some property equals to 1 ? Another problem is the Visualization Pipeline: is there a way to walk on it ? I mean, if I have a filter name, am I able to get the the filter no matter where it is in the Pipeline ? Sorry for the mess with the questions. I hope I made it clear and someone can help me ! :) Regards, Rafael March. ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview
[Paraview] Object Panel - Model Communication
Hey all, I'm programming a filter with a custom Object Panel, and I'm feeling a little bit lost about the ParaView architecture and code design. My great problem is the comunication between the Object Panel and the Model. I know I can't have a pointer to my vtkUnstructuredGrid displayed, 'cause they are not necessarily at the same machine or process. I also know that I'm able to send information to the model through properties, since I can get the vtkSMProxy in my panel. But what about the way back ? Is there a way to send information from the display view to the panel ? How can I display in a QTable, for instance, the nodes of my model which have some property equals to 1 ? Another problem is the Visualization Pipeline: is there a way to walk on it ? I mean, if I have a filter name, am I able to get the the filter no matter where it is in the Pipeline ? How to get, for instance, the ids of the nodes which are displayed after the application of a filter to the model ? Sorry for the mess with the questions. I hope I made it clear and someone can help me ! :) Regards, Rafael March. ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] Object Panel - Model Communication
To get back values from the server, you can use either information properties or information objects. Information properties are properites with information_only=1 set in the XML (eg. in Servers/ServerManager/Resources/rendering.xml the Camera proxy has CameraPositionInfo as an information property). Such properties need an InformationHelper which knows how to obtain the values from the server. For simple Get*() methods, you can use the SimpleDoubleInformationHelper/ or SimpleIntInformationHelper / etc. based on the type of the property. Complex information helpers can be written as well. Look at TimeStepsInformationHelper (vtkSMTimeStepsInformationHelper.h|cxx) as an example. Information objects are used to get data from server which cannot be simply put in a property for example information about the data object produced by a filter (vtkPVDataInformation). These are vtkPVInformation subclasses. You can create you own vtkPVInformation subclass that knows how to collect information and then serialize/deserialize it for transfer to the client from the server (if needed). To gather such information, one uses vtkProcessModule::GatherInformation(vtkIdType connectionID, vtkTypeUInt32 serverFlags, vtkPVInformation* info, vtkClientServerID id) where id is vtkSMProxy::GetID() returned for the proxy from which you want to collect the information. In your case, information property may be an easier solution -- if I understand your problem correctly. There is a pqServerManagerModel instance accessible as pqApplicationCore::instance()-getServerManagerModel() that can be used to access sources/filters their representations, views etc. Take a look at Qt/Core/pqServerManagerModel.h for the API. That should help you access the visualization pipeline. How to get, for instance, the ids of the nodes which are displayed after the application of a filter to the model ? Not sure I understand what you mean by that. Can you please elaborate? Utkarsh On Tue, Dec 16, 2008 at 6:38 AM, Rafael March rafaelmar...@yahoo.com wrote: Hey all, I'm programming a filter with a custom Object Panel, and I'm feeling a little bit lost about the ParaView architecture and code design. My great problem is the comunication between the Object Panel and the Model. I know I can't have a pointer to my vtkUnstructuredGrid displayed, 'cause they are not necessarily at the same machine or process. I also know that I'm able to send information to the model through properties, since I can get the vtkSMProxy in my panel. But what about the way back ? Is there a way to send information from the display view to the panel ? How can I display in a QTable, for instance, the nodes of my model which have some property equals to 1 ? Another problem is the Visualization Pipeline: is there a way to walk on it ? I mean, if I have a filter name, am I able to get the the filter no matter where it is in the Pipeline ? Sorry for the mess with the questions. I hope I made it clear and someone can help me ! :) Regards, Rafael March. ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview