AFQ.tasks.segmentation
#
Module Contents#
Functions#
|
full path to a trk file containing containting |
|
full path to a trk file containting segmented |
|
dictionary of paths, where each path is |
|
full path to a JSON file containing streamline counts |
|
full path to a JSON file containing median bundle lengths |
|
full path to 4d nifti file containing streamline counts per voxel |
|
full path to a CSV file containing tract profiles |
|
dicionary mapping scalar names |
|
Attributes#
- AFQ.tasks.segmentation.segment(dwi, data_imap, mapping_imap, tractography_imap, segmentation_params)[source]#
full path to a trk file containing containting segmented streamlines, labeled by bundle
- Parameters
- segmentation_paramsdict, optional
The parameters for segmentation. Default: use the default behavior of the seg.Segmentation object.
- AFQ.tasks.segmentation.clean_bundles(bundles, data_imap, clean_params=None)[source]#
full path to a trk file containting segmented streamlines, cleaned using the Mahalanobis distance, and labeled by bundle
- Parameters
- clean_params: dict, optional
The parameters for cleaning. Default: use the default behavior of the seg.clean_bundle function.
- AFQ.tasks.segmentation.export_bundles(base_fname, results_dir, clean_bundles, bundles, data_imap, tracking_params, segmentation_params)[source]#
dictionary of paths, where each path is a full path to a trk file containing the streamlines of a given bundle, cleaned or uncleaned
- AFQ.tasks.segmentation.export_sl_counts(data_imap, clean_bundles, bundles)[source]#
full path to a JSON file containing streamline counts
- AFQ.tasks.segmentation.export_bundle_lengths(data_imap, clean_bundles, bundles)[source]#
full path to a JSON file containing median bundle lengths
- AFQ.tasks.segmentation.export_density_maps(clean_bundles, dwi, data_imap)[source]#
full path to 4d nifti file containing streamline counts per voxel per bundle, where the 4th dimension encodes the bundle
- AFQ.tasks.segmentation.tract_profiles(clean_bundles, data_imap, scalar_dict, dwi_affine, profile_weights='gauss')[source]#
full path to a CSV file containing tract profiles
- Parameters
- profile_weightsstr, 1D array, 2D array callable, optional
How to weight each streamline (1D) or each node (2D) when calculating the tract-profiles. If callable, this is a function that calculates weights. If None, no weighting will be applied. If “gauss”, gaussian weights will be used. If “median”, the median of values at each node will be used instead of a mean or weighted mean. Default: “gauss”
- AFQ.tasks.segmentation.get_scalar_dict(data_imap, mapping_imap, scalars=['dti_fa', 'dti_md'])[source]#
dicionary mapping scalar names to their respective file paths
- Parameters
- scalarslist of strings and/or scalar definitions, optional
List of scalars to use. Can be any of: “dti_fa”, “dti_md”, “dki_fa”, “dki_md”, “dki_awf”, “dki_mk”. Can also be a scalar from AFQ.definitions.image. Default: [“dti_fa”, “dti_md”]