Skip to content

Commit bcbf519

Browse files
committed
ENH: Add mask input to mcribs interface
1 parent ccbc80c commit bcbf519

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

nibabies/interfaces/mcribs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class MCRIBReconAllInputSpec(CommandLineInputSpec):
4343
segmentation_file = File(
4444
desc='Segmentation file (skips tissue segmentation)',
4545
)
46+
mask_file = File(desc='T2w mask')
4647

4748
# MCRIBS options
4849
conform = traits.Bool(
@@ -185,6 +186,11 @@ def _setup_directory_structure(self, mcribs_dir: Path) -> None:
185186
if not surfrec.exists():
186187
surfrec.symlink_to(f'../../../RawT2/{sid}.nii.gz')
187188

189+
if self.inputs.mask_file:
190+
surfrec_mask = surfrec.parent / 'mask-image.nii.gz'
191+
if not surfrec_mask.exists():
192+
shutil.copy(self.inputs.mask_file, str(surfrec_mask))
193+
188194
if self.inputs.surfrecon:
189195
# Create FreeSurfer layout to safeguard against cd-ing into missing directories
190196
for d in ('surf', 'mri', 'label', 'scripts', 'stats'):

0 commit comments

Comments
 (0)