Diffusion Transformation des Faisceaux

This process embed four bundles filtering tools for changing referential, fascicle selection and splitting according to regions crossed and fascicle length filtering.

Description

Bundles of fascicle produced by BrainVISA tracking algorithms often need to be transformed before they are analysed. This process contains a series of filters taking one bundles file (in bundles parameter) and producing one modified bundle file (in transformed_bundles parameter). Each filter is optional. If the parameters of a filters are empty, the corresponding filtering step is skipped. The filters are organized and linked together with the following structure :

A - Bundles geometrical transformation

This filter apply an affine transformation to a bundle set. The parameter of this step is a transformation matrix. This transformation is applied to each point of each fascicle of all bundles.

B - Bundles selection and reorganization

This filter can reorganize fascicles according to the 3D region of interest (ROI) they cross. For example, it can be used to separate fascicles intersecting region A and region B from fascicles touching only region A. The input of the selection filter is a set of ROI (in selecion_regions parameter), an optional transformation to apply to the ROI (in selecion_regions_transformation) and a selection rules file (in selecion_rules).

We hope to have time to build a graphical interface to let users easily build its selection criteria. But to date, these criteria must be written in a fascicle selection rules file. This file contains a series of rules. Each rule contains a bundle name and a selection criterion. The selection criterion can either accept or reject a fascicle. This filter uses the selection rules to transform a set of fascicle bundles in another set of fascicle bundles with the following algorithm:

For each bundle in the input bundles:
  For each fascicle in bundle:
    rule = first rule in the selection rule files with a criterion accepting fascicle
    if rule exists:
      put fascicle in the resulting set of fascicle bundles in a bundle whose name is rule's bundle name
    else:
      fascicle is deleted (i.e. not inserted in the resulting set of fascicle bundles)

The selection rules file is a text file containing one fascicle selection rule per line. The syntax of a selection rule is composed of three parts :

bundle_name region_count_selection region_names

Selection rules examples

It may be easier to understand how selection rules file work on some examples than on the previous detailed description. Let's consider that the input bundle set is composed of two bundles (bundle1 and bundle2) and that selection_regions contains a set of three regions (r1, r2 and r3) as shown in the following figure:

Example 1

In order to select all fascicles touching a ROI, it is possible to use a single line selection rule file :

touch_r1 0 0 r1

With this file all fascicles touching r1 are put in a bundle named touch_r1 whereas all other fascicles are deleted. The result is the following single bundle:

Example 2

The previous example can be modified to separate fasicles in two bundles:

touch_r1_and_another 3 0 r1
touch_r1 0 0 r1

In the first rule, minimum_crossed is set to 3 because the background counts as a region. This example shows the importance of the order of the rules. If the touch_r1 rule had been put first, the result would have been the same as the previous example (because the first rule accepting a fascicle is used to determine its bundle name).

Example 3
touch_r1_r3 0 0 r1 r3
touch_r2_r3 0 0 r2 r3

With the above selecion rules, all the fascicles touching r1 and r3 will be put in touch_r1_r3 bundle. All other fascicles crossing both r2 and r3 will be put in touch_r2_r3:

Example 4

It is possible to use the same bundle name on several rule to combine several selection criteria on the same bundle.

r1_r2 0 0 r1 r2
r1_r2_r3 0 0 r1 r3
r1_r2_r3 0 0 r2 r3

Example 5

It is to select fascicles and keep the initial bundle organization by using a * in the bundle name. For example, the following single rule keeps the separation between fascicles in bundle1 and fascicles in bundle2.

*_touch_r1_r2 0 0 r1 r2

Example 6
The question mark in the bundle name can be used to separate fascicles without a priori knowledge of the region crossed. The question mark is replaced by the name of all the regions crossed by the fascicle (separated by dots).
? 0 0

C - Fascicle splitting

To assess the connectivity between ROIs it is sometimes useful to select only some parts of the fascicles created by tracking algorithms. This filter separate fascicles in several parts that can be analysed individually.

First, the fascicle are cut on the ROI boundaries. Then, the fascicle parts are grouped into bundles according to the two regions touched by their extremities. All fascicle parts touching the same pair of ROI will be in the same bundle, this bundle has the name of the two ROI separated by an underscore character. The ROI set is given in the parameter split_regions (and the optional transformation split_regions_transformation).

