kwneuro.tractseg module

kwneuro.tractseg.extract_tractseg(dwi, mask, response=None, output_type='tract_segmentation')

Run TractSeg on a DWI dataset to segment white matter tracts.

Parameters:
  • dwi (Dwi) – The Diffusion Weighted Imaging (DWI) dataset.

  • mask (VolumeResource) – A binary brain mask volume.

  • response (Optional) – The single-fiber response function. If None, the response function is estimated using an ROI in the center of the brain mask.

  • output_type (str) – TractSeg can segment not only bundles, but also the end regions of bundles. Moreover it can create Tract Orientation Maps (TOM). ‘tract_segmentation’ [DEFAULT]: Segmentation of bundles (72 bundles). ‘endings_segmentation’: Segmentation of bundle end regions (72 bundles). ‘TOM’: Tract Orientation Maps (20 bundles).

Return type:

VolumeResource

Returns: A volume resource containing a 4D numpy array with the output of tractseg

for tract_segmentation: [x, y, z, nr_of_bundles] for endings_segmentation: [x, y, z, 2*nr_of_bundles] for TOM: [x, y, z, 3*nr_of_bundles]