Skip to content

Commit

Permalink
FIX: Ensure data type of masked image matches T1.mgz
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Nov 27, 2019
1 parent 5512b8e commit ce124ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion niworkflows/interfaces/freesurfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def inject_skullstripped(subjects_dir, subject_id, skullstripped):
mask = nb.load(skullstripped)
bmask = new_img_like(mask, np.asanyarray(mask.dataobj) > 0)
resampled_mask = resample_to_img(bmask, img, 'nearest')
masked_image = new_img_like(img, img.get_fdata() * resampled_mask.dataobj)
masked_image = new_img_like(img, np.asanyarray(img.dataobj) * resampled_mask.dataobj)
masked_image.to_filename(bm_auto)

if not op.exists(bm):
Expand Down

0 comments on commit ce124ee

Please sign in to comment.