Skip to content

Commit 507351d

Browse files
committed
fixed lowres_axis in nnunet preprocessor.py to get the correct lowest resolution axis
1 parent 9becdf8 commit 507351d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PyTorch/Segmentation/nnUNet/data_preprocessing/preprocessor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def collect_spacings(self):
217217
spacing = np.array(spacing)
218218
target_spacing = np.median(spacing, axis=0)
219219
if max(target_spacing) / min(target_spacing) >= 3:
220-
lowres_axis = np.argmin(target_spacing)
220+
lowres_axis = np.argmax(target_spacing)
221221
target_spacing[lowres_axis] = np.percentile(spacing[:, lowres_axis], 10)
222222
self.target_spacing = list(target_spacing)
223223

0 commit comments

Comments
 (0)