Skip to content

Commit 4a71c12

Browse files
committed
fix: tbss3 should warn and return workflow when FSL not available
1 parent 951bacd commit 4a71c12

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

nipype/workflows/dmri/fsl/tbss.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,11 @@ def create_tbss_3_postreg(name='tbss_3_postreg', estimate_skeleton=True):
264264
# $FSLDIR/bin/fslmaths $FSLDIR/data/standard/FMRIB58_FA_1mm -mas mean_FA_mask mean_FA
265265
maskstd = pe.Node(
266266
fsl.ImageMaths(op_string="-mas", suffix="_masked"), name="maskstd")
267-
maskstd.inputs.in_file = fsl.Info.standard_image(
268-
"FMRIB58_FA_1mm.nii.gz")
267+
if fsl.no_fsl():
268+
warn('NO FSL found')
269+
else:
270+
maskstd.inputs.in_file = fsl.Info.standard_image(
271+
"FMRIB58_FA_1mm.nii.gz")
269272

270273
# $FSLDIR/bin/fslmaths mean_FA -bin mean_FA_mask
271274
binmaskstd = pe.Node(

0 commit comments

Comments
 (0)