For example, the following figure shows the splitting of a set of two fascicles bundles on a set of two regions:

In this example a bundle set composed of five bundles is produced. Each bundle contains all the fascicle parts joining two regions (or one region and the background). Therefore, the bundle named a.b can be used to study the putative fascicle connectivity between region a and region b (see Diffusion Bundles Analysis in Fascicles Tracking Pipeline).

In the previous example, all the fascicles are processed independantly of their bundle organisation. Therefore the original bundle organisation can be lost by the splitting process. If one wants to keep this bundle organisation, he must set split_keep_original_bundle to true. In that case, the output bundle name of a fascicle is prefixed by the name of the bundle containing the fascicle. This is illustrated in the following example:

D - Small fascicle removal

All fascicle which length is shorter than minimum_length millimeters are simply removed.

Paramètres

bundles: Fascicles bundles ( entrée )
Input bundles file
bundles_transformation: Transformation matrix ( optional, entrée )
Referential transformation applied to each fascicle point.
selection_regions: ROI ( optional, entrée )
ROI set used for selection.
selection_regions_transformation: Transformation matrix ( optional, entrée )
Referential transformation applied to selection_regions.
selection_rules: Bundle Selection Rules ( optional, entrée )
File containing a set of rules used to select fascicles and reorganize bundles.
selection_overlap: Nombre ( input )
In the selection process, percentage of point of a fascicle that have to be in a ROI to consider that the ROI is touched by the fascicle. 0 (the default) means that only one point in the ROI is engough, and 100 mean that all the fascicle points must be inside a ROI.
split_regions: ROI ( optional, entrée )
ROI set used for fascicle splitting.
split_regions_transformation: Transformation matrix ( optional, entrée )
Referential transformation applied to split_regions.
split_keep_original_bundle: Booléen ( input )
minimum_length: Réel ( optional, input )
Remove all fascicles shorter than minimum_length millimeters.
transformed_bundles: Fascicles bundles ( sortie )
Output bundles produced by the various filtering steps.
ascii_bundles_file: Booléen ( input )
Bundles files can be either in binary (the default) format or in ascii format (if ascii_bundles_file is true). The former is much smaller and therefore more efficient. But it may be easier to use ascii format if you plan to create your own programs using bundles as input.

Informations techniques

Toolbox : Diffusion et Tractographie

Niveau d'utilisateur : 1

Identifiant : DiffusionBundleTransformation

Nom de fichier : brainvisa/toolboxes/connectomist/processes/Tracking Pipeline Components/DiffusionBundleTransformation.py

Supported file formats :

bundles :
Aims bundles
bundles_transformation :
Transformation matrix
selection_regions :
GIS image, Z compressed GIS image, gz compressed GIS image, VIDA image, NIFTI-1 image, gz compressed ECAT i image, MINC image, gz compressed MINC image, DICOM image, TIFF image, XBM image, PBM image, PGM image, BMP image, XPM image, PPM image, gz compressed NIFTI-1 image, TIFF(.tif) image, Graph and data, gz compressed VIDA image, Z compressed VIDA image, Z compressed ECAT i image, gz compressed ECAT v image, ECAT i image, Z compressed ECAT v image, PNG image, JPEG image, MNG image, GIF image, Z compressed SPM image, SPM image, gz compressed SPM image, ECAT v image
selection_regions_transformation :
Transformation matrix
selection_rules :
Bundle Selection Rules
split_regions :
GIS image, Z compressed GIS image, gz compressed GIS image, VIDA image, NIFTI-1 image, gz compressed ECAT i image, MINC image, gz compressed MINC image, DICOM image, TIFF image, XBM image, PBM image, PGM image, BMP image, XPM image, PPM image, gz compressed NIFTI-1 image, TIFF(.tif) image, Graph and data, gz compressed VIDA image, Z compressed VIDA image, Z compressed ECAT i image, gz compressed ECAT v image, ECAT i image, Z compressed ECAT v image, PNG image, JPEG image, MNG image, GIF image, Z compressed SPM image, SPM image, gz compressed SPM image, ECAT v image
split_regions_transformation :
Transformation matrix
transformed_bundles :
Aims bundles