Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: FILMGLS gifti output support in surface mode #3652

Merged
merged 4 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,12 @@
"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"
},
effigies marked this conversation as resolved.
Show resolved Hide resolved
],
"keywords": [
"neuroimaging",
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
Loading