@@ -20,18 +20,18 @@ class SFPICOCalibDataInputSpec(StdOutCommandLineInputSpec):
20
20
scheme_file = File (exists = True , argstr = '-schemefile %s' , mandatory = True ,
21
21
desc = 'Specifies the scheme file for the diffusion MRI data' )
22
22
info_file = File (desc = 'The name to be given to the information output filename.' ,
23
- argstr = '-infooutputfile %s' , mandatory = True , genfile = True ,
23
+ argstr = '-infooutputfile %s' , mandatory = True , genfile = True ,
24
24
hash_files = False ) # Genfile and hash_files?
25
25
trace = traits .Float (argstr = '-trace %f' , units = 'NA' ,
26
- desc = 'Trace of the diffusion tensor(s) used in the test function.' )
27
- onedtfarange = traits .List (traits .Float , argstr = '-onedtfarange %s' ,
26
+ desc = 'Trace of the diffusion tensor(s) used in the test function.' )
27
+ onedtfarange = traits .List (traits .Float , argstr = '-onedtfarange %s' ,
28
28
minlen = 2 , maxlen = 2 , units = 'NA' ,
29
29
desc = ('Minimum and maximum FA for the single tensor '
30
30
'synthetic data.' ))
31
31
onedtfastep = traits .Float (argstr = '-onedtfastep %f' , units = 'NA' ,
32
32
desc = ('FA step size controlling how many steps there are '
33
33
'between the minimum and maximum FA settings.' ))
34
- twodtfarange = traits .List (traits .Float , argstr = '-twodtfarange %s' ,
34
+ twodtfarange = traits .List (traits .Float , argstr = '-twodtfarange %s' ,
35
35
minlen = 2 , maxlen = 2 , units = 'NA' ,
36
36
desc = ('Minimum and maximum FA for the two tensor '
37
37
'synthetic data. FA is varied for both tensors '
@@ -40,7 +40,7 @@ class SFPICOCalibDataInputSpec(StdOutCommandLineInputSpec):
40
40
desc = ('FA step size controlling how many steps there are '
41
41
'between the minimum and maximum FA settings '
42
42
'for the two tensor cases.' ))
43
- twodtanglerange = traits .List (traits .Float , argstr = '-twodtanglerange %s' ,
43
+ twodtanglerange = traits .List (traits .Float , argstr = '-twodtanglerange %s' ,
44
44
minlen = 2 , maxlen = 2 , units = 'NA' ,
45
45
desc = ('Minimum and maximum crossing angles '
46
46
'between the two fibres.' ))
@@ -55,7 +55,7 @@ class SFPICOCalibDataInputSpec(StdOutCommandLineInputSpec):
55
55
desc = ('Mixing parameter step size for the two tensor cases. '
56
56
'Specify how many mixing parameter increments to use.' ))
57
57
seed = traits .Float (argstr = '-seed %f' , units = 'NA' ,
58
- desc = 'Specifies the random seed to use for noise generation in simulation trials.' )
58
+ desc = 'Specifies the random seed to use for noise generation in simulation trials.' )
59
59
60
60
class SFPICOCalibDataOutputSpec (TraitedSpec ):
61
61
PICOCalib = File (exists = True , desc = 'Calibration dataset' )
@@ -64,37 +64,37 @@ class SFPICOCalibDataOutputSpec(TraitedSpec):
64
64
class SFPICOCalibData (StdOutCommandLine ):
65
65
"""
66
66
Generates Spherical Function PICo Calibration Data.
67
-
68
- SFPICOCalibData creates synthetic data for use with SFLUTGen. The
69
- synthetic data is generated using a mixture of gaussians, in the
70
- same way datasynth generates data. Each voxel of data models a
67
+
68
+ SFPICOCalibData creates synthetic data for use with SFLUTGen. The
69
+ synthetic data is generated using a mixture of gaussians, in the
70
+ same way datasynth generates data. Each voxel of data models a
71
71
slightly different fibre configuration (varying FA and fibre-
72
- crossings) and undergoes a random rotation to help account for any
73
- directional bias in the chosen acquisition scheme. A second file,
72
+ crossings) and undergoes a random rotation to help account for any
73
+ directional bias in the chosen acquisition scheme. A second file,
74
74
which stores information about the datafile, is generated along with
75
75
the datafile.
76
76
77
77
Example 1
78
78
---------
79
79
To create a calibration dataset using the default settings
80
-
80
+
81
81
>>> import nipype.interfaces.camino as cam
82
82
>>> calib = cam.SFPICOCalibData()
83
83
>>> calib.inputs.scheme_file = 'A.scheme'
84
84
>>> calib.inputs.snr = 20
85
85
>>> calib.inputs.info_file = 'PICO_calib.info'
86
- >>> calib.run() # doctest: +SKIP
87
-
88
- The default settings create a large dataset (249,231 voxels), of
89
- which 3401 voxels contain a single fibre population per voxel and
90
- the rest of the voxels contain two fibre-populations. The amount of
91
- data produced can be varied by specifying the ranges and steps of
86
+ >>> calib.run() # doctest: +SKIP
87
+
88
+ The default settings create a large dataset (249,231 voxels), of
89
+ which 3401 voxels contain a single fibre population per voxel and
90
+ the rest of the voxels contain two fibre-populations. The amount of
91
+ data produced can be varied by specifying the ranges and steps of
92
92
the parameters for both the one and two fibre datasets used.
93
-
93
+
94
94
Example 2
95
95
---------
96
96
To create a custom calibration dataset
97
-
97
+
98
98
>>> import nipype.interfaces.camino as cam
99
99
>>> calib = cam.SFPICOCalibData()
100
100
>>> calib.inputs.scheme_file = 'A.scheme'
@@ -106,11 +106,11 @@ class SFPICOCalibData(StdOutCommandLine):
106
106
>>> calib.inputs.twodtanglestep = 0.03925
107
107
>>> calib.inputs.twodtmixmax = 0.8
108
108
>>> calib.inputs.twodtmixstep = 0.1
109
- >>> calib.run() # doctest: +SKIP
110
-
109
+ >>> calib.run() # doctest: +SKIP
110
+
111
111
This would provide 76,313 voxels of synthetic data, where 3401 voxels
112
- simulate the one fibre cases and 72,912 voxels simulate the various
113
- two fibre cases. However, care should be taken to ensure that enough
112
+ simulate the one fibre cases and 72,912 voxels simulate the various
113
+ two fibre cases. However, care should be taken to ensure that enough
114
114
data is generated for calculating the LUT. # doctest: +SKIP
115
115
"""
116
116
_cmd = 'sfpicocalibdata'
@@ -140,7 +140,7 @@ class SFLUTGenInputSpec(StdOutCommandLineInputSpec):
140
140
'[outputstem]_oneFibreSurfaceCoeffs.Bdouble and '
141
141
'[outputstem]_twoFibreSurfaceCoeffs.Bdouble' ),
142
142
usedefault = True )
143
- pdf = traits .Enum ('bingham' , 'watson' , argstr = '-pdf %s' ,
143
+ pdf = traits .Enum ('bingham' , 'watson' , argstr = '-pdf %s' ,
144
144
desc = ('Sets the distribution to use for the calibration. The default is the Bingham '
145
145
'distribution, which allows elliptical probability density contours. '
146
146
'Currently supported options are: '
@@ -160,7 +160,7 @@ class SFLUTGenInputSpec(StdOutCommandLineInputSpec):
160
160
'number per bin to get things running in quick tests, but the sta- '
161
161
'tistics will not be reliable and for serious applications, you need '
162
162
'to increase the size of the calibration data set until the error goes.' ))
163
- directmap = traits .Bool (argstr = '-directmap' ,
163
+ directmap = traits .Bool (argstr = '-directmap' ,
164
164
desc = ('Use direct mapping between the eigenvalues and the distribution parameters '
165
165
'instead of the log of the eigenvalues.' ))
166
166
order = traits .Int (argstr = '-order %d' , units = 'NA' ,
@@ -170,21 +170,21 @@ class SFLUTGenInputSpec(StdOutCommandLineInputSpec):
170
170
class SFLUTGenOutputSpec (TraitedSpec ):
171
171
lut_one_fibre = File (exists = True , desc = 'PICo lut for one-fibre model' )
172
172
lut_two_fibres = File (exists = True , desc = 'PICo lut for two-fibre model' )
173
-
173
+
174
174
class SFLUTGen (StdOutCommandLine ):
175
175
"""
176
176
Generates PICo lookup tables (LUT) for multi-fibre methods such as
177
177
PASMRI and Q-Ball.
178
-
178
+
179
179
SFLUTGen creates the lookup tables for the generalized multi-fibre
180
180
implementation of the PICo tractography algorithm. The outputs of
181
181
this utility are either surface or line coefficients up to a given
182
182
order. The calibration can be performed for different distributions,
183
183
such as the Bingham and Watson distributions.
184
-
184
+
185
185
This utility uses calibration data generated from SFPICOCalibData
186
186
and peak information created by SFPeaks.
187
-
187
+
188
188
The utility outputs two lut's, *_oneFibreSurfaceCoeffs.Bdouble and
189
189
*_twoFibreSurfaceCoeffs.Bdouble. Each of these files contains big-
190
190
endian doubles as standard. The format of the output is:
@@ -194,9 +194,9 @@ class SFLUTGen(StdOutCommandLine):
194
194
coefficient_2
195
195
...
196
196
coefficient_N
197
- In the case of the Watson, there is a single set of coefficients,
198
- which are ordered:
199
- constant, x, x^2, ..., x^order.
197
+ In the case of the Watson, there is a single set of coefficients,
198
+ which are ordered:
199
+ constant, x, x^2, ..., x^order.
200
200
In the case of the Bingham, there are two sets of coefficients (one
201
201
for each surface), ordered so that:
202
202
for j = 1 to order
@@ -207,12 +207,12 @@ class SFLUTGen(StdOutCommandLine):
207
207
Example
208
208
---------
209
209
To create a calibration dataset using the default settings
210
-
210
+
211
211
>>> import nipype.interfaces.camino as cam
212
212
>>> lutgen = cam.SFLUTGen()
213
213
>>> lutgen.inputs.in_file = 'QSH_peaks.Bdouble'
214
214
>>> lutgen.inputs.info_file = 'PICO_calib.info'
215
- >>> lutgen.run() # doctest: +SKIP
215
+ >>> lutgen.run() # doctest: +SKIP
216
216
"""
217
217
_cmd = 'sflutgen'
218
218
input_spec = SFLUTGenInputSpec
0 commit comments