Skip to content
4 changes: 4 additions & 0 deletions monai/transforms/io/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ class LoadImage(Transform):
- Current default readers: (nii, nii.gz -> NibabelReader), (png, jpg, bmp -> PILReader),
(npz, npy -> NumpyReader), (nrrd -> NrrdReader), (DICOM file -> ITKReader).

Please note that for png, jpg, bmp, and other 2D formats, readers often swap axis 0 and 1 after
loading the array because the `HW` definition for non-medical specific file formats is different
from other common medical packages.

See also:

- tutorial: https://github.com/Project-MONAI/tutorials/blob/master/modules/load_medical_images.ipynb
Expand Down
4 changes: 4 additions & 0 deletions monai/transforms/io/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ class LoadImaged(MapTransform):
- Current default readers: (nii, nii.gz -> NibabelReader), (png, jpg, bmp -> PILReader),
(npz, npy -> NumpyReader), (dcm, DICOM series and others -> ITKReader).

Please note that for png, jpg, bmp, and other 2D formats, readers often swap axis 0 and 1 after
loading the array because the `HW` definition for non-medical specific file formats is different
from other common medical packages.

Note:

- If `reader` is specified, the loader will attempt to use the specified readers and the default supported
Expand Down