[Paraview] Ordered xml inputs?

David Doria daviddoria at gmail.com
Wed Nov 4 09:48:06 EST 2009


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


More information about the ParaView mailing list