qsirecon.workflows.recon.dsi_studio module

DSI Studio workflows

qsirecon.workflows.recon.dsi_studio.init_dsi_studio_recon_wf(inputs_dict, name='dsi_studio_recon', qsirecon_suffix='', params={})[source]

Reconstructs diffusion data using DSI Studio.

This workflow creates a .src.gz file from the input dwi, bvals and bvecs, then reconstructs ODFs using GQI.

Inputs

Default qsirecon inputs

Outputs

fibgz

A DSI Studio fib file containing GQI ODFs, peaks and scalar values.

Params

ratio_of_mean_diffusion_distance: float

Default 1.25. Distance to sample EAP at.

qsirecon.workflows.recon.dsi_studio.init_dsi_studio_connectivity_wf(inputs_dict, name='dsi_studio_connectivity', params={}, qsirecon_suffix='')[source]

Calculate streamline-based connectivity matrices using DSI Studio.

DSI Studio has a deterministic tractography algorithm that can be used to estimate pairwise regional connectivity. It calculates multiple connectivity measures.

Inputs

fibgz

A DSI Studio fib file produced by DSI Studio reconstruction.

trk_file

a DSI Studio trk.gz file

Outputs

matfile

A MATLAB-format file with numerous connectivity matrices for each atlas.

Params

fiber_count

number of streamlines to generate. Cannot also specify seed_count

seed_count

Number of seeds to track from. Does not guarantee a fixed number of streamlines and cannot be used with the fiber_count option.

method

0: streamline (Euler) 4: Runge Kutta

seed_plan

0: = traits.Enum((0, 1), argstr=”–seed_plan=%d”)

initial_dir

Seeds begin oriented as 0: the primary orientation of the ODF 1: a random orientation or 2: all orientations

connectivity_type

“pass” to count streamlines passing through a region. “end” to force streamlines to terminate in regions they count as connecting.

connectivity_value

“count”, “ncount”, “fa” used to quantify connection strength.

random_seed

Setting to True generates truly random (not-reproducible) seeding.

fa_threshold

If not specified, will use the DSI Studio Otsu threshold. Otherwise specigies the minimum qa value per fixed to be used for tracking.

step_size

Streamline propagation step size in millimeters.

turning_angle

Maximum turning angle in degrees for steamline propagation.

smoothing

DSI Studio smoothing factor

min_length

Minimum streamline length in millimeters.

max_length

Maximum streamline length in millimeters.

qsirecon.workflows.recon.dsi_studio.init_dsi_studio_export_wf(inputs_dict, name='dsi_studio_export', params={}, qsirecon_suffix='')[source]

Export scalar maps from a DSI Studio fib file into NIfTI files with correct headers.

This workflow exports gfa, fa0, fa1, fa2 and iso.

Inputs

fibgz

A DSI Studio fib file

Outputs

gfa

NIfTI file containing generalized fractional anisotropy (GFA).

fa0

Quantitative Anisotropy for the largest fixel in each voxel.

fa1

Quantitative Anisotropy for the second-largest fixel in each voxel.

fa2

Quantitative Anisotropy for the third-largest fixel in each voxel.

iso

Isotropic component of the ODF in each voxel.

qsirecon.workflows.recon.dsi_studio.init_dsi_studio_autotrack_wf(inputs_dict, params={}, qsirecon_suffix='', name='dsi_studio_autotrack_wf')[source]

Run DSI Studio’s AutoTrack method to produce bundles and bundle stats.

Inputs

fibgz

A DSI Studio fib file produced by DSI Studio reconstruction.

Outputs

tck_files

MRtrix3 format tck files for each bundle

bundle_names

Names that describe which bundles are present in tck_files

Params:

track_id: str

specify the id number or the name of the bundle. The id can be found in /atlas/ICBM152/HCP1065.tt.gz.txt . This text file is included in DSI Studio package (For Mac, right-click on dsi_studio_64.app to find content). You can specify partial name of the bundle:

