Skip to content

Commit

Permalink
Merge pull request #3652 from bogpetre/master
Browse files Browse the repository at this point in the history
ENH: FILMGLS gifti output support in surface mode
  • Loading branch information
effigies authored Oct 6, 2024
2 parents 4fa64e6 + 1019455 commit b93b08e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,11 @@
"affiliation": "MIT, HMS",
"name": "Ghosh, Satrajit",
"orcid": "0000-0002-5312-6729"
},
{
"affiliation": "Department of Psychological and Brain Sciences, Dartmouth College",
"name": "Petre, Bogdan",
"orcid": "0000-0002-8437-168X"
}
],
"keywords": [
Expand Down
5 changes: 3 additions & 2 deletions nipype/interfaces/fsl/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class Info(PackageInfo):
"NIFTI_PAIR": ".img",
"NIFTI_GZ": ".nii.gz",
"NIFTI_PAIR_GZ": ".img.gz",
"GIFTI": ".func.gii",
}

if os.getenv("FSLDIR"):
Expand All @@ -72,8 +73,8 @@ def output_type_to_ext(cls, output_type):
Parameters
----------
output_type : {'NIFTI', 'NIFTI_GZ', 'NIFTI_PAIR', 'NIFTI_PAIR_GZ'}
String specifying the output type.
output_type : {'NIFTI', 'NIFTI_GZ', 'NIFTI_PAIR', 'NIFTI_PAIR_GZ', 'GIFTI'}
String specifying the output type. Note: limited GIFTI support.
Returns
-------
Expand Down
8 changes: 8 additions & 0 deletions nipype/interfaces/fsl/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,12 +812,20 @@ class FILMGLS(FSLCommand):
_cmd = "film_gls"
input_spec = FILMGLSInputSpec
output_spec = FILMGLSOutputSpec

if Info.version() and LooseVersion(Info.version()) > LooseVersion("5.0.6"):
input_spec = FILMGLSInputSpec507
output_spec = FILMGLSOutputSpec507
elif Info.version() and LooseVersion(Info.version()) > LooseVersion("5.0.4"):
input_spec = FILMGLSInputSpec505

def __init__(self, **inputs):
super(FILMGLS, self).__init__(**inputs)
if Info.version() and LooseVersion(Info.version()) > LooseVersion("5.0.6"):
if 'output_type' not in inputs:
if isdefined(self.inputs.mode) and self.inputs.mode == 'surface':
self.inputs.output_type = 'GIFTI'

def _get_pe_files(self, cwd):
files = None
if isdefined(self.inputs.design_file):
Expand Down

0 comments on commit b93b08e

Please sign in to comment.