[Paraview] Ordered xml inputs?

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Nov 4 14:32:12 EST 2009


David,

Looking at the xml, you have added a "clean_command" to all the
properties which is "RemoveAllInputs". CleanCommand is called before a
property is pushed. So before each property value is pushed all other
inputs are removed. And hence the error.

If your filter only takes 1 connection per input port, then simply
replace all AddInputConnection commands by SetInputConnection and
remove the clean_command attribute all together. I've attached a
modified xml.


Utkarsh

On Wed, Nov 4, 2009 at 10:42 AM, David Doria <daviddoria at gmail.com> wrote:
> On Wed, Nov 4, 2009 at 10:31 AM, Sven Buijssen
> <sven.buijssen at tu-dortmund.de> wrote:
>> 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
>>
>>
>
> Ah, sorry, you are correct - those were copy/paste errors!
>
> However, now that those things are fixed
> (http://www.rpi.edu/~doriad/Paraview_List/LandmarkFilter/LandmarkTransformFilter.xml)
> when I apply the filter in Paraview and set the inputs using the Input
> Editor, I get a whole bunch of these errors:
>
> vtkCompositeDataPipeline (0xa82e288): Input port 0 of algorithm
> vtkLandmarkTransformFilter(0xa82e240) has 0 connections but is not
> optional.
> vtkCompositeDataPipeline (0xa82e288): Input port 1 of algorithm
> vtkLandmarkTransformFilter(0xa82e240) has 2 connections but is not
> repeatable.
> etc, etc.
>
> Why would this be?
>
> 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Config.xml
Type: text/xml
Size: 2174 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20091104/db68b12e/attachment.bin>


More information about the ParaView mailing list