That really helpful your reply. But, I always have errors with =========================================================== <DoubleVectorProperty name="OpThreshold" command="SetOpThreshold" number_of_elements ="1" default_values="0"> </DoubleVectorProperty> 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 :
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. Aborted (core dumped) ============================================================= 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. ----- Original Message ----- From: David E DeMarle <dave.dema...@kitware.com> To: Tuan Ha Tran <tuan-ha.t...@insa-lyon.fr> Cc: paraview-develop...@paraview.org, paraview@paraview.org Sent: Thu, 07 Jun 2012 17:21:55 +0200 (CEST) Subject: Re: [Paraview] ParaView Plugin .xml how to Your c++ class has: double calculateOptimalThreshold(vtkImageData *voi) But your xml property specification says paraview should call this: void calculateOptimalThreshold(double *argument) To pass in an image data you will need to use a ProxyProperty, not a double vector property. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jun 7, 2012 at 11:12 AM, Tuan Ha Tran wrote: > I tried to call my function double calculateOptimalThreshold(vtkImageData > *voi) which have a return attribute as an OpThreshold that I want to extract > the value as well. > > I use the following tab for my .xml ServerManager. > ======================================================================== > ><doublevectorproperty name="calculate" command="calculateOptimalThreshold" > >number_of_elements = "1"> > > > > >======================================================================== > > But I failed to apply my filter with the following error > ===================================================================== > > ############ ABORT ############# > ERROR: In > /home/thtran/PV/ParaView/src/ParaViewCore/ServerImplementation/vtkPVSessionCore.cxx, > line 368 > vtkPVSessionCore (0x101ac20): Object type: vtkOtsuSphereSource, could not > find requested method: "calculateOptimalThreshold" > or the method was called with incorrect arguments. > > while processing > Message 0 = Invoke > Argument 0 = vtk_object_pointer {vtkOtsuSphereSource (0x29ef5f0)} > Argument 1 = string_value > {calculateOptimalThreshold} > ====================================================================== > Can you please help me? It really really important for me indeed. > Thank you from my heart for your help. > > > > ----- Original Message ----- > From: Tuan Ha Tran > To: paraview-develop...@paraview.org, paraview@paraview.org > Sent: Thu, 07 Jun 2012 16:45:22 +0200 (CEST) > Subject: [Paraview] ParaView Plugin .xml how to > > Hi everybody, > I have another question, I hope that you can help me. > So, my class vtkOtsuSphereSource has an attribute name "OpThreshold" of > type double. > I want to Set it value using ParaView. > I followed an tutorial from which I can get my job done by adding some > tab in my .xml file. the tutorial I told is in the IEEE Vis 09 conference. > > So, to set OpThreshold, I added the followed tab : > <doublevectorproperty name="OpThreshold" command="SetOpThreshold" > > number_of_elements ="1" default_values="0"> > > 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 : > > > 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. > Aborted (core dumped) > I think that I don't get the .xml written as expected but I don't > have any idea where is the problem. > Please help me. It is really important for me to get through this. > > My .xml is as followed : > > ==================================================================== > > > <sourceproxy name="OtsuSphereSource" class="vtkOtsuSphereSource" > > label="Otsu Sphere Source"> > > <documentation > long_help="Ce filtre calcule a partir dune image donnee le meilleur > seuil" > short_help="Calcule meilleur seuil"> > > > <input property > name="Input" > command="SetInputConnection"> > > > > > > > > > <doublevectorproperty name="OpThreshold" command="SetOpThreshold" > > number_of_elements ="1" default_values="0"> > > <doublevectorproperty name="OpThreshold" command="GetOpThreshold" > > number_of_elements = "1" default_values="0" information_only="1"> > > > </inputproperty </documentation > > > =========================================================================== > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the ParaView Wiki at: > http://paraview.org/Wiki/ParaView > > Follow this link to subscribe/unsubscribe: > http://www.paraview.org/mailman/listinfo/paraview >
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview