Skip to content

Commit b93b08e

Browse files
authored
Merge pull request #3652 from bogpetre/master
ENH: FILMGLS gifti output support in surface mode
2 parents 4fa64e6 + 1019455 commit b93b08e

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

Diff for: .zenodo.json

+5
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,11 @@
924924
"affiliation": "MIT, HMS",
925925
"name": "Ghosh, Satrajit",
926926
"orcid": "0000-0002-5312-6729"
927+
},
928+
{
929+
"affiliation": "Department of Psychological and Brain Sciences, Dartmouth College",
930+
"name": "Petre, Bogdan",
931+
"orcid": "0000-0002-8437-168X"
927932
}
928933
],
929934
"keywords": [

Diff for: nipype/interfaces/fsl/base.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class Info(PackageInfo):
5757
"NIFTI_PAIR": ".img",
5858
"NIFTI_GZ": ".nii.gz",
5959
"NIFTI_PAIR_GZ": ".img.gz",
60+
"GIFTI": ".func.gii",
6061
}
6162

6263
if os.getenv("FSLDIR"):
@@ -72,8 +73,8 @@ def output_type_to_ext(cls, output_type):
7273
7374
Parameters
7475
----------
75-
output_type : {'NIFTI', 'NIFTI_GZ', 'NIFTI_PAIR', 'NIFTI_PAIR_GZ'}
76-
String specifying the output type.
76+
output_type : {'NIFTI', 'NIFTI_GZ', 'NIFTI_PAIR', 'NIFTI_PAIR_GZ', 'GIFTI'}
77+
String specifying the output type. Note: limited GIFTI support.
7778
7879
Returns
7980
-------

Diff for: nipype/interfaces/fsl/model.py

+8
Original file line numberDiff line numberDiff line change
@@ -812,12 +812,20 @@ class FILMGLS(FSLCommand):
812812
_cmd = "film_gls"
813813
input_spec = FILMGLSInputSpec
814814
output_spec = FILMGLSOutputSpec
815+
815816
if Info.version() and LooseVersion(Info.version()) > LooseVersion("5.0.6"):
816817
input_spec = FILMGLSInputSpec507
817818
output_spec = FILMGLSOutputSpec507
818819
elif Info.version() and LooseVersion(Info.version()) > LooseVersion("5.0.4"):
819820
input_spec = FILMGLSInputSpec505
820821

822+
def __init__(self, **inputs):
823+
super(FILMGLS, self).__init__(**inputs)
824+
if Info.version() and LooseVersion(Info.version()) > LooseVersion("5.0.6"):
825+
if 'output_type' not in inputs:
826+
if isdefined(self.inputs.mode) and self.inputs.mode == 'surface':
827+
self.inputs.output_type = 'GIFTI'
828+
821829
def _get_pe_files(self, cwd):
822830
files = None
823831
if isdefined(self.inputs.design_file):

0 commit comments

Comments
 (0)