Skip to content

Commit

Permalink
Apply comments from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
po09i committed Nov 12, 2020
1 parent 277a732 commit bde0b81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shimmingtoolbox/unwrap/prelude.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ def prelude(wrapped_phase, mag, affine, mask=None, threshold=None, is_unwrapping

fname_phase_unwrapped = glob.glob(os.path.join(path_tmp, 'rawPhase_unwrapped*'))[0]

# When loading fname_phase_unwrapped, if a singleton is on the last dimension, it will not appear in the last
# dimension in phase_unwrapped. To be consistent with the size of the input, the singleton are added back.
phase_unwrapped = nib.load(fname_phase_unwrapped).get_fdata()

for _ in range(wrapped_phase.ndim - phase_unwrapped.ndim):
phase_unwrapped = np.expand_dims(phase_unwrapped, -1)

Expand Down

0 comments on commit bde0b81

Please sign in to comment.