Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR “AS IS” AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Wraps the process of building an argparser that reflects the workflow that we want to run along with some generic parameters like logging, force and output strategies.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Reslice data with new voxel resolution defined by new_vox_sz
Parameters:
input_filesstring
Path to the input volumes. This path may contain wildcards to
process multiple inputs at once.
new_vox_sizevariable float
new voxel size.
orderint, optional
order of interpolation, from 0 to 5, for resampling/reslicing,
0 nearest interpolation, 1 trilinear etc.. if you don’t want any
smoothing 0 is the option you need.
modestring, optional
Points outside the boundaries of the input are filled according
to the given mode ‘constant’, ‘nearest’, ‘reflect’ or ‘wrap’.
cvalfloat, optional
Value used for points outside the boundaries of the input if
mode=’constant’.
num_processesint, optional
Split the calculation to a pool of children processes. This only
applies to 4D data arrays. Default is 1. If < 0 the maximal
number of cores minus num_processes+1 is used (enter -1 to
use as many cores as possible). 0 raises an error.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
List of target bundle tractograms that will be moved/registered to
match the static bundles.
x0string, optional
rigid, similarity or affine transformation model.
rm_small_clustersint, optional
Remove clusters that have less than rm_small_clusters.
qbx_thrvariable int, optional
Thresholds for QuickBundlesX.
num_threadsint, optional
Number of threads to be used for OpenMP parallelization. If None
(default) the value of OMP_NUM_THREADS environment variable is
used if it is set, otherwise all available threads are used. If
< 0 the maximal number of threads minus \(|num_threads + 1|\) is used
(enter -1 to use as many threads as possible). 0 raises an error.
Only metrics using OpenMP will use this variable.
greater_thanint, optional
Keep streamlines that have length greater than
this value.
less_thanint, optional
Keep streamlines have length less than this value.
nb_ptsint, optional
Number of points for discretizing each streamline.
progressiveboolean, optional
True to enable progressive registration.
out_dirstring, optional
Output directory. (default current directory)
out_movedstring, optional
Filename of moved tractogram.
out_affinestring, optional
Filename of affine for SLR transformation.
out_stat_centroidsstring, optional
Filename of static centroids.
out_moving_centroidsstring, optional
Filename of moving centroids.
out_moved_centroidsstring, optional
Filename of moved centroids.
Notes
The order of operations is the following. First short or long
streamlines are removed. Second the tractogram or a random selection
of the tractogram is clustered with QuickBundlesX. Then SLR
[2] is applied.
The registration workflow allows the user to use only one type of
registration (such as center of mass or rigid body registration only).
Alternatively, a registration can be done in a progressive manner.
For example, using affine registration with progressive set to ‘True’
will involve center of mass, translation, rigid body and full affine
registration. Whereas, when progressive is False the registration will
include only center of mass and affine registration. The progressive
registration will be slower but will improve the quality.
This can be controlled by using the progressive flag (True by default).
Methods
get_io_iterator()
Create an iterator for IO.
get_short_name()
Return A short name for the workflow used to subdivide.
get_sub_runs()
Return No sub runs since this is a simple workflow.
manage_output_overwrite()
Check if a file will be overwritten upon processing the inputs.
'com': center of mass; 'trans': translation; 'rigid':
rigid body; 'rigid_isoscaling': rigid body + isotropic scaling,
'rigid_scaling': rigid body + scaling; 'affine': full affine
including translation, rotation, shearing and scaling.
nbinsint, optional
Number of bins to discretize the joint and marginal PDF.
sampling_propint, optional
Number ([0-100]) of voxels for calculating the PDF. None implies all
voxels.
metricstring, optional
Similarity metric for gathering mutual information.
level_itersvariable int, optional
The number of iterations at each scale of the scale space.
level_iters[0] corresponds to the coarsest scale,
level_iters[-1] the finest, where n is the length of the
sequence.
sigmasvariable floats, optional
Custom smoothing parameter to build the scale space (one parameter
for each scale).
factorsvariable floats, optional
Custom scale factors to build the scale space (one factor for each
scale).
progressiveboolean, optional
Enable/Disable the progressive registration.
save_metricboolean, optional
If true, quality assessment metric are saved in
‘quality_metric.txt’.
static_vol_idxstr, optional
1D array representing indices of axis=-1 of a 4D
static input volume. From the command line use something like
3 4 5 6. From script use something like [3, 4, 5, 6]. This
input is required for 4D volumes.
moving_vol_idxstr, optional
1D array representing indices of axis=-1 of a 4D
moving input volume. From the command line use something like
3 4 5 6. From script use something like [3, 4, 5, 6]. This
input is required for 4D volumes.
out_dirstring, optional
Directory to save the transformed image and the affine matrix
(default current directory).
out_movedstring, optional
Name for the saved transformed image.
out_affinestring, optional
Name for the saved affine matrix.
out_qualitystring, optional
Name of the file containing the saved quality metric.
Path of the moving image(s). It can be a single image or a
folder containing multiple images.
transform_map_filestring
For the affine case, it should be a text(*.txt) file containing
the affine matrix. For the diffeomorphic case,
it should be a nifti file containing the mapping displacement
field in each voxel with this shape (x, y, z, 3, 2).
transform_typestring, optional
Select the transformation type to apply between ‘affine’ or
‘diffeomorphic’.
out_dirstring, optional
Directory to save the transformed files (default current directory).
out_filestring, optional
Name of the transformed file.
It is recommended to use the flag –mix-names to
prevent the output files from being overwritten.
The text file containing pre alignment information via an
affine matrix.
inv_staticboolean, optional
Apply the inverse mapping to the static image.
level_itersvariable int, optional
The number of iterations at each level of the gaussian pyramid.
metricstring, optional
The metric to be used.
metric available: cc (Cross Correlation), ssd (Sum Squared
Difference), em (Expectation-Maximization).
mopt_sigma_difffloat, optional
Metric option applied on Cross correlation (CC).
The standard deviation of the Gaussian smoothing kernel to be
applied to the update field at each iteration.
mopt_radiusint, optional
Metric option applied on Cross correlation (CC).
the radius of the squared (cubic) neighborhood at each voxel to
be considered to compute the cross correlation.
mopt_smoothfloat, optional
Metric option applied on Sum Squared Difference (SSD) and
Expectation Maximization (EM). Smoothness parameter, the
larger the value the smoother the deformation field.
(default 1.0 for EM, 4.0 for SSD)
mopt_inner_iterint, optional
Metric option applied on Sum Squared Difference (SSD) and
Expectation Maximization (EM). This is number of iterations to be
performed at each level of the multi-resolution Gauss-Seidel
optimization algorithm (this is not the number of steps per
Gaussian Pyramid level, that parameter must be set for the
optimizer, not the metric). Default 5 for EM, 10 for SSD.
mopt_q_levelsint, optional
Metric option applied on Expectation Maximization (EM).
Number of quantization levels (Default: 256 for EM)
mopt_double_gradientbool, optional
Metric option applied on Expectation Maximization (EM).
if True, the gradient of the expected static image under the moving
modality will be added to the gradient of the moving image,
similarly, the gradient of the expected moving image under the
static modality will be added to the gradient of the static image.
mopt_step_typestring, optional
Metric option applied on Sum Squared Difference (SSD) and
Expectation Maximization (EM). The optimization schedule to be
used in the multi-resolution Gauss-Seidel optimization algorithm
(not used if Demons Step is selected). Possible value:
(‘gauss_newton’, ‘demons’). default: ‘gauss_newton’ for EM,
‘demons’ for SSD.
step_lengthfloat, optional
the length of the maximum displacement vector of the update
displacement field at each iteration.
ss_sigma_factorfloat, optional
parameter of the scale-space smoothing kernel. For example, the
std. dev. of the kernel will be factor*(2^i) in the isotropic case
where i = 0, 1, …, n_scales is the scale.
opt_tolfloat, optional
the optimization will stop when the estimated derivative of the
energy profile w.r.t. time falls below this threshold.
inv_iterint, optional
the number of iterations to be performed by the displacement field
inversion algorithm.
inv_tolfloat, optional
the displacement field inversion algorithm will stop iterating
when the inversion error falls below this threshold.
out_dirstring, optional
Directory to save the transformed files (default current directory).
out_warpedstring, optional
Name of the warped file.
out_inv_staticstring, optional
Name of the file to save the static image after applying the
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
BundleWarp [4] is a nonrigid registration method
for deformable registration of white matter tracts.
Parameters:
static_filestring
Path to the static (reference) .trk file.
moving_filestring
Path to the moving (target to be registered) .trk file.
diststring, optional
Path to the precalculated distance matrix file.
alphafloat, optional
Represents the trade-off between regularizing the deformation and
having points match very closely. Lower value of alpha means high
deformations. It is represented with λ in BundleWarp paper. NOTE:
setting alpha<=0.01 will result in highly deformable registration
that could extremely modify the original anatomy of the moving
bundle.
betaint, optional
Represents the strength of the interaction between points
Gaussian kernel size.
max_iterint, optional
Maximum number of iterations for deformation process in ml-CPD
method.
affineboolean, optional
If False, use rigid registration as starting point. (default True)
out_dirstring, optional
Output directory. (default current directory)
out_linear_movedstring, optional
Filename of linearly moved bundle.
out_nonlinear_movedstring, optional
Filename of nonlinearly moved (warped) bundle.
out_warp_transformstring, optional
Filename of warp transformations generated by BundleWarp.
out_warp_kernelstring, optional
Filename of regularization gaussian kernel generated by BundleWarp.
out_diststring, optional
Filename of MDF distance matrix.
out_matched_pairsstring, optional
Filename of matched pairs; streamline correspondences between two
bundles.
the image to be used as reference during optimization.
moving: 2D or 3D array
the image to be used as “moving” during optimization. It is
necessary to pre-align the moving image to ensure its domain
lies inside the domain of the deformation fields. This is assumed
to be accomplished by “pre-aligning” the moving image towards the
static using an affine transformation given by the
‘starting_affine’ matrix.
Take an array of workflow objects and use introspection to extract
the parameters, types and docstrings of their run method. Only the
optional input parameters are extracted for these as they are treated
as sub workflows.
Parameters:
sub_flowsarray of dipy.workflows.workflow.Workflow
Workflows to inspect.
Returns:
sub_flow_optionalsdictionary of all sub workflow optional parameters
Take a workflow object and use introspection to extract the
parameters, types and docstrings of its run method. Then add these
parameters to the current arparser’s own params to parse. If the
workflow is of type combined_workflow, the optional input parameters
of its sub workflows will also be added.
Parameters:
workflowdipy.workflows.workflow.Workflow
Workflow from which to infer parameters.
Returns:
sub_flow_optionalsdictionary of all sub workflow optional parameters
Runs the sub flow with the optional parameters passed via the
command line. This is a convenience method to make sub flow running
more intuitive on the concrete CombinedWorkflow side.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
See [5] for further details about the method.
See [6] for further details about the new method.
It applies patch2self denoising [5] on each file
found by ‘globing’ input_file and bval_file. It saves the
results in a directory specified by out_dir.
Parameters:
input_filesstring
Path to the input volumes. This path may contain wildcards to
process multiple inputs at once.
bval_filesstring
bval file associated with the diffusion data.
modelstring, or initialized linear model object.
This will determine the algorithm used to solve the set of linear
equations underlying this model. If it is a string it needs to be
one of the following: {‘ols’, ‘ridge’, ‘lasso’}. Otherwise,
it can be an object that inherits from
dipy.optimize.SKLearnLinearSolver or an object with a similar
interface from Scikit-Learn:
sklearn.linear_model.LinearRegression,
sklearn.linear_model.Lasso or sklearn.linear_model.Ridge
and other objects that inherit from sklearn.base.RegressorMixin.
Default: ‘ols’.
b0_thresholdint, optional
Threshold for considering volumes as b0.
alphafloat, optional
Regularization parameter only for ridge regression model.
verbosebool, optional
Show progress of Patch2Self and time taken.
patch_radiusvariable int, optional
The radius of the local patch to be taken around each voxel
b0_denoisingbool, optional
Skips denoising b0 volumes if set to False.
clip_negative_valsbool, optional
Sets negative values after denoising to 0 using np.clip.
shift_intensitybool, optional
Shifts the distribution of intensities per volume to give
non-negative values
verint, optional
Version of the Patch2Self algorithm to use between 1 or 3.
out_dirstring, optional
Output directory (default current directory)
out_denoisedstring, optional
Name of the resulting denoised volume
(default: dwi_patch2self.nii.gz)
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Path to the input volumes. This path may contain wildcards to
process multiple inputs at once.
bvalues_filesstring
Path to the bvalues files. This path may contain wildcards to use
multiple bvalues files at once.
bvectors_filesstring
Path to the bvectors files. This path may contain wildcards to use
multiple bvectors files at once.
sigmafloat, optional
Standard deviation of the noise estimated from the data.
0 means sigma value estimation following the algorithm in
Manjón et al.[9].
b0_thresholdfloat, optional
Threshold used to find b0 volumes.
bvecs_tolfloat, optional
Threshold used to check that norm(bvec) = 1 +/- bvecs_tol
b-vectors are unit vectors.
patch_radiusint, optional
The radius of the local patch to be taken around each voxel (in
voxels) For example, for a patch radius with value 2, and assuming
the input image is a 3D image, the denoising will take place in
blocks of 5x5x5 voxels.
pca_methodstring, optional
Use either eigenvalue decomposition (‘eig’) or singular value
decomposition (‘svd’) for principal component analysis. The default
method is ‘eig’ which is faster. However, occasionally ‘svd’ might
be more accurate.
tau_factorfloat, optional
Thresholding of PCA eigenvalues is done by nulling out eigenvalues
that are smaller than:
\[\tau = (\tau_{factor} \sigma)^2\]
\(\tau_{factor}\) can be change to adjust the relationship between the
noise standard deviation and the threshold \(\tau\). If
\(\tau_{factor}\) is set to None, it will be automatically calculated
using the Marcenko-Pastur distribution :footcite:p`Veraart2016b`.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Path to the input volumes. This path may contain wildcards to
process multiple inputs at once.
patch_radiusvariable int, optional
The radius of the local patch to be taken around each voxel (in
voxels) For example, for a patch radius with value 2, and assuming
the input image is a 3D image, the denoising will take place in
blocks of 5x5x5 voxels.
pca_methodstring, optional
Use either eigenvalue decomposition (‘eig’) or singular value
decomposition (‘svd’) for principal component analysis. The default
method is ‘eig’ which is faster. However, occasionally ‘svd’ might
be more accurate.
return_sigmabool, optional
If true, a noise standard deviation estimate based on the
Marcenko-Pastur distribution is returned [10].
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
See [11] and [12] for
further details about the method.
Parameters:
input_filesstring
Path to the input volumes. This path may contain wildcards to
process multiple inputs at once.
slice_axisint, optional
Data axis corresponding to the number of acquired slices.
Could be (0, 1, or 2): for example, a value of 2 would mean the
third axis.
n_pointsint, optional
Number of neighbour points to access local TV (see note).
num_processesint or None, optional
Split the calculation to a pool of children processes. Only
applies to 3D or 4D data arrays. Default is 1. If < 0 the maximal
number of cores minus num_processes+1 is used (enter -1 to
use as many cores as possible). 0 raises an error.
Wraps the process of building an argparser that reflects the workflow
that we want to run along with some generic parameters like logging,
force and output strategies. The resulting parameters are then fed to
the workflow’s run method.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Provides useful information about different files used in
medical imaging. Any number of input files can be provided. The
program identifies the type of file by its extension.
Parameters:
input_filesvariable string
Any number of Nifti1, bvals or bvecs files.
b0_thresholdfloat, optional
Threshold used to find b0 volumes.
bvecs_tolfloat, optional
Threshold used to check that norm(bvec) = 1 +/- bvecs_tol
b-vectors are unit vectors.
bshell_thrfloat, optional
Threshold for distinguishing b-values in different shells.
referencestring, optional
Reference anatomy for tck/vtk/fib/dpy file.
support (.nii or .nii.gz).
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Converts SH basis representation between DIPY and MRtrix3 formats.
Because this conversion is equal to its own inverse, it can be used to
convert in either direction: DIPY to MRtrix3 or vice versa.
Parameters:
input_filesstring
Path to the input files. This path may contain wildcards to
process multiple inputs at once.
out_dirstring, optional
Where the resulting file will be saved. (default ‘’)
out_filestring, optional
Name of the result file to be saved.
(default ‘sh_convert_dipy_mrtrix_out.nii.gz’)
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Convert multiple nifti files to a single pam5 file.
Parameters:
peaks_dir_filesstring
Path to the input peaks directions volume. This path may contain
wildcards to process multiple inputs at once.
peaks_values_filesstring
Path to the input peaks values volume. This path may contain
wildcards to process multiple inputs at once.
peaks_indices_filesstring
Path to the input peaks indices volume. This path may contain
wildcards to process multiple inputs at once.
shm_filesstring, optional
Path to the input spherical harmonics volume. This path may
contain wildcards to process multiple inputs at once.
gfa_filesstring, optional
Path to the input generalized FA volume. This path may contain
wildcards to process multiple inputs at once.
sphere_filesstring, optional
Path to the input sphere vertices. This path may contain
wildcards to process multiple inputs at once. If it is not define,
default_sphere option will be used.
default_sphere_namestring, optional
Specify default sphere to use for spherical harmonics
representation. This option can be superseded by
sphere_files option. Possible options: [‘symmetric362’, ‘symmetric642’,
‘symmetric724’, ‘repulsion724’, ‘repulsion100’, ‘repulsion200’].
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Convert multiple tensor files(evals, evecs) to pam5 files.
Parameters:
evals_filesstring
Path to the input eigen values volumes. This path may contain
wildcards to process multiple inputs at once.
evecs_filesstring
Path to the input eigen vectors volumes. This path may contain
wildcards to process multiple inputs at once.
sphere_filesstring, optional
Path to the input sphere vertices. This path may contain
wildcards to process multiple inputs at once. If it is not define,
default_sphere option will be used.
default_sphere_namestring, optional
Specify default sphere to use for spherical harmonics
representation. This option can be superseded by sphere_files
option. Possible options: [‘symmetric362’, ‘symmetric642’,
‘symmetric724’, ‘repulsion724’, ‘repulsion100’, ‘repulsion200’].
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Workflow for fitting the MAPMRI model (with optional Laplacian
regularization). Generates rtop, lapnorm, msd, qiv, rtap, rtpp,
non-gaussian (ng), parallel ng, perpendicular ng saved in a nifti
format in input files provided by data_files and saves the nifti
files to an output directory specified by out_dir.
In order for the MAPMRI workflow to work in the way
intended either the Laplacian or positivity or both must
be set to True.
Parameters:
data_filesstring
Path to the input volume.
bvals_filesstring
Path to the bval files.
bvecs_filesstring
Path to the bvec files.
small_deltafloat
Small delta value used in generation of gradient table of provided
bval and bvec.
big_deltafloat
Big delta value used in generation of gradient table of provided
bval and bvec.
b0_thresholdfloat, optional
Threshold used to find b0 volumes.
laplacianbool, optional
Regularize using the Laplacian of the MAP-MRI basis.
positivitybool, optional
Constrain the propagator to be positive.
bval_thresholdfloat, optional
Sets the b-value threshold to be used in the scale factor
estimation. In order for the estimated non-Gaussianity to have
meaning this value should set to a lower value (b<2000 s/mm^2)
such that the scale factors are estimated on signal points that
reasonably represent the spins at Gaussian diffusion.
save_metricsvariable string, optional
List of metrics to save.
Possible values: rtop, laplacian_signal, msd, qiv, rtap, rtpp,
ng, perng, parng
laplacian_weightingfloat, optional
Weighting value used in fitting the MAPMRI model in the Laplacian
and both model types.
radial_orderunsigned int, optional
Even value used to set the order of the basis.
sphere_namestring, optional
Sphere name on which to reconstruct the fODFs.
relative_peak_thresholdfloat, optional
Only return peaks greater than relative_peak_threshold*m
where m is the largest peak.
min_separation_anglefloat, optional
The minimum distance between directions. If two peaks are too close
only the larger of the two is returned.
npeaksint, optional
Maximum number of peaks found.
normalize_peaksbool, optional
If true, all peak values are calculated relative to max(odf).
extract_pam_valuesbool, optional
Save or not to save pam volumes as single nifti files.
out_dirstring, optional
Output directory. (default: current directory)
out_rtopstring, optional
Name of the rtop to be saved.
out_lapnormstring, optional
Name of the norm of Laplacian signal to be saved.
out_msdstring, optional
Name of the msd to be saved.
out_qivstring, optional
Name of the qiv to be saved.
out_rtapstring, optional
Name of the rtap to be saved.
out_rtppstring, optional
Name of the rtpp to be saved.
out_ngstring, optional
Name of the Non-Gaussianity to be saved.
out_perngstring, optional
Name of the Non-Gaussianity perpendicular to be saved.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Workflow for tensor reconstruction and for computing DTI metrics
using Weighted Least-Squares.
Performs a tensor reconstruction [14],
[15] on the files by ‘globing’ input_files and
saves the DTI metrics in a directory specified by out_dir.
Parameters:
input_filesstring
Path to the input volumes. This path may contain wildcards to
process multiple inputs at once.
bvalues_filesstring
Path to the bvalues files. This path may contain wildcards to use
multiple bvalues files at once.
bvectors_filesstring
Path to the bvectors files. This path may contain wildcards to use
multiple bvectors files at once.
mask_filesstring
Path to the input masks. This path may contain wildcards to use
multiple masks at once.
fit_methodstring, optional
can be one of the following:
‘WLS’ for weighted least squares [16]
‘LS’ or ‘OLS’ for ordinary least squares [16]
‘NLLS’ for non-linear least-squares
‘RT’ or ‘restore’ or ‘RESTORE’ for RESTORE robust tensor fitting
[17].
b0_thresholdfloat, optional
Threshold used to find b0 volumes.
bvecs_tolfloat, optional
Threshold used to check that norm(bvec) = 1 +/- bvecs_tol
npeaksint, optional
Number of peaks/eigen vectors to save in each voxel. DTI generates
3 eigen values and eigen vectors. The principal eigenvector is
saved by default.
sigmafloat, optional
An estimate of the variance. Chang et al.[17] recommend to
use 1.5267 * std(background_noise), where background_noise is
estimated from some part of the image known to contain no signal
(only noise) b-vectors are unit vectors.
save_metricsvariable string, optional
List of metrics to save.
Possible values: fa, ga, rgb, md, ad, rd, mode, tensor, evec, eval
nifti_tensorbool, optional
Whether the tensor is saved in the standard Nifti format or in an
alternate format that is used by other software (e.g., FSL): a
4-dimensional volume (shape (i, j, k, 6)) with
Dxx, Dxy, Dxz, Dyy, Dyz, Dzz on the last dimension.
extract_pam_valuesbool, optional
Save or not to save pam volumes as single nifti files.
out_dirstring, optional
Output directory. (default current directory)
out_tensorstring, optional
Name of the tensors volume to be saved.
Per default, this will be saved following the nifti standard:
with the tensor elements as Dxx, Dxy, Dyy, Dxz, Dyz, Dzz on the
last (5th) dimension of the volume (shape: (i, j, k, 1, 6)). If
nifti_tensor is False, this will be saved in an alternate format
that is used by other software (e.g., FSL): a
4-dimensional volume (shape (i, j, k, 6)) with Dxx, Dxy, Dxz, Dyy,
Dyz, Dzz on the last dimension.
out_fastring, optional
Name of the fractional anisotropy volume to be saved.
out_gastring, optional
Name of the geodesic anisotropy volume to be saved.
out_rgbstring, optional
Name of the color fa volume to be saved.
out_mdstring, optional
Name of the mean diffusivity volume to be saved.
out_adstring, optional
Name of the axial diffusivity volume to be saved.
out_rdstring, optional
Name of the radial diffusivity volume to be saved.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Path to the input volumes. This path may contain wildcards to
process multiple inputs at once.
bvalues_filesstring
Path to the bvalues files. This path may contain wildcards to use
multiple bvalues files at once.
bvectors_filesstring
Path to the bvectors files. This path may contain wildcards to use
multiple bvectors files at once.
mask_filesstring
Path to the input masks. This path may contain wildcards to use
multiple masks at once.
qgrid_sizeint, optional
has to be an odd number. Sets the size of the q_space grid.
For example if qgrid_size is 17 then the shape of the grid will be
(17,17,17).
r_startfloat, optional
ODF is sampled radially in the PDF. This parameters shows where the
sampling should start.
r_endfloat, optional
Radial endpoint of ODF sampling
r_stepfloat, optional
Step size of the ODf sampling from r_start to r_end
filter_widthfloat, optional
Strength of the hanning filter
normalize_peaksbool, optional
Whether to normalize the peaks
sphere_namestring, optional
Sphere name on which to reconstruct the fODFs.
relative_peak_thresholdfloat, optional
Only return peaks greater than relative_peak_threshold*m
where m is the largest peak.
min_separation_anglefloat, optional
The minimum distance between directions. If two peaks are too close
only the larger of the two is returned.
sh_order_maxint, optional
Spherical harmonics order (l) used in the DKI fit.
extract_pam_valuesbool, optional
Save or not to save pam volumes as single nifti files.
parallelbool, optional
Whether to use parallelization in peak-finding during the
calibration procedure.
num_processesint, optional
If parallel is True, the number of subprocesses to use
(default multiprocessing.cpu_count()). If < 0 the maximal number
of cores minus num_processes+1 is used (enter -1 to use as
many cores as possible). 0 raises an error.
out_dirstring, optional
Output directory. (default current directory)
out_pamstring, optional
Name of the peaks volume to be saved.
out_shmstring, optional
Name of the spherical harmonics volume to be saved.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Path to the input volumes. This path may contain wildcards to
process multiple inputs at once.
bvalues_filesstring
Path to the bvalues files. This path may contain wildcards to use
multiple bvalues files at once.
bvectors_filesstring
Path to the bvectors files. This path may contain wildcards to use
multiple bvectors files at once.
mask_filesstring
Path to the input masks. This path may contain wildcards to use
multiple masks at once. (default: No mask used)
b0_thresholdfloat, optional
Threshold used to find b0 volumes.
bvecs_tolfloat, optional
Bvecs should be unit vectors.
roi_centervariable int, optional
Center of ROI in data. If center is None, it is assumed that it is
the center of the volume with shape data.shape[:3].
roi_radiiint or array-like, optional
radii of cuboid ROI in voxels.
fa_thrfloat, optional
FA threshold for calculating the response function.
frfvariable float, optional
Fiber response function can be for example inputted as 15 4 4
(from the command line) or [15, 4, 4] from a Python script to be
converted to float and multiplied by 10**-4 . If None
the fiber response function will be computed automatically.
sphere_namestring, optional
Sphere name on which to reconstruct the fODFs.
relative_peak_thresholdfloat, optional
Only return peaks greater than relative_peak_threshold*m
where m is the largest peak.
min_separation_anglefloat, optional
The minimum distance between directions. If two peaks are too close
only the larger of the two is returned.
sh_order_maxint, optional
Spherical harmonics order (l) used in the CSA fit.
parallelbool, optional
Whether to use parallelization in peak-finding during the
calibration procedure.
extract_pam_valuesbool, optional
Save or not to save pam volumes as single nifti files.
num_processesint, optional
If parallel is True, the number of subprocesses to use
(default multiprocessing.cpu_count()). If < 0 the maximal number
of cores minus num_processes+1 is used (enter -1 to use as
many cores as possible). 0 raises an error.
out_dirstring, optional
Output directory. (default current directory)
out_pamstring, optional
Name of the peaks volume to be saved.
out_shmstring, optional
Name of the spherical harmonics volume to be saved.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Path to the input volumes. This path may contain wildcards to
process multiple inputs at once.
bvalues_filesstring
Path to the bvalues files. This path may contain wildcards to use
multiple bvalues files at once.
bvectors_filesstring
Path to the bvectors files. This path may contain wildcards to use
multiple bvectors files at once.
mask_filesstring
Path to the input masks. This path may contain wildcards to use
multiple masks at once. (default: No mask used)
b0_thresholdfloat, optional
Threshold used to find b0 volumes.
bvecs_tolfloat, optional
Threshold used so that norm(bvec)=1.
sphere_namestring, optional
Sphere name on which to reconstruct the fODFs.
relative_peak_thresholdfloat, optional
Only return peaks greater than relative_peak_threshold*m
where m is the largest peak.
min_separation_anglefloat, optional
The minimum distance between directions. If two peaks are too close
only the larger of the two is returned.
sh_order_maxint, optional
Spherical harmonics order (l) used in the CSA fit.
parallelbool, optional
Whether to use parallelization in peak-finding during the
calibration procedure.
extract_pam_valuesbool, optional
Whether or not to save pam volumes as single nifti files.
num_processesint, optional
If parallel is True, the number of subprocesses to use
(default multiprocessing.cpu_count()). If < 0 the maximal number
of cores minus num_processes+1 is used (enter -1 to use as
many cores as possible). 0 raises an error.
out_dirstring, optional
Output directory. (default current directory)
out_pamstring, optional
Name of the peaks volume to be saved.
out_shmstring, optional
Name of the spherical harmonics volume to be saved.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Workflow for Diffusion Kurtosis reconstruction and for computing
DKI metrics.
Performs a DKI reconstruction [20],
[21] on the files by ‘globing’ input_files and
saves the DKI metrics in a directory specified by out_dir.
Parameters:
input_filesstring
Path to the input volumes. This path may contain wildcards to
process multiple inputs at once.
bvalues_filesstring
Path to the bvalues files. This path may contain wildcards to use
multiple bvalues files at once.
bvectors_filesstring
Path to the bvalues files. This path may contain wildcards to use
multiple bvalues files at once.
mask_filesstring
Path to the input masks. This path may contain wildcards to use
multiple masks at once. (default: No mask used)
fit_methodstring, optional
can be one of the following:
‘OLS’ or ‘ULLS’ for ordinary least squares
‘WLS’ or ‘UWLLS’ for weighted ordinary least squares
b0_thresholdfloat, optional
Threshold used to find b0 volumes.
sigmafloat, optional
An estimate of the variance. Chang et al.[17] recommend to
use 1.5267 * std(background_noise), where background_noise is
estimated from some part of the image known to contain no signal
(only noise)
save_metricsvariable string, optional
List of metrics to save.
Possible values: fa, ga, rgb, md, ad, rd, mode, tensor, evec, eval
extract_pam_valuesbool, optional
Save or not to save pam volumes as single nifti files.
npeaksint, optional
Number of peaks to fit in each voxel.
out_dirstring, optional
Output directory. (default current directory)
out_dt_tensorstring, optional
Name of the tensors volume to be saved.
out_dk_tensorstring, optional
Name of the tensors volume to be saved.
out_fastring, optional
Name of the fractional anisotropy volume to be saved.
out_gastring, optional
Name of the geodesic anisotropy volume to be saved.
out_rgbstring, optional
Name of the color fa volume to be saved.
out_mdstring, optional
Name of the mean diffusivity volume to be saved.
out_adstring, optional
Name of the axial diffusivity volume to be saved.
out_rdstring, optional
Name of the radial diffusivity volume to be saved.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Reconstruct the fiber local orientations using the Robust and
Unbiased Model-BAsed Spherical Deconvolution (RUMBA-SD) model.
The fiber response function (FRF) is computed using the single-shell,
single-tissue model, and the voxel-wise fitting procedure is used for
RUMBA-SD [24].
Parameters:
input_filesstring
Path to the input volumes. This path may contain wildcards to
process multiple inputs at once.
bvalues_filesstring
Path to the bvalues files. This path may contain wildcards to use
multiple bvalues files at once.
bvectors_filesstring
Path to the bvectors files. This path may contain wildcards to use
multiple bvectors files at once.
mask_filesstring
Path to the input masks. This path may contain wildcards to use
multiple masks at once.
b0_thresholdfloat, optional
Threshold used to find b0 volumes.
bvecs_tolfloat, optional
Bvecs should be unit vectors.
roi_centervariable int, optional
Center of ROI in data. If center is None, it is assumed that it is
the center of the volume with shape data.shape[:3].
roi_radiivariable int, optional
radii of cuboid ROI in voxels.
fa_thrfloat, optional
FA threshold to compute the WM response function.
extract_pam_valuesbool, optional
Save or not to save pam volumes as single nifti files.
sh_orderint, optional
Spherical harmonics order (l) used in the RUMBA fit.
parallelbool, optional
Whether to use parallelization in peak-finding during the
calibration procedure.
num_processesint, optional
If parallel is True, the number of subprocesses to use
(default multiprocessing.cpu_count()). If < 0 the maximal number
of cores minus num_processes+1 is used (enter -1 to use as
many cores as possible). 0 raises an error.
gm_responsefloat, optional
Mean diffusivity for GM compartment. If None, then grey
matter volume fraction is not computed.
csf_responsefloat, optional
Mean diffusivity for CSF compartment. If None, then CSF
volume fraction is not computed.
n_iterint, optional
Number of iterations for fODF estimation. Must be a positive int.
recon_typestr, optional
MRI reconstruction method type: spatial matched filter (smf) or
sum-of-squares (sos). SMF reconstruction generates Rician noise
while SoS reconstruction generates Noncentral Chi noise.
n_coilsint, optional
Number of coils in MRI scanner – only relevant in SoS
reconstruction. Must be a positive int. Default: 1
Rint, optional
Acceleration factor of the acquisition. For SIEMENS,
R = iPAT factor. For GE, R = ASSET factor. For PHILIPS,
R = SENSE factor. Typical values are 1 or 2. Must be a positive
integer.
voxelwisebool, optional
If true, performs a voxelwise fit. If false, performs a global fit
on the entire brain at once. The global fit requires a 4D brain
volume in fit.
use_tvbool, optional
If true, applies total variation regularization. This only takes
effect in a global fit (voxelwise is set to False). TV can only
be applied to 4D brain volumes with no singleton dimensions.
sphere_namestr, optional
Sphere name on which to reconstruct the fODFs.
verbosebool, optional
If true, logs updates on estimated signal-to-noise ratio after each
iteration. This only takes effect in a global fit (voxelwise is
set to False).
relative_peak_thresholdfloat, optional
Only return peaks greater than relative_peak_threshold*m
where m is the largest peak.
min_separation_anglefloat, optional
The minimum distance between directions. If two peaks are too close
only the larger of the two is returned.
out_dirstring, optional
Output directory. (default current directory)
out_pamstring, optional
Name of the peaks volume to be saved.
out_shmstring, optional
Name of the spherical harmonics volume to be saved.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Workflow wrapping the median_otsu segmentation method.
Applies median_otsu segmentation on each file found by ‘globing’
input_files and saves the results in a directory specified by
out_dir.
Parameters:
input_filesstring
Path to the input volumes. This path may contain wildcards to
process multiple inputs at once.
save_maskedbool, optional
Save mask.
median_radiusint, optional
Radius (in voxels) of the applied median filter.
numpassint, optional
Number of pass of the median filter.
autocropbool, optional
If True, the masked input_volumes will also be cropped using the
bounding box defined by the masked data. For example, if diffusion
images are of 1x1x1 (mm^3) or higher resolution auto-cropping could
reduce their size in memory and speed up some of the analysis.
vol_idxstr, optional
1D array representing indices of axis=-1 of a 4D
input_volume. From the command line use something like
‘1,2,3-5,7’. This input is required for 4D volumes.
dilateint, optional
number of iterations for binary dilation.
finalize_maskbool, optional
Whether to remove potential holes or islands.
Useful for solving minor errors.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Path to the peaks and metrics files. This path may contain
wildcards to use multiple masks at once.
wm_filesstring
Path to white matter partial volume estimate for tracking (CMC).
gm_filesstring
Path to grey matter partial volume estimate for tracking (CMC).
csf_filesstring
Path to cerebrospinal fluid partial volume estimate for tracking
(CMC).
seeding_filesstring
A binary image showing where we need to seed for tracking.
step_sizefloat, optional
Step size (in mm) used for tracking.
seed_densityint, optional
Number of seeds per dimension inside voxel.
For example, seed_density of 2 means 8 regularly distributed
points in the voxel. And seed density of 1 means 1 point at the
center of the voxel.
pmf_thresholdfloat, optional
Threshold for ODF functions.
max_anglefloat, optional
Maximum angle between streamline segments (range [0, 90]).
pft_backfloat, optional
Distance in mm to back track before starting the particle filtering
tractography. The total particle filtering
tractography distance is equal to back_tracking_dist +
front_tracking_dist.
pft_frontfloat, optional
Distance in mm to run the particle filtering tractography after the
the back track distance. The total particle filtering
tractography distance is equal to back_tracking_dist +
front_tracking_dist.
pft_countint, optional
Number of particles to use in the particle filter.
out_dirstring, optional
Output directory. (default current directory)
out_tractogramstring, optional
Name of the tractogram file to be saved.
save_seedsbool, optional
If true, save the seeds associated to their streamline
in the ‘data_per_streamline’ Tractogram dictionary using
‘seeds’ as the key.
min_wm_pve_before_stoppingint, optional
Minimum white matter pve (1 - stopping_criterion.include_map -
stopping_criterion.exclude_map) to reach before allowing the
tractography to stop.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Interact with any number of .trk, .tck or .dpy tractograms and anatomy
files .nii or .nii.gz. Cluster streamlines on loading.
Parameters:
input_filesvariable string
Filenames.
clusterbool, optional
Enable QuickBundlesX clustering.
rgbbool, optional
Enable the color image (rgb only, alpha channel will be ignored).
cluster_thrfloat, optional
Distance threshold used for clustering. Default value 15.0 for
small animal brains you may need to use something smaller such
as 2.0. The distance is in mm. For this parameter to be active
cluster should be enabled.
random_colorsvariable str, optional
Given multiple tractograms and/or ROIs then each tractogram and/or
ROI will be shown with different color. If no value is provided,
both the tractograms and the ROIs will have a different random
color generated from a distinguishable colormap. If the effect
should only be applied to one of the 2 types, then use the
options ‘tracts’ and ‘rois’ for the tractograms and the ROIs
respectively.
length_gtfloat, optional
Clusters with average length greater than length_gt amount
in mm will be shown.
length_ltfloat, optional
Clusters with average length less than length_lt amount in
mm will be shown.
clusters_gtint, optional
Clusters with size greater than clusters_gt will be shown.
clusters_ltint, optional
Clusters with size less than clusters_gt will be shown.
native_coordsbool, optional
Show results in native coordinates.
stealthbool, optional
Do not use interactive mode just save figure.
emergency_headerstr, optional
If no anatomy reference is provided an emergency header is
provided. Current options ‘icbm_2009a’ and ‘icbm_2009c’.
bg_colorvariable float, optional
Define the background color of the scene. Colors can be defined
with 1 or 3 values and should be between [0-1].
disable_order_transparencybool, optional
Use depth peeling to sort transparent objects.
If True also enables anti-aliasing.
buanbool, optional
Enables BUAN framework visualization.
buan_thrfloat, optional
Uses the threshold value to highlight segments on the
bundle which have pvalues less than this threshold.
buan_highlightvariable float, optional
Define the bundle highlight area color. Colors can be defined
with 1 or 3 values and should be between [0-1].
For example, a value of (1, 0, 0) would mean the red color.
roi_imagesbool, optional
Displays binary images as contours.
roi_colorsvariable float, optional
Define the color for the roi images. Colors can be defined
with 1 or 3 values and should be between [0-1]. For example, a
value of (1, 0, 0) would mean the red color.
Use a couple of inspection tricks to build an IOIterator using the
previous frame (values of local variables and other contextuals) and
the run method’s docstring.
Return A short name for the workflow used to subdivide.
The short name is used by CombinedWorkflows and the argparser to
subdivide the commandline parameters avoiding the trouble of having
subworkflows parameters with the same name.
For example, a combined workflow with dti reconstruction and csd
reconstruction might en up with the b0_threshold parameter. Using short
names, we will have dti.b0_threshold and csd.b0_threshold available.
Returns class name by default but it is strongly advised to set it to
something shorter and easier to write on commandline.
Check if a file will be overwritten upon processing the inputs.
If it is bound to happen, an action is taken depending on
self._force_overwrite (or –force via command line). A log message is
output independently of the outcome to tell the user something
happened.