Skip to content

Commit cfc2ed6

Browse files
committed
Merge branch 'bids_grabber' of github.com:adelavega/nipype into bids_grabber
2 parents 651bc85 + 4bfa177 commit cfc2ed6

File tree

4 files changed

+39
-20
lines changed

4 files changed

+39
-20
lines changed

.zenodo.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,11 +524,16 @@
524524
"name": "Lukas Snoek",
525525
"orcid": "0000-0001-8972-204X"
526526
},
527+
{
528+
"affiliation": "Vrije Universiteit, Amsterdam",
529+
"name": "Gilles de Hollander",
530+
"orcid": "0000-0003-1988-5091"
531+
},
527532
{
528533
"affiliation": "University of Texas at Austin",
529534
"name": "De La Vega, Alejandro",
530535
"orcid": "0000-0001-9062-3778"
531-
},
536+
}
532537
],
533538
"keywords": [
534539
"neuroimaging",

nipype/interfaces/afni/preprocess.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class AlignEpiAnatPyOutputSpec(TraitedSpec):
119119
desc="matrix to volume register and align epi"
120120
"to anatomy and put into standard space")
121121
epi_vr_motion = File(
122-
desc="motion parameters from EPI time-series"
122+
desc="motion parameters from EPI time-series"
123123
"registration (tsh included in name if slice"
124124
"timing correction is also included).")
125125
skullstrip = File(
@@ -131,20 +131,20 @@ class AlignEpiAnatPy(AFNIPythonCommand):
131131
an EPI and an anatomical structural dataset, and applies the resulting
132132
transformation to one or the other to bring them into alignment.
133133
134-
This script computes the transforms needed to align EPI and
135-
anatomical datasets using a cost function designed for this purpose. The
136-
script combines multiple transformations, thereby minimizing the amount of
134+
This script computes the transforms needed to align EPI and
135+
anatomical datasets using a cost function designed for this purpose. The
136+
script combines multiple transformations, thereby minimizing the amount of
137137
interpolation applied to the data.
138-
138+
139139
Basic Usage:
140140
align_epi_anat.py -anat anat+orig -epi epi+orig -epi_base 5
141-
141+
142142
The user must provide EPI and anatomical datasets and specify the EPI
143-
sub-brick to use as a base in the alignment.
143+
sub-brick to use as a base in the alignment.
144144
145145
Internally, the script always aligns the anatomical to the EPI dataset,
146-
and the resulting transformation is saved to a 1D file.
147-
As a user option, the inverse of this transformation may be applied to the
146+
and the resulting transformation is saved to a 1D file.
147+
As a user option, the inverse of this transformation may be applied to the
148148
EPI dataset in order to align it to the anatomical data instead.
149149
150150
This program generates several kinds of output in the form of datasets
@@ -182,7 +182,7 @@ def _list_outputs(self):
182182
epi_prefix = ''.join(self._gen_fname(self.inputs.in_file).split('+')[:-1])
183183
outputtype = self.inputs.outputtype
184184
if outputtype == 'AFNI':
185-
ext = '.HEAD'
185+
ext = '.HEAD'
186186
else:
187187
Info.output_type_to_ext(outputtype)
188188
matext = '.1D'
@@ -620,7 +620,7 @@ class AutoTLRCInputSpec(CommandLineInputSpec):
620620
mandatory=True,
621621
exists=True,
622622
copyfile=False)
623-
base = traits.Str(
623+
base = traits.Str(
624624
desc = ' Reference anatomical volume'
625625
' Usually this volume is in some standard space like'
626626
' TLRC or MNI space and with afni dataset view of'
@@ -706,7 +706,7 @@ def _list_outputs(self):
706706
ext = '.HEAD'
707707
outputs['out_file'] = os.path.abspath(self._gen_fname(self.inputs.in_file, suffix='+tlrc')+ext)
708708
return outputs
709-
709+
710710
class BandpassInputSpec(AFNICommandInputSpec):
711711
in_file = File(
712712
desc='input file to 3dBandpass',

nipype/interfaces/freesurfer/tests/test_auto_LTAConvert.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,27 @@ def test_LTAConvert_inputs():
1414
),
1515
in_fsl=dict(argstr='--infsl %s',
1616
mandatory=True,
17-
xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'),
17+
xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'),
18+
),
19+
in_itk=dict(argstr='--initk %s',
20+
mandatory=True,
21+
xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'),
1822
),
1923
in_lta=dict(argstr='--inlta %s',
2024
mandatory=True,
21-
xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'),
25+
xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'),
2226
),
2327
in_mni=dict(argstr='--inmni %s',
2428
mandatory=True,
25-
xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'),
29+
xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'),
2630
),
2731
in_niftyreg=dict(argstr='--inniftyreg %s',
2832
mandatory=True,
29-
xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'),
33+
xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'),
3034
),
3135
in_reg=dict(argstr='--inreg %s',
3236
mandatory=True,
33-
xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg'),
37+
xor=('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk'),
3438
),
3539
invert=dict(argstr='--invert',
3640
),
@@ -39,6 +43,8 @@ def test_LTAConvert_inputs():
3943
),
4044
out_fsl=dict(argstr='--outfsl %s',
4145
),
46+
out_itk=dict(argstr='--outitk %s',
47+
),
4248
out_lta=dict(argstr='--outlta %s',
4349
),
4450
out_mni=dict(argstr='--outmni %s',
@@ -63,6 +69,7 @@ def test_LTAConvert_inputs():
6369

6470
def test_LTAConvert_outputs():
6571
output_map = dict(out_fsl=dict(),
72+
out_itk=dict(),
6673
out_lta=dict(),
6774
out_mni=dict(),
6875
out_reg=dict(),

nipype/interfaces/freesurfer/utils.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3084,7 +3084,7 @@ def _normalize_filenames(self):
30843084

30853085
class LTAConvertInputSpec(CommandLineInputSpec):
30863086
# Inputs
3087-
_in_xor = ('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg')
3087+
_in_xor = ('in_lta', 'in_fsl', 'in_mni', 'in_reg', 'in_niftyreg', 'in_itk')
30883088
in_lta = traits.Either(
30893089
File(exists=True), 'identity.nofile', argstr='--inlta %s',
30903090
mandatory=True, xor=_in_xor, desc='input transform of LTA type')
@@ -3100,6 +3100,9 @@ class LTAConvertInputSpec(CommandLineInputSpec):
31003100
in_niftyreg = File(
31013101
exists=True, argstr='--inniftyreg %s', mandatory=True, xor=_in_xor,
31023102
desc='input transform of Nifty Reg type (inverse RAS2RAS)')
3103+
in_itk = File(
3104+
exists=True, argstr='--initk %s', mandatory=True, xor=_in_xor,
3105+
desc='input transform of ITK type')
31033106
# Outputs
31043107
out_lta = traits.Either(
31053108
traits.Bool, File, argstr='--outlta %s',
@@ -3110,6 +3113,8 @@ class LTAConvertInputSpec(CommandLineInputSpec):
31103113
desc='output transform in MNI/XFM format')
31113114
out_reg = traits.Either(traits.Bool, File, argstr='--outreg %s',
31123115
desc='output transform in reg dat format')
3116+
out_itk = traits.Either(traits.Bool, File, argstr='--outitk %s',
3117+
desc='output transform in ITK format')
31133118
# Optional flags
31143119
invert = traits.Bool(argstr='--invert')
31153120
ltavox2vox = traits.Bool(argstr='--ltavox2vox', requires=['out_lta'])
@@ -3124,6 +3129,7 @@ class LTAConvertOutputSpec(TraitedSpec):
31243129
out_fsl = File(exists=True, desc='output transform in FSL format')
31253130
out_mni = File(exists=True, desc='output transform in MNI/XFM format')
31263131
out_reg = File(exists=True, desc='output transform in reg dat format')
3132+
out_itk = File(exists=True, desc='output transform in ITK format')
31273133

31283134

31293135
class LTAConvert(CommandLine):
@@ -3146,7 +3152,8 @@ def _format_arg(self, name, spec, value):
31463152
def _list_outputs(self):
31473153
outputs = self.output_spec().get()
31483154
for name, default in (('out_lta', 'out.lta'), ('out_fsl', 'out.mat'),
3149-
('out_mni', 'out.xfm'), ('out_reg', 'out.dat')):
3155+
('out_mni', 'out.xfm'), ('out_reg', 'out.dat'),
3156+
('out_itk', 'out.txt')):
31503157
attr = getattr(self.inputs, name)
31513158
if attr:
31523159
fname = default if attr is True else attr

0 commit comments

Comments
 (0)