[vtk-developers] Image multiple input filters, VTK 5 vs VTK 4

Brad King brad.king at kitware.com
Thu Apr 6 15:42:05 EDT 2006


David Gobbi wrote:
> I understand the concerns with SetNthInputConnection and
> think that the best solution would be to make it public only
> in the few filters that properly check for null inputs.  That
> would be a 100% solution for me.

That was the intention of the method and the reason it is protected in 
vtkAlgorithm.  Only filters that care about multiple ordered connections 
on the same port need this anyway, and they should be able to deal with 
NULL inputs.

Summary of the solution:

1.) Add a public version of SetNthInputConnection to vtkImageBlend.
     It should probably be called something else and not accept the
     port number argument (since only port 0 supports this).
     Perhaps "void SetNthBlendImage(int n, vtkAlgorithmOutput*)".

2.) Override the SetInput methods in vtkImageBlend to map the input
     numbers the way the old filter treated them.  IIRC at least one
     was a stencil.

-Brad



More information about the vtk-developers mailing list