[Paraview-developers] custom object panel with additional information
Lodron, Gerald
Gerald.Lodron at joanneum.at
Mon Jan 27 05:49:14 EST 2014
Thanks, it worked!
But i can only use properties with number_of_elements=1, when i use mulitple number of elements it could not find the correct function definition....
I tried:
Void GetPlaneCoefficients( double& rdX, double& rdY, double& rdZ, double& rdD)
Void GetPlaneCoefficients( double* pdPl )
Void GetPlaneCoefficients( double a[4] )
Double* GetPlaneCoefficients()
With
<DoubleVectorProperty
name="PlaneCoefficients"
command="GetPlaneCoefficients"
number_of_elements="4"
information_only="1"
default_values="0 0 0 0">
</DoubleVectorProperty>
But all failed, now I wrote:
double GetPlaneCoefficientX();
double GetPlaneCoefficientY();
double GetPlaneCoefficientZ();
double GetPlaneCoefficientD();
with
<DoubleVectorProperty
name="PlaneCoefficientX"
command="GetPlaneCoefficientX"
number_of_elements="1"
information_only="1"
default_values="0">
<Documentation>
X value of planes normal vector.
</Documentation>
</DoubleVectorProperty>
<DoubleVectorProperty
name="PlaneCoefficientY"
command="GetPlaneCoefficientY"
number_of_elements="1"
information_only="1"
default_values="0">
<Documentation>
Y value of planes normal vector.
</Documentation>
</DoubleVectorProperty>
<DoubleVectorProperty
name="PlaneCoefficientZ"
command="GetPlaneCoefficientZ"
number_of_elements="1"
information_only="1"
default_values="0">
<Documentation>
Z value of planes normal vector.
</Documentation>
</DoubleVectorProperty>
<DoubleVectorProperty
name="PlaneCoefficientD"
command="GetPlaneCoefficientD"
number_of_elements="1"
information_only="1"
default_values="0">
<Documentation>
Distance value from origin to plane.
</Documentation>
</DoubleVectorProperty>
Which is a little bit nasty, anyone knows what I am making wrong?
Thanks, best regards,
Gerald
Von: Sebastien Jourdain [mailto:sebastien.jourdain at kitware.com]
Gesendet: Donnerstag, 23. Jänner 2014 15:21
An: Lodron, Gerald
Cc: Paraview Developer (Paraview-developers at paraview.org)
Betreff: Re: [Paraview-developers] custom object panel with additional information
Hi Gerald,
In your XML definition of your proxy you need to specify "an information" property. Like follow:
<IntVectorPropery command="GetLevelRange"
default_values="0 0"
information_only="1"
name="LevelRange"
number_of_elements="2">
</IntVectorPropery>
Then on the client side in order to get the value back, you will need to do something like that.
The code is based on memory not on actual real C++ code, but that should be enough to help you out.
proxy->UpdatePropertyInformation();
prop = vtkSMPropertyHelper(proxy, "LevelRange");
cout << prop.GetValue() << endl;
Seb
On Wed, Jan 22, 2014 at 11:55 PM, Lodron, Gerald <Gerald.Lodron at joanneum.at<mailto:Gerald.Lodron at joanneum.at>> wrote:
Hello
Is there a way to display some additional output from filter computation in the custom object panel or information panel? I programmed a custom paraview plugin with a filter and a custom object panel for some filter settings and now want to display some meta information of computation, e.g. Computation Time, Number of used iterations, etc....
I think I must overwrite the "updateInformationAndDomains()" function in my panel to set a QLabel for outputting such thinks but I have no clue how to get to the "GetProcessingTime" of my filter. I think it must be something like that:
vtkSMSourceProxy* poSourceProxy = vtkSMSourceProxy::SafeDownCast(this->proxy());
if( !poSourceProxy )
return;
vtkSMProperty* poProcessingTime = poSourceProxy->GetProperty("GetProcessingTime");
but I have no clue what to write into the xml or how to get the return value from GetProcessingTime....
I searched for an example doing this but cannot find anything, for any help I would be very thankful...
Best regards,
Gerald
_________________________________________________________________
JOANNEUM RESEARCH Forschungsgesellschaft mbH
DIGITAL - Institute for Information and Communication Technologies
Steyrergasse 17, 8010 Graz, Austria
phone: +43 316 876-1751<tel:%2B43%20316%20876-1751>
fax: +43 316 8769-1751<tel:%2B43%20316%208769-1751>
e-mail: gerald.lodron at joanneum.at<mailto:gerald.lodron at joanneum.at>
web: www.joanneum.at/digital<http://www.joanneum.at/digital>
_________________________________________________________________
This message and any attached files are confidential and intended solely for the addressee(s). Any publication, transmission or other use of the information by a person or entity other than the intended addressee(s) is prohibited. If you receive this in error please contact the sender and delete the material. The sender does not accept liability for any errors or omissions as a result of the transmission.
Please consider the environment before printing this page.
_______________________________________________
Paraview-developers mailing list
Paraview-developers at paraview.org<mailto:Paraview-developers at paraview.org>
http://public.kitware.com/mailman/listinfo/paraview-developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20140127/6f0c797c/attachment-0001.html>
More information about the Paraview-developers
mailing list