Draft: vtkImageData: Add a test case that triggers a bug when using zero spacing
Should vtkImageData's Spacing be allowed to be 0 in a dimension ? It sometimes happens, and can make sense with 1D/2D data which don't use the dimension anyway. It however messes with some internal computations.
This test exemplifies one such problem, in which the IndexToPhysicalMatrix
is in a non-invertible state and so the PhysicalToIndexMatrix
computation silently fails.
Using the shallow copy allows us to compute the matrix once after all parameters are set and triggers the bug.
This MR is intended as a support for a discussion around the case.