Skip to content

Commit ee2f3a2

Browse files
committed
DOC: Include msm_sulc parameter, format fixes
1 parent 700a64a commit ee2f3a2

File tree

3 files changed

+44
-30
lines changed

3 files changed

+44
-30
lines changed

smriprep/interfaces/msm.py

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,37 +25,47 @@ class MSMInputSpec(CommandLineInputSpec):
2525
reference_mesh = File(
2626
exists=True,
2727
argstr="--refmesh=%s",
28-
desc="reference mesh (available formats: VTK, ASCII, GIFTI). Needs to be a sphere. If not included algorithm assumes reference mesh is equivalent input",
28+
desc="reference mesh (available formats: VTK, ASCII, GIFTI). Needs to be a sphere."
29+
"If not included algorithm assumes reference mesh is equivalent input",
2930
)
3031
in_data = File(
3132
exists=True,
3233
argstr="--indata=%s",
33-
desc="scalar or multivariate data for input - can be ASCII (.asc,.dpv,.txt) or GIFTI (.func.gii or .shape.gii)",
34+
desc="scalar or multivariate data for input - can be ASCII (.asc,.dpv,.txt) "
35+
"or GIFTI (.func.gii or .shape.gii)",
3436
)
3537
reference_data = File(
3638
exists=True,
3739
argstr="--refdata=%s",
38-
desc="scalar or multivariate data for reference - can be ASCII (.asc,.dpv,.txt) or GIFTI (.func.gii or .shape.gii)",
40+
desc="scalar or multivariate data for reference - can be ASCII (.asc,.dpv,.txt) "
41+
"or GIFTI (.func.gii or .shape.gii)",
3942
)
4043
transformed_mesh = File(
4144
exists=True,
4245
argstr="--trans=%s",
43-
desc="Transformed source mesh (output of a previous registration). Use this to initiliase the current registration.",
46+
desc="Transformed source mesh (output of a previous registration). "
47+
"Use this to initiliase the current registration.",
4448
)
4549
in_register = File(
4650
exists=True,
4751
argstr="--in_register=%s",
48-
desc="Input mesh at data resolution. Used to resample data onto input mesh if data is supplied at a different resolution. Note this mesh HAS to be in alignment with either the input_mesh of (if supplied) the transformed source mesh. Use with supreme caution.",
52+
desc="Input mesh at data resolution. Used to resample data onto input mesh if data "
53+
"is supplied at a different resolution. Note this mesh HAS to be in alignment with "
54+
"either the input_mesh of (if supplied) the transformed source mesh. "
55+
"Use with supreme caution.",
4956
)
5057
in_weight = File(
5158
exists=True,
5259
argstr="--inweight=%s",
53-
desc="cost function weighting for input - weights data in these vertices when calculating similarity (ASCII or GIFTI). Can be multivariate provided dimension equals that of data",
60+
desc="cost function weighting for input - weights data in these vertices when calculating "
61+
"similarity (ASCII or GIFTI). Can be multivariate provided dimension equals that of data",
5462
)
5563
reference_weight = File(
5664
exists=True,
5765
argstr="--refweight=%s",
58-
desc="cost function weighting for reference - weights data in these vertices when calculating similarity (ASCII or GIFTI). Can be multivariate provided dimension equals that of data",
66+
desc="cost function weighting for reference - weights data in these vertices when "
67+
"calculating similarity (ASCII or GIFTI). Can be multivariate provided dimension "
68+
"equals that of data",
5969
)
6070
output_format = traits.Enum(
6171
"GIFTI",
@@ -72,7 +82,8 @@ class MSMInputSpec(CommandLineInputSpec):
7282
)
7383
levels = traits.Int(
7484
argstr="--levels=%d",
75-
desc="number of resolution levels (default = number of resolution levels specified by --opt in config file)",
85+
desc="number of resolution levels (default = number of resolution levels specified "
86+
"by --opt in config file)",
7687
)
7788
smooth_output_sigma = traits.Int(
7889
argstr="--smoothout=%d",
@@ -86,10 +97,12 @@ class MSMInputSpec(CommandLineInputSpec):
8697

8798
class MSMOutputSpec(TraitedSpec):
8899
warped_mesh = File(
89-
desc="the warped input mesh (i.e., new vertex locations - this capture the warp field, much like a *_warp.nii.gz file would for volumetric warps created by FNIRT)."
100+
desc="the warped input mesh (i.e., new vertex locations - this capture the warp field, "
101+
"much like a _warp.nii.gz file would for volumetric warps created by FNIRT)."
90102
)
91103
downsampled_warped_mesh = File(
92-
desc="a downsampled version of the warped_mesh where the resolution of this mesh will be equivalent to the resolution of the final datamesh"
104+
desc="a downsampled version of the warped_mesh where the resolution of this mesh will "
105+
"be equivalent to the resolution of the final datamesh"
93106
)
94107
warped_data = File(
95108
desc="the input data passed through the MSM warp and projected onto the target surface"
@@ -106,9 +119,9 @@ class MSM(CommandLine):
106119
univariate (sulcal depth, curvature, myelin), multivariate (Task fMRI, or Resting State
107120
Networks) or multimodal (combinations of folding, myelin and fMRI) feature sets.
108121
109-
The main MSM tool is currently run from the command line using the program `msm`.
122+
The main MSM tool is currently run from the command line using the program ``msm``.
110123
This enables fast alignment of spherical cortical surfaces by utilising a fast discrete
111-
optimisation framework (FastPD: Komodakis 2007), which significantly reduces the search
124+
optimisation framework (FastPD Komodakis 2007), which significantly reduces the search
112125
space of possible deformations for each vertex, and allows flexibility with regards to the
113126
choice of similarity metric used to match the images.
114127
"""
@@ -117,7 +130,6 @@ class MSM(CommandLine):
117130
output_spec = MSMOutputSpec
118131
_cmd = "msm"
119132

120-
121133
def _list_outputs(self):
122134
from nipype.utils.filemanip import split_filename
123135

smriprep/interfaces/workbench.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,17 @@ class SurfaceAffineRegressionOutputSpec(TraitedSpec):
173173

174174

175175
class SurfaceAffineRegression(WBCommand):
176-
"""
177-
REGRESS THE AFFINE TRANSFORM BETWEEN SURFACES ON THE SAME MESH
176+
"""REGRESS THE AFFINE TRANSFORM BETWEEN SURFACES ON THE SAME MESH
177+
178178
wb_command -surface-affine-regression
179-
<source> - the surface to warp
180-
<target> - the surface to match the coordinates of
181-
<affine-out> - output - the output affine file
179+
<source> - the surface to warp
180+
<target> - the surface to match the coordinates of
181+
<affine-out> - output - the output affine file
182182
183183
Use linear regression to compute an affine that minimizes the sum of
184184
squares of the coordinate differences between the target surface and the
185-
warped source surface. Note that this has a bias to shrink the surface
186-
that is being warped. The output is written as a NIFTI 'world' matrix,
185+
warped source surface. Note that this has a bias to shrink the surface
186+
that is being warped. The output is written as a NIFTI 'world' matrix,
187187
see -convert-affine to convert it for use in other software.
188188
"""
189189
input_spec = SurfaceAffineRegressionInputSpec
@@ -234,16 +234,16 @@ class SurfaceApplyAffineOutputSpec(TraitedSpec):
234234

235235

236236
class SurfaceApplyAffine(WBCommand):
237-
"""
238-
APPLY AFFINE TRANSFORM TO SURFACE FILE
237+
"""APPLY AFFINE TRANSFORM TO SURFACE FILE
238+
239239
wb_command -surface-apply-affine
240-
<in-surf> - the surface to transform
241-
<affine> - the affine file
242-
<out-surf> - output - the output transformed surface
240+
<in-surf> - the surface to transform
241+
<affine> - the affine file
242+
<out-surf> - output - the output transformed surface
243243
244-
[-flirt] - MUST be used if affine is a flirt affine
245-
<source-volume> - the source volume used when generating the affine
246-
<target-volume> - the target volume used when generating the affine
244+
[-flirt] - MUST be used if affine is a flirt affine
245+
<source-volume> - the source volume used when generating the affine
246+
<target-volume> - the target volume used when generating the affine
247247
248248
For flirt matrices, you must use the -flirt option, because flirt
249249
matrices are not a complete description of the coordinate transform they
@@ -291,8 +291,8 @@ class SurfaceApplyWarpfieldOutputSpec(TraitedSpec):
291291

292292

293293
class SurfaceApplyWarpfield(WBCommand):
294-
"""
295-
APPLY WARPFIELD TO SURFACE FILE
294+
"""APPLY WARPFIELD TO SURFACE FILE
295+
296296
wb_command -surface-apply-warpfield
297297
<in-surf> - the surface to transform
298298
<warpfield> - the INVERSE warpfield

smriprep/workflows/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def init_smriprep_wf(
9191
layout=BIDSLayout('.'),
9292
longitudinal=False,
9393
low_mem=False,
94+
msm_sulc=False,
9495
omp_nthreads=1,
9596
output_dir='.',
9697
run_uuid='testrun',
@@ -255,6 +256,7 @@ def init_single_subject_wf(
255256
layout=BIDSLayout('.'),
256257
longitudinal=False,
257258
low_mem=False,
259+
msm_sulc=False,
258260
name='single_subject_wf',
259261
omp_nthreads=1,
260262
output_dir='.',

0 commit comments

Comments
 (0)