diff --git a/.circleci/test_py2_pytest.sh b/.circleci/test_py2_pytest.sh index 6ea0ddedfc..df1489d240 100644 --- a/.circleci/test_py2_pytest.sh +++ b/.circleci/test_py2_pytest.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work -e CI_SKIP_TEST=1 -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" "${DOCKER_IMAGE}:py27" /usr/bin/run_pytests.sh +docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work -e CI_SKIP_TEST=1 -e NIPYPE_RESOURCE_MONITOR=1 "${DOCKER_IMAGE}:py27" /usr/bin/run_pytests.sh diff --git a/.circleci/test_py3_pytest.sh b/.circleci/test_py3_pytest.sh index 545f430308..b93208f395 100644 --- a/.circleci/test_py3_pytest.sh +++ b/.circleci/test_py3_pytest.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work -e CI_SKIP_TEST=1 -e NIPYPE_RESOURCE_MONITOR=1 -e FSL_COURSE_DATA="/data/examples/nipype-fsl_course_data" "${DOCKER_IMAGE}:py36" /usr/bin/run_pytests.sh +docker run --rm=false -t -v $WORKDIR:/work -v $HOME/examples:/data/examples:ro -w /work -e CI_SKIP_TEST=1 -e NIPYPE_RESOURCE_MONITOR=1 "${DOCKER_IMAGE}:py36" /usr/bin/run_pytests.sh diff --git a/nipype/workflows/dmri/fsl/tbss.py b/nipype/workflows/dmri/fsl/tbss.py index d055bbd31b..3aef3e734a 100644 --- a/nipype/workflows/dmri/fsl/tbss.py +++ b/nipype/workflows/dmri/fsl/tbss.py @@ -264,8 +264,11 @@ def create_tbss_3_postreg(name='tbss_3_postreg', estimate_skeleton=True): # $FSLDIR/bin/fslmaths $FSLDIR/data/standard/FMRIB58_FA_1mm -mas mean_FA_mask mean_FA maskstd = pe.Node( fsl.ImageMaths(op_string="-mas", suffix="_masked"), name="maskstd") - maskstd.inputs.in_file = fsl.Info.standard_image( - "FMRIB58_FA_1mm.nii.gz") + if fsl.no_fsl(): + warn('NO FSL found') + else: + maskstd.inputs.in_file = fsl.Info.standard_image( + "FMRIB58_FA_1mm.nii.gz") # $FSLDIR/bin/fslmaths mean_FA -bin mean_FA_mask binmaskstd = pe.Node( @@ -281,8 +284,11 @@ def create_tbss_3_postreg(name='tbss_3_postreg', estimate_skeleton=True): (maskgroup, maskgroup2, [("out_file", "in_file")]), (binmaskstd, maskgroup2, [("out_file", "in_file2")])]) - outputnode.inputs.skeleton_file = fsl.Info.standard_image( - "FMRIB58_FA-skeleton_1mm.nii.gz") + if fsl.no_fsl(): + warn('NO FSL found') + else: + outputnode.inputs.skeleton_file = fsl.Info.standard_image( + "FMRIB58_FA-skeleton_1mm.nii.gz") tbss3.connect([(binmaskstd, outputnode, [('out_file', 'groupmask')]), (maskstd, outputnode, [('out_file', 'meanfa_file')]), (maskgroup2, outputnode, [('out_file', @@ -387,8 +393,14 @@ def create_tbss_all(name='tbss_all', estimate_skeleton=True): ------- >>> from nipype.workflows.dmri.fsl import tbss - >>> tbss = tbss.create_tbss_all('tbss') - >>> tbss.inputs.inputnode.skeleton_thresh = 0.2 + >>> tbss_wf = tbss.create_tbss_all('tbss', estimate_skeleton=True) + >>> tbss_wf.inputs.inputnode.skeleton_thresh = 0.2 + >>> tbss_wf.inputs.inputnode.fa_list = ['s1_wrapped_FA.nii', 's2_wrapped_FA.nii', 's3_wrapped_FA.nii'] + + >>> tbss_wf = tbss.create_tbss_all('tbss', estimate_skeleton=False) + >>> tbss_wf.inputs.inputnode.skeleton_thresh = 0.2 + >>> tbss_wf.inputs.inputnode.fa_list = ['s1_wrapped_FA.nii', 's2_wrapped_FA.nii', 's3_wrapped_FA.nii'] + Inputs::