Skip to content

Fix inconsistencies in connected components filters

The connected components filters had some simple issues that were inconsistent with the operation of other filters.

  • Set the output to the OutputFieldName defined in the filter rather than hardcoding it to "component". The default value is still "component", but now you can change it.
  • Make sure the output field association is correct. The field association for CellSetConnectivity is always cell and the field association for ImageConnectivity is always point.
  • Check that the field association for the input field of ImageConnectivity is point. The filter will fail if it is not.
  • Make both filters inherit from FilterCell instead of FilterField. The superclasses are similar but the latter allows the user to set the active cell set correctly.
  • Properly get the cell set specified by GetActiveCellSetIndex. Previously it was set to the active coordinates, which is wrong.

Merge request reports