Skip to content

Commit

Permalink
Merge pull request #161 from poldracklab/fix/fov_calculation
Browse files Browse the repository at this point in the history
FIX: Calculate FoV with shape and zooms
  • Loading branch information
effigies authored Jan 22, 2020
2 parents cc0b235 + 5316a1f commit 853f77e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion smriprep/workflows/surfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,12 @@ def _sel(x): return [parc for parc in x if 'DKTatlas+' in parc][0]


def _check_cw256(in_files):
import numpy as np
from nibabel.funcs import concat_images
if isinstance(in_files, str):
in_files = [in_files]
if any((s > 256 for s in concat_images(in_files).shape[:3])):
summary_img = concat_images(in_files)
fov = np.array(summary_img.shape[:3]) * summary_img.header.get_zooms()[:3]
if np.any(fov > 256):
return ['-noskullstrip', '-cw256']
return '-noskullstrip'

0 comments on commit 853f77e

Please sign in to comment.