tract_querier.tract_label_indices

Classes

tract_querier.tract_label_indices.TractographySpatialIndexing(...)

This class implements a mutual spatial indexing of an labeled image and a tractography

Functions

tract_querier.tract_label_indices.compute_label_bounding_boxes(...)

tract_querier.tract_label_indices.compute_label_crossings(...)

tract_querier.tract_label_indices.compute_label_endings(...)

tract_querier.tract_label_indices.compute_label_endings_start_end(...)

tract_querier.tract_label_indices.compute_tract_bounding_boxes(tracts)

tract_querier.tract_label_indices.compute_tract_label_indices(...)

class tract_querier.tract_label_indices.TractographySpatialIndexing(tractography, image, affine_ijk_2_ras, length_threshold, crossing_threshold)[source]

Bases: object

This class implements a mutual spatial indexing of an labeled image and a tractography

Parameters:
tractographyTractography

Tractography object

imagearray_like, 3-dimensional

a piecewise constant 3D image or image of labels

affine_ijk_2_rasarray_like, 4 \times 4

the affine transform of each IJK coordinate on the image to RAS space

length_thresholdfloat

minimum length in mm of a tract to be considered in the indexing

crossing_thresholdfloat

the ratio of a tract that needs to be inside a label to be considered that it crosses it

Attributes:
tractographyTractography

Tractography object

imagearray_like, 3-dimensional

a piecewise constant 3D image or image of labels

affine_ijk_2_rasarray_like, 4 \times 4

the affine transform of each IJK coordinate on the image to RAS space

length_thresholdfloat

minimum length in mm of a tract to be considered in the indexing

crossing_thresholdfloat

the ratio of a tract that needs to be inside a label to be considered that it crosses it

crossing_tracts_labelsdict of sets

Dictionary indexed by tract number of the labels traversed by the tract

crossing_labels_tractsdict of sets

Dictionary indexed by label number of the tracts traversing the labels

ending_tracts_labels(dict of int, dict of int)

Dictionary of each endpoint of the tracts indexed by tract number and containing the label at which the endpoint is

ending_labels_tracts(dict of sets, dict of sets)

Dictionary of each endpoint of the tracts indexed by label number and containing the tracts at which the endpoint in the label is

tract_endpoints_posarray_like of N\times 2 \times 3 where

N is the number of tracts Contains the position of both endpoints of each tract