[vtk-developers] Re: [vtkusers] Unconnected filter(s) causing seg faults

Berk Geveci berk.geveci at kitware.com
Thu Oct 16 15:29:47 EDT 2003


> Do I understand correctly that each filter should keep NumberOfInputs up 
> to date according to what happens during a SetInput()?  So, if 
> SetInput() is called with a non-null input on a single-input filter, it 
> should set NumberOfInputs to 1, and if SetInput() is called on that same 
> filter with null, then NumberOfInputs should be explicitly set to 0?

Currently, yes. I think we should change the check in vtkSource. Instead
of comparing NumberOfInputs to NumberOfRequiredInputs, it probably
should check that the first NumberOfRequiredInputs inputs are non-null.
What do you think?

nb. I still think that calling SetNumberOfInputs(1) in the constructor
is wrong.

-Berk






More information about the vtkusers mailing list