Skip to content

Commit

Permalink
Merge branch 'master' into 'master'
Browse files Browse the repository at this point in the history
fix calculation of 'shape' from data in resample_data_or_seg_to_spacing (issue #1647)

See merge request mic/internal/nnu-net!5
  • Loading branch information
FabianIsensee committed Apr 5, 2024
2 parents 9e2a877 + a180e18 commit 4af17e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nnunetv2/preprocessing/resampling/default_resampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def resample_data_or_seg_to_spacing(data: np.ndarray,
if data is not None:
assert data.ndim == 4, "data must be c x y z"

shape = np.array(data[0].shape)
shape = np.array(data.shape)
new_shape = compute_new_shape(shape[1:], current_spacing, new_spacing)

data_reshaped = resample_data_or_seg(data, new_shape, is_seg, axis, order, do_separate_z, order_z=order_z)
Expand Down

0 comments on commit 4af17e3

Please sign in to comment.