example: for tracking left and right arcuate fasciculus, assign –track_id=0,1 or –track_id=arcuate (DSI Studio will find bundles with names containing “arcuate”, case insensitive)

example: for tracking left and right arcuate and cingulum, assign -track_id=0,1,2,3 or -track_id=arcuate,cingulum

track_voxel_ratio: float

the track-voxel ratio for the total number of streamline count. A larger value gives better mapping with the expense of computation time. (default: 2.0)

tolerance: str

the tolerance for the bundle recognition. The unit is in mm. Multiple values can be assigned using comma separator. A larger value may include larger track variation but also subject to more false results. (default: “22,26,30”)

yield_rate: float

This rate will be used to terminate tracking early if DSI Studio finds that the fiber tracking is not generating results. (default: 0.00001)

smoothing: float

Smoothing serves like a “momentum”. For example, if smoothing is 0, the propagation direction is independent of the previous incoming direction. If the smoothing is 0.5, each moving direction remains 50% of the “momentum”, which is the previous propagation vector. This function makes the tracks appear smoother. In implementation detail, there is a weighting sum on every two consecutive moving directions. For smoothing value 0.2, each subsequent direction has 0.2 weightings contributed from the previous moving direction and 0.8 contributed from the income direction. To disable smoothing set its value to 0. Assign 1.0 to do a random selection of the value from 0% to 95%.

otsu_threshold: float

The ratio of otsu threshold to derive default anisotropy threshold.

model_name: str

The name of the model used for ODFs (default “gqi”)

qsirecon.workflows.recon.dsi_studio.init_dsi_studio_connectivity_wf(inputs_dict, name='dsi_studio_connectivity', params={}, qsirecon_suffix='')[source]

Calculate streamline-based connectivity matrices using DSI Studio.

DSI Studio has a deterministic tractography algorithm that can be used to estimate pairwise regional connectivity. It calculates multiple connectivity measures.

Inputs

fibgz

A DSI Studio fib file produced by DSI Studio reconstruction.

trk_file

a DSI Studio trk.gz file

Outputs

matfile

A MATLAB-format file with numerous connectivity matrices for each atlas.

Params

fiber_count

number of streamlines to generate. Cannot also specify seed_count

seed_count

Number of seeds to track from. Does not guarantee a fixed number of streamlines and cannot be used with the fiber_count option.

method

0: streamline (Euler) 4: Runge Kutta

seed_plan

0: = traits.Enum((0, 1), argstr=”–seed_plan=%d”)

initial_dir

Seeds begin oriented as 0: the primary orientation of the ODF 1: a random orientation or 2: all orientations

connectivity_type

“pass” to count streamlines passing through a region. “end” to force streamlines to terminate in regions they count as connecting.

connectivity_value

“count”, “ncount”, “fa” used to quantify connection strength.

random_seed

Setting to True generates truly random (not-reproducible) seeding.

fa_threshold

If not specified, will use the DSI Studio Otsu threshold. Otherwise specigies the minimum qa value per fixed to be used for tracking.

step_size

Streamline propagation step size in millimeters.

turning_angle

Maximum turning angle in degrees for steamline propagation.

smoothing

DSI Studio smoothing factor

min_length

Minimum streamline length in millimeters.

max_length

Maximum streamline length in millimeters.

qsirecon.workflows.recon.dsi_studio.init_dsi_studio_export_wf(inputs_dict, name='dsi_studio_export', params={}, qsirecon_suffix='')[source]

Export scalar maps from a DSI Studio fib file into NIfTI files with correct headers.

This workflow exports gfa, fa0, fa1, fa2 and iso.

Inputs

fibgz

A DSI Studio fib file

Outputs

gfa

NIfTI file containing generalized fractional anisotropy (GFA).

fa0

Quantitative Anisotropy for the largest fixel in each voxel.

fa1

Quantitative Anisotropy for the second-largest fixel in each voxel.

fa2

Quantitative Anisotropy for the third-largest fixel in each voxel.

iso

Isotropic component of the ODF in each voxel.

qsirecon.workflows.recon.dsi_studio.init_dsi_studio_autotrack_registration_wf(inputs_dict, params={}, qsirecon_suffix='', name='dsi_studio_autotrack_registration_wf')[source]

Run DSI Studio’s AutoTrack method to create a map.gz file. No bundles are saved.

This workflow is designed to be used as input to other workflows that need both a fib and a map file (eg FOD Autotrack). The registration is better using GQI scalars than the imported FOD scalars.

As such, this workflow does not produce derivatives (qsirecon_suffix is ignored). The map file will instead be included in the derivatives of the autotrack workflow.

Inputs

fibgz

A DSI Studio fib file produced by DSI Studio reconstruction.

Outputs

fibgz

The input fibgz file, unaltered

fibgz_map

A map.gz file corresponding to the fibgz file

qsirecon.workflows.recon.dsi_studio.init_dsi_studio_autotrack_wf(inputs_dict, params={}, qsirecon_suffix='', name='dsi_studio_autotrack_wf')[source]

Run DSI Studio’s AutoTrack method to produce bundles and bundle stats.

Inputs

fibgz

A DSI Studio fib file produced by DSI Studio reconstruction.

Outputs

tck_files

MRtrix3 format tck files for each bundle

bundle_names

Names that describe which bundles are present in tck_files

Params:

track_id: str

specify the id number or the name of the bundle. The id can be found in /atlas/ICBM152/HCP1065.tt.gz.txt . This text file is included in DSI Studio package (For Mac, right-click on dsi_studio_64.app to find content). You can specify partial name of the bundle:

example: for tracking left and right arcuate fasciculus, assign –track_id=0,1 or –track_id=arcuate (DSI Studio will find bundles with names containing “arcuate”, case insensitive)

example: for tracking left and right arcuate and cingulum, assign -track_id=0,1,2,3 or -track_id=arcuate,cingulum

track_voxel_ratio: float

the track-voxel ratio for the total number of streamline count. A larger value gives better mapping with the expense of computation time. (default: 2.0)

tolerance: str

the tolerance for the bundle recognition. The unit is in mm. Multiple values can be assigned using comma separator. A larger value may include larger track variation but also subject to more false results. (default: “22,26,30”)

yield_rate: float

This rate will be used to terminate tracking early if DSI Studio finds that the fiber tracking is not generating results. (default: 0.00001)

smoothing: float

Smoothing serves like a “momentum”. For example, if smoothing is 0, the propagation direction is independent of the previous incoming direction. If the smoothing is 0.5, each moving direction remains 50% of the “momentum”, which is the previous propagation vector. This function makes the tracks appear smoother. In implementation detail, there is a weighting sum on every two consecutive moving directions. For smoothing value 0.2, each subsequent direction has 0.2 weightings contributed from the previous moving direction and 0.8 contributed from the income direction. To disable smoothing set its value to 0. Assign 1.0 to do a random selection of the value from 0% to 95%.

otsu_threshold: float

The ratio of otsu threshold to derive default anisotropy threshold.

model_name: str

The name of the model used for ODFs (default “gqi”)

qsirecon.workflows.recon.dsi_studio.init_dsi_studio_connectivity_wf(inputs_dict, name='dsi_studio_connectivity', params={}, qsirecon_suffix='')[source]

Calculate streamline-based connectivity matrices using DSI Studio.

DSI Studio has a deterministic tractography algorithm that can be used to estimate pairwise regional connectivity. It calculates multiple connectivity measures.

Inputs

fibgz

A DSI Studio fib file produced by DSI Studio reconstruction.

trk_file

a DSI Studio trk.gz file

Outputs

matfile

A MATLAB-format file with numerous connectivity matrices for each atlas.

Params

fiber_count

number of streamlines to generate. Cannot also specify seed_count

seed_count

Number of seeds to track from. Does not guarantee a fixed number of streamlines and cannot be used with the fiber_count option.

method

0: streamline (Euler) 4: Runge Kutta

seed_plan

0: = traits.Enum((0, 1), argstr=”–seed_plan=%d”)

initial_dir

Seeds begin oriented as 0: the primary orientation of the ODF 1: a random orientation or 2: all orientations

connectivity_type

“pass” to count streamlines passing through a region. “end” to force streamlines to terminate in regions they count as connecting.

connectivity_value

“count”, “ncount”, “fa” used to quantify connection strength.

random_seed

Setting to True generates truly random (not-reproducible) seeding.

fa_threshold

If not specified, will use the DSI Studio Otsu threshold. Otherwise specigies the minimum qa value per fixed to be used for tracking.

step_size

Streamline propagation step size in millimeters.

turning_angle

Maximum turning angle in degrees for steamline propagation.

smoothing

DSI Studio smoothing factor

min_length

Minimum streamline length in millimeters.

max_length

Maximum streamline length in millimeters.

qsirecon.workflows.recon.dsi_studio.init_dsi_studio_export_wf(inputs_dict, name='dsi_studio_export', params={}, qsirecon_suffix='')[source]

Export scalar maps from a DSI Studio fib file into NIfTI files with correct headers.

This workflow exports gfa, fa0, fa1, fa2 and iso.

Inputs

fibgz

A DSI Studio fib file

Outputs

gfa

NIfTI file containing generalized fractional anisotropy (GFA).

fa0

Quantitative Anisotropy for the largest fixel in each voxel.

fa1

Quantitative Anisotropy for the second-largest fixel in each voxel.

fa2

Quantitative Anisotropy for the third-largest fixel in each voxel.

iso

Isotropic component of the ODF in each voxel.

qsirecon.workflows.recon.dsi_studio.init_dsi_studio_recon_wf(inputs_dict, name='dsi_studio_recon', qsirecon_suffix='', params={})[source]

Reconstructs diffusion data using DSI Studio.

This workflow creates a .src.gz file from the input dwi, bvals and bvecs, then reconstructs ODFs using GQI.

Inputs

Default qsirecon inputs

Outputs

fibgz

A DSI Studio fib file containing GQI ODFs, peaks and scalar values.

Params

ratio_of_mean_diffusion_distance: float

Default 1.25. Distance to sample EAP at.

qsirecon.workflows.recon.dsi_studio.init_dsi_studio_tractography_wf(inputs_dict, name='dsi_studio_tractography', params={}, qsirecon_suffix='')[source]

Calculate streamline-based connectivity matrices using DSI Studio.

DSI Studio has a deterministic tractography algorithm that can be used to estimate pairwise regional connectivity. It calculates multiple connectivity measures.

Inputs

fibgz

A DSI Studio fib file produced by DSI Studio reconstruction.

trk_file

a DSI Studio trk.gz file

Outputs

trk_file

A DSI-Studio format trk file

fibgz

The input fib file, as it is needed by downstream nodes in addition to the trk file.

Params

fiber_count

number of streamlines to generate. Cannot also specify seed_count

seed_count

Number of seeds to track from. Does not guarantee a fixed number of streamlines and cannot be used with the fiber_count option.

method

0: streamline (Euler) 4: Runge Kutta

seed_plan

0: = traits.Enum((0, 1), argstr=”–seed_plan=%d”)

initial_dir

Seeds begin oriented as 0: the primary orientation of the ODF 1: a random orientation or 2: all orientations

connectivity_type

“pass” to count streamlines passing through a region. “end” to force streamlines to terminate in regions they count as connecting.

connectivity_value

“count”, “ncount”, “fa” used to quantify connection strength.

random_seed

Setting to True generates truly random (not-reproducible) seeding.

fa_threshold

If not specified, will use the DSI Studio Otsu threshold. Otherwise specigies the minimum qa value per fixed to be used for tracking.

step_size

Streamline propagation step size in millimeters.

turning_angle

Maximum turning angle in degrees for steamline propagation.

smoothing

DSI Studio smoothing factor

min_length

Minimum streamline length in millimeters.

max_length

Maximum streamline length in millimeters.