<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 </span><br><span>===========================================================</span><br> <DoubleVectorProperty name="OpThreshold" command="SetOpThreshold" number_of_elements ="1" default_values="0"><br> </DoubleVectorProperty> <br> 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 : <br> <br>paraview: /home/thtran/PV/ParaView/src/ParaViewCore/ServerImplementation/vtkSIProxy.cxx:453: virtual bool vtkSIProxy::ReadXMLProperty(vtkPVXMLElement*): Assertion `!name.empty() && this->GetSIProperty(name.c_str()) == __null' failed.<br>Aborted (core dumped)<br><span> =============================================================</span> <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> </span><br>----- Original Message -----<br>From: David E DeMarle <dave.demarle@kitware.com><br>To: Tuan Ha Tran <tuan-ha.tran@insa-lyon.fr><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>> I tried to call my function double calculateOptimalThreshold(vtkImageData<br>> *voi) which have a return attribute as an OpThreshold that I want to extract<br>> the value as well.<br>><br>> I use the following tab for my .xml ServerManager.<br>> ========================================================================<br>><br>><doublevectorproperty name="calculate" command="calculateOptimalThreshold" <br="">> number_of_elements = "1"><br>> <datatypedomain name="input_type"><br>> <datatype value="vtkImageData"><br>> </datatype></datatypedomain><br>><br>></doublevectorproperty>========================================================================<br>><br>> But I failed to apply my filter with the following error<br>> =====================================================================<br>><br>> ############ ABORT #############<br>> ERROR: In<br>> /home/thtran/PV/ParaView/src/ParaViewCore/ServerImplementation/vtkPVSessionCore.cxx,<br>> line 368<br>> vtkPVSessionCore (0x101ac20): Object type: vtkOtsuSphereSource, could not<br>> find requested method: "calculateOptimalThreshold"<br>> or the method was called with incorrect arguments.<br>><br>> while processing<br>> Message 0 = Invoke<br>> Argument 0 = vtk_object_pointer {vtkOtsuSphereSource (0x29ef5f0)}<br>> Argument 1 = string_value<br>> {calculateOptimalThreshold} ======================================================================<br>> Can you please help me? It really really important for me indeed.<br>> Thank you from my heart for your help.<br>><br>><br>><br>> ----- Original Message -----<br>> From: Tuan Ha Tran <tuan-ha.tran@insa-lyon.fr><br>> To: paraview-developers@paraview.org, paraview@paraview.org<br>> Sent: Thu, 07 Jun 2012 16:45:22 +0200 (CEST)<br>> Subject: [Paraview] ParaView Plugin .xml how to<br>><br>> Hi everybody,<br>> I have another question, I hope that you can help me.<br>> So, my class vtkOtsuSphereSource has an attribute name "OpThreshold" of<br>> type double.<br>> I want to Set it value using ParaView.<br>> I followed an tutorial from which I can get my job done by adding some<br>> tab in my .xml file. the tutorial I told is in the IEEE Vis 09 conference.<br>><br>> So, to set OpThreshold, I added the followed tab :<br>> <doublevectorproperty name="OpThreshold" Â command="SetOpThreshold" <br="">> number_of_elements ="1" default_values="0"><br>> </doublevectorproperty><br>> And normaly, I can entre a value in a box in ParaView GUI. but I have a<br>> Core Dump, here is what I have as error :<br>><br>><br>> paraview:<br>> /home/thtran/PV/ParaView/src/ParaViewCore/ServerImplementation/vtkSIProxy.cxx:453:<br>> virtual bool vtkSIProxy::ReadXMLProperty(vtkPVXMLElement*): Assertion<br>> `!name.empty() && this->GetSIProperty(name.c_str()) == __null' failed.<br>> Aborted (core dumped)<br>> I think that I don't get the .xml written as expected but I don't<br>> have any idea where is the problem.<br>> Please help me. It is really important for me to get through this.<br>><br>> My .xml is as followed :<br>><br>> ====================================================================<br>> <servermanagerconfiguration><br>> <proxygroup name="filters"><br>> <sourceproxy name="OtsuSphereSource" class="vtkOtsuSphereSource" <br="">> label="Otsu Sphere Source"><br>><br>> <documentation<br>> long_help="Ce filtre calcule a partir dune image donnee le meilleur<br>> seuil"<br>> short_help="Calcule meilleur seuil"><br>> <br>><br>> <input property<br>> name="Input"<br>> command="SetInputConnection"><br>> <proxygroupdomain name="groups"><br>> <group name="sources"><br>> <group name="filters"><br>> </group></group></proxygroupdomain><br>> <datatypedomain name="input_type"><br>> <datatype value="vtkImageData"><br>> </datatype></datatypedomain><br>> <br>> <doublevectorproperty name="OpThreshold" Â command="SetOpThreshold" <br="">> number_of_elements ="1" default_values="0"><br>> </doublevectorproperty><br>> <doublevectorproperty name="OpThreshold" command="GetOpThreshold" <br="">> number_of_elements = "1" default_values="0" information_only="1"><br>> </doublevectorproperty><br>><br>> </inputproperty<br></documentation<br></sourceproxy><br>> </proxygroup><br>></servermanagerconfiguration><br>> ===========================================================================<br>><br>> _______________________________________________<br>> Powered by www.kitware.com<br>><br>> Visit other Kitware open-source projects at<br>> http://www.kitware.com/opensource/opensource.html<br>><br>> Please keep messages on-topic and check the ParaView Wiki at:<br>> http://paraview.org/Wiki/ParaView<br>><br>> Follow this link to subscribe/unsubscribe:<br>> http://www.paraview.org/mailman/listinfo/paraview<br>><br><br></tuan-ha.tran@insa-lyon.fr></tuan-ha.tran@insa-lyon.fr></body></html>