Fixes and comments for vtkImageTransform
More operations are done up-front to make the inner loops tighter. Checks have been added to avoid division by zero. The inverse transpose matrix is now used consistently in all normal and vector transformation code paths.
Warning statements have been added that vectors are assumed to be gradients and are therefore transformed as covariant vectors. This is a valid assumption for the filters this class is used with, but it's important to warn people that this isn't a general-purpose transform class. It is intended to be used by contouring, cutting, and clipping filters.
In the 2nd commit, interface methods have been changed from double*
to const double*
. Therefore if this MR is backported, only the first commit should be backported.
This class is used by the following filters:
- vtkSurfaceNets2D
- vtkSurfaceNets3D
- vtkFlyingEdges2D
- vtkFlyingEdges3D
- vtkDiscreteFlyingEdges2D
- vtkDiscreteFlyingEdges3D
- vtkDiscreteFlyingEdgesClipper2D
- vtkFlyingEdgesPlaneCutter
- vtkMarchingSquares
- vtkMarchingCubes
- vtkImageMarchingCubes
- vtkDiscreteMarchingCubes