[Paraview] Ordered xml inputs?

Sven Buijssen sven.buijssen at tu-dortmund.de
Wed Nov 4 10:31:54 EST 2009


David,

I had a short glance at your code and there are two things I find intriging:

1) Your XML mixes the port_index="." and helper method approach for property
SourceDataSet:

      <InputProperty
         name="SourceDataSet"
         port_index="2"
         command="AddSourceConnection"
         clean_command="RemoveAllSources">

You'll have to change the command to "AddInputConnection", in particular because
method AddSourceConnection is merely declared in your *.h file, but there is
nowhere any corresponding code for it. (It's not inherited from class
vtkPolyDataAlgorithm.)

2) Same holds for the clean command: RemoveAllSources() is referenced in the
XML, declared in the header file, but not defined. Whereas RemoveAllInputs() is
inherited from class vtkAlgorithm.

Sven




----- Original Message -----
From: David Doria <daviddoria at gmail.com>
To: ParaView <paraview at paraview.org>
CC: ParaView <paraview at paraview.org>
Sent: 11/04/09 15:48:06
Subject: [Paraview] Ordered xml inputs?
> On Tue, Nov 3, 2009 at 11:31 AM, Utkarsh Ayachit
> <utkarsh.ayachit at kitware.com> wrote:
>> There are two ways:
>>
>> 1> Use attribute "port_index" on the InputProperty to specify which
>> input port it's going to eg.
>>
>> <InputProperty name="Source" port_index="0" command="AddInputConnection" ... />
>>
>> <InputProperty name="Target" port_index="1" command="AddInputConnection" ... />
>>
>> 2> Use helper methods defined on the filter eg.
>>      void AddSource(vtkAlgorithmOutput* input) {
>> this->AddInputConnection(0, input); }
>>      void AddTarget(vtkAlgorithmOutput* input) {
>> this->AddInputConnection(1, input); }
>>
>>   And use these as the command's for your two input properties.
>>
>> Utkarsh
> 
> 
> Hm, I tried the port_index method, but it still crashes when run from
> Paraview. My filter works fine from c++ (see Example.cxx). Would you
> mind taking a look to see if you can find the discrepancy between how
> I setup the pipeline in the c++ code vs in the XML? One thing I
> noticed is that in the Input Editor that opens when I begin to apply
> the plugin, the input ports are not listed in the same (correct) order
> as they are in the xml (specified by port_index). Could that point to
> the problem? If so, why is it happening?
> 
> http://www.rpi.edu/~doriad/Paraview_List/LandmarkFilter/
> 
> Thanks,
> 
> David
> _______________________________________________
> 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



More information about the ParaView mailing list