Zero input connections are not optional

Hi,

I have a program where the user will enter varying number of volumes to merge into one volume using BooleanOperationPolyDataFilter. I have two vtkBooleanOperationPolyDataFilter and depending on the situation, some ports will not be used. The program works fine most of the time, but in the terminal these errors pop up.

ERROR: In /work/standalone-x64-build/VTK-source/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx, line 709
vtkCompositeDataPipeline (0x8910720): Input port 0 of algorithm vtkBooleanOperationPolyDataFilter(0x86f2d30) has 0 connections but is not optional.

ERROR: In /work/standalone-x64-build/VTK-source/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx, line 709
vtkCompositeDataPipeline (0x8910720): Input port 1 of algorithm vtkBooleanOperationPolyDataFilter(0x86f2d30) has 0 connections but is not optional.

How do I silence/ignore/prevent these errors.

The error means that you have not provided all the required inputs for the filter. You can fix them by providing all the required inputs from the filter; or not updating/requesting outputs from the filter.

One way to silence is using the below code:

errorOut = vtk.vtkFileOutputWindow()
errorOut.SetFileName("Error.txt")
vtkStdErrorOut = vtk.vtkOutputWindow()
vtkStdErrorOut.SetInstance(errorOut)