Skip to content

Commit

Permalink
Merge pull request #268 from effigies/fix/aseg_nearest
Browse files Browse the repository at this point in the history
FIX: Resample aseg with nearest-neighbor interpolation
  • Loading branch information
effigies authored Oct 7, 2021
2 parents bd27239 + 2d76953 commit f28a46d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion smriprep/workflows/surfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,9 @@ def init_segs_to_native_wf(*, name='segs_to_native', segmentation='aseg'):
fssource = pe.Node(nio.FreeSurferSource(), name='fs_datasource')
# Resample from T1.mgz to T1w.nii.gz, applying any offset in fsnative2t1w_xfm,
# and convert to NIfTI while we're at it
resample = pe.Node(fs.ApplyVolTransform(transformed_file='seg.nii.gz'), name='resample')
resample = pe.Node(
fs.ApplyVolTransform(transformed_file='seg.nii.gz', interp='nearest'),
name='resample')

if segmentation.startswith('aparc'):
if segmentation == 'aparc_aseg':
Expand Down

0 comments on commit f28a46d

Please sign in to comment.