MONAI icon indicating copy to clipboard operation
MONAI copied to clipboard

Question about using Spacing transform after Transpose transform

Open chaoscls opened this issue 2 years ago • 1 comments

The Transpose transform doesn't change the image's affine matric, but spacing transform needs to calculate the original spacing using this affine matric. So I think this is a bug if transpose before spacing transform. Transpose: https://github.com/Project-MONAI/MONAI/blob/17c1e3acff583e241066da08dae4b75554b52dda/monai/transforms/utility/array.py#L601 Calculating original spacing: https://github.com/Project-MONAI/MONAI/blob/17c1e3acff583e241066da08dae4b75554b52dda/monai/transforms/spatial/array.py#L507C7-L507C7

chaoscls avatar Jul 12 '23 09:07 chaoscls

Thanks for reporting, please see https://github.com/Project-MONAI/MONAI/issues/5975

Perhaps we can enhance the docstring for the same. Marking this as a feature request..

wyli avatar Jul 12 '23 09:07 wyli