Skip to content

Commit a1c067b

Browse files
authored
Correct the MONAI models' error in OrientationD in pre-processing transform from "RAS" to "LPS" (#559)
Signed-off-by: M Q <[email protected]>
1 parent d618e6d commit a1c067b

File tree

5 files changed

+484
-574
lines changed

5 files changed

+484
-574
lines changed

examples/apps/ai_remote_infer_app/spleen_seg_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def pre_process(self, img_reader, out_dir: str = "./input_images") -> Compose:
127127
resample=False,
128128
output_ext=".nii",
129129
),
130-
Orientationd(keys=my_key, axcodes="RAS"),
130+
Orientationd(keys=my_key, axcodes="LPS"),
131131
Spacingd(keys=my_key, pixdim=[1.5, 1.5, 2.9], mode=["bilinear"]),
132132
ScaleIntensityRanged(keys=my_key, a_min=-57, a_max=164, b_min=0.0, b_max=1.0, clip=True),
133133
EnsureTyped(keys=my_key),

examples/apps/ai_unetr_seg_app/unetr_seg_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def pre_process(self, img_reader, out_dir: str = "./input_images") -> Compose:
143143
output_ext=".nii",
144144
),
145145
Spacingd(keys=my_key, pixdim=(1.5, 1.5, 2.0), mode=("bilinear")),
146-
Orientationd(keys=my_key, axcodes="RAS"),
146+
Orientationd(keys=my_key, axcodes="LPS"),
147147
ScaleIntensityRanged(my_key, a_min=-175, a_max=250, b_min=0.0, b_max=1.0, clip=True),
148148
CropForegroundd(my_key, source_key=my_key),
149149
]

examples/apps/cchmc_ped_abd_ct_seg_app/abdomen_seg_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def pre_process(self, img_reader) -> Compose:
226226
# img_reader: specialized InMemImageReader, derived from MONAI ImageReader
227227
LoadImaged(keys=my_key, reader=img_reader),
228228
EnsureChannelFirstd(keys=my_key),
229-
Orientationd(keys=my_key, axcodes="RAS"),
229+
Orientationd(keys=my_key, axcodes="LPS"),
230230
Spacingd(keys=my_key, pixdim=[1.5, 1.5, 3.0], mode=["bilinear"]),
231231
ScaleIntensityRanged(keys=my_key, a_min=-250, a_max=400, b_min=0.0, b_max=1.0, clip=True),
232232
CropForegroundd(keys=my_key, source_key=my_key, mode="minimum"),

0 commit comments

Comments
 (0)