<html><head><style> body {height: 100%; color:#000000; font-size:12pt; font-family:Times New Roman;}</style></head><body>That really helpful your reply.<br><span>But, I always have errors with&nbsp;</span><br><span>===========================================================</span><br>&nbsp; &nbsp;&lt;DoubleVectorProperty name="OpThreshold" &nbsp;command="SetOpThreshold" number_of_elements ="1" default_values="0"&gt;<br>&nbsp; &nbsp;&lt;/DoubleVectorProperty&gt;&nbsp;&nbsp; &nbsp;<br>&nbsp; &nbsp; And normaly, I can entre a value in a box in ParaView GUI. but I have a Core Dump, here is what I have as error :&nbsp;<br>&nbsp;<br>paraview: /home/thtran/PV/ParaView/src/ParaViewCore/ServerImplementation/vtkSIProxy.cxx:453: virtual bool vtkSIProxy::ReadXMLProperty(vtkPVXMLElement*): Assertion `!name.empty() && this-&gt;GetSIProperty(name.c_str()) == __null' failed.<br>Aborted (core dumped)<br><span>&nbsp;=============================================================</span>&nbsp;<br><br><span>It's just a simple tab for Adding GUI parameters, so I don't know where is the error comes from. There is nothing "empty" as we analyse the error.</span><br><br><br><br><span>&nbsp;</span><br>----- Original Message -----<br>From: David E DeMarle &lt;dave.demarle@kitware.com&gt;<br>To: Tuan Ha Tran &lt;tuan-ha.tran@insa-lyon.fr&gt;<br>Cc: paraview-developers@paraview.org, paraview@paraview.org<br>Sent: Thu, 07 Jun 2012 17:21:55 +0200 (CEST)<br>Subject: Re: [Paraview] ParaView Plugin .xml how to<br><br>Your c++ class has:<br>double calculateOptimalThreshold(vtkImageData *voi)<br><br>But your xml property specification says paraview should call this:<br>void calculateOptimalThreshold(double *argument)<br><br>To pass in an image data you will need to use a ProxyProperty, not a<br>double vector property.<br><br><br>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909<br><br><br>On Thu, Jun 7, 2012 at 11:12 AM, Tuan Ha Tran <tuan-ha.tran@insa-lyon.fr> wrote:<br>&gt; I tried to call my function double calculateOptimalThreshold(vtkImageData<br>&gt; *voi) which have a return attribute as an OpThreshold that I want to extract<br>&gt; the value as well.<br>&gt;<br>&gt; I use the following tab for my .xml ServerManager.<br>&gt; ========================================================================<br>&gt;<br>&gt;<doublevectorproperty name="calculate" command="calculateOptimalThreshold" <br="">&gt; number_of_elements = "1"&gt;<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;<datatypedomain name="input_type"><br>&gt; &nbsp; <datatype value="vtkImageData"><br>&gt; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;</datatype></datatypedomain><br>&gt;<br>&gt;</doublevectorproperty>========================================================================<br>&gt;<br>&gt; But I failed to apply my filter with the following error<br>&gt; =====================================================================<br>&gt;<br>&gt; ############ ABORT #############<br>&gt; ERROR: In<br>&gt; /home/thtran/PV/ParaView/src/ParaViewCore/ServerImplementation/vtkPVSessionCore.cxx,<br>&gt; line 368<br>&gt; vtkPVSessionCore (0x101ac20): Object type: vtkOtsuSphereSource, could not<br>&gt; find requested method: "calculateOptimalThreshold"<br>&gt; or the method was called with incorrect arguments.<br>&gt;<br>&gt; while processing<br>&gt; Message 0 = Invoke<br>&gt; &nbsp; Argument 0 = vtk_object_pointer {vtkOtsuSphereSource (0x29ef5f0)}<br>&gt; &nbsp; Argument 1 = string_value<br>&gt; {calculateOptimalThreshold}&nbsp;======================================================================<br>&gt; Can you please help me? It really really important for me indeed.<br>&gt; Thank you from my heart for your help.<br>&gt;<br>&gt;<br>&gt;<br>&gt; ----- Original Message -----<br>&gt; From: Tuan Ha Tran <tuan-ha.tran@insa-lyon.fr><br>&gt; To: paraview-developers@paraview.org, paraview@paraview.org<br>&gt; Sent: Thu, 07 Jun 2012 16:45:22 +0200 (CEST)<br>&gt; Subject: [Paraview] ParaView Plugin .xml how to<br>&gt;<br>&gt; Hi everybody,<br>&gt; &nbsp; &nbsp; I have another question, I hope that you can help me.<br>&gt; &nbsp; &nbsp; So, my class vtkOtsuSphereSource has an attribute name "OpThreshold" of<br>&gt; type double.<br>&gt; &nbsp; &nbsp; I want to Set it value using ParaView.<br>&gt; &nbsp; &nbsp; I followed an tutorial from which I can get my job done by adding some<br>&gt; tab in my .xml file. the tutorial I told is in the IEEE Vis 09 conference.<br>&gt;<br>&gt; &nbsp; &nbsp; So, to set OpThreshold, I added the followed tab :<br>&gt; &nbsp; &nbsp;<doublevectorproperty name="OpThreshold" Â command="SetOpThreshold" <br="">&gt; number_of_elements ="1" default_values="0"&gt;<br>&gt; &nbsp; &nbsp;</doublevectorproperty><br>&gt; &nbsp; &nbsp; And normaly, I can entre a value in a box in ParaView GUI. but I have a<br>&gt; Core Dump, here is what I have as error :<br>&gt;<br>&gt;<br>&gt; paraview:<br>&gt; /home/thtran/PV/ParaView/src/ParaViewCore/ServerImplementation/vtkSIProxy.cxx:453:<br>&gt; virtual bool vtkSIProxy::ReadXMLProperty(vtkPVXMLElement*): Assertion<br>&gt; `!name.empty() && this-&gt;GetSIProperty(name.c_str()) == __null' failed.<br>&gt; Aborted (core dumped)<br>&gt; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; I think that I don't get the .xml written as expected but I don't<br>&gt; have any idea where is the problem.<br>&gt; &nbsp; &nbsp; Please help me. It is really important for me to get through this.<br>&gt;<br>&gt; &nbsp; &nbsp; My .xml is as followed :<br>&gt;<br>&gt; &nbsp; ====================================================================<br>&gt; &nbsp; &nbsp;<servermanagerconfiguration><br>&gt; &nbsp; <proxygroup name="filters"><br>&gt; &nbsp; &nbsp;<sourceproxy name="OtsuSphereSource" class="vtkOtsuSphereSource" <br="">&gt; label="Otsu Sphere Source"&gt;<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp;<documentation<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; long_help="Ce filtre calcule a partir dune image donnee le meilleur<br>&gt; seuil"<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; short_help="Calcule meilleur seuil"&gt;<br>&gt; &nbsp; &nbsp; &nbsp;<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp;<input property<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; name="Input"<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; command="SetInputConnection"&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<proxygroupdomain name="groups"><br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<group name="sources"><br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<group name="filters"><br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</group></group></proxygroupdomain><br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<datatypedomain name="input_type"><br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<datatype value="vtkImageData"><br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</datatype></datatypedomain><br>&gt; &nbsp; &nbsp; &nbsp; <br>&gt; &nbsp; &nbsp; &nbsp; <doublevectorproperty name="OpThreshold" Â command="SetOpThreshold" <br="">&gt; number_of_elements ="1" default_values="0"&gt;<br>&gt; &nbsp; &nbsp; &nbsp; </doublevectorproperty><br>&gt; &nbsp; &nbsp; &nbsp; <doublevectorproperty name="OpThreshold" command="GetOpThreshold" <br="">&gt; number_of_elements = "1" default_values="0" information_only="1"&gt;<br>&gt; &nbsp; &nbsp; &nbsp; </doublevectorproperty><br>&gt;<br>&gt; &nbsp; &nbsp;</inputproperty<br></documentation<br></sourceproxy><br>&gt; &nbsp; </proxygroup><br>&gt;</servermanagerconfiguration><br>&gt; ===========================================================================<br>&gt;<br>&gt; _______________________________________________<br>&gt; Powered by www.kitware.com<br>&gt;<br>&gt; Visit other Kitware open-source projects at<br>&gt; http://www.kitware.com/opensource/opensource.html<br>&gt;<br>&gt; Please keep messages on-topic and check the ParaView Wiki at:<br>&gt; http://paraview.org/Wiki/ParaView<br>&gt;<br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; http://www.paraview.org/mailman/listinfo/paraview<br>&gt;<br><br></tuan-ha.tran@insa-lyon.fr></tuan-ha.tran@insa-lyon.fr></body></html>