Skip to content

Use implicit arrays in various filters

Louis Gombert requested to merge louis.gombert/vtk:use-implicit-cst into master

Use implicit arrays for filters whose output arrays have constant or easy to generate on-the-fly values. We improve the following filters:

  • vtkBlockIdScalars : use a constant implicit array for each block, and add a unit test (it did not have one)
  • TestOverlappingAMRLevelIdScalars : use a constant implicit array for each dataset. Also add a unit test for the filter and rename the field to "LevelIdScalars" as specified by the documentation instead of the erroneous "BlockIdScalars"
  • vtkCountFaces : generate the number of faces on the fly, don't store it anymore
  • vtkCountVertices : ditto

This technically breaks retrocompatibility as the output array cannot be cast to its previous type anymore (eg vtkUnsignedCharArray cast will return nullptr now) but data has the same type as before

Edited by Louis Gombert

Merge request reports