Fork me on GitHub

Diffusion Workspace

 

Overview: what can be done?

The diffusion configuration is the area dedicated to diffusion MRI processing and visualization. Here we can tweak tensor and fiber visualization, work with fiber bundles and run tractography algorithms.

 

Tensor view toolbox

The tensor view toolbox was created to control the way the tensors are calculated, rendered and displayed. The following parameters can be tweaked:

 

diffusion tensor view toolbox 

 

Shape: Determines the figure of the glyph. Possible options are Lines, Disks, Arrows, Cubes, Cylinders, Ellipsoids, and Superquadrics.

Sample rate: The higher this value, the more spread the sampling will be, hence less glyphs will appear on the screen.

Flip X / Y / Z: By checking or unchecking these checkboxes the respective X, Y or Z axes can be flipped.

Color with v1 / v2 / v3: Choose which eigenvector is used for mapping the color mode.

Resolution: Increases or decreases the amount of detail of each tensor's glyph. Lower values are preferred for slower computers.

Scale: These two values are used to set the scaling factor for the glyphs, hence, their size.

Hide / Show Axial, Coronal, Sagittal: Hides or Show the respectives planes.

 

Here is a quick video demonstrating tensors visualization and the tensor view toolbox:

 

 

 

Fiber view toolbox

The Fiber View toolbox alters the visualization aspect of the fibers being rendered. It's capable of controlling the following:

diffusion-fiber-view-toolbox

Color fibers by: Whether the fibers are colored by their local or global orientation or by considering the fractional anisotropy.

Use hardware acceleration: Uses GPU hardware acceleration.

Display fibers as: There are 3 possibilities to display fibers, as polylines, ribbons or tubes.

Fiber radius: Modifies the radius of the fibers (if they are not being displayed as polylines, which are not volumes).


The following video shows these capabilities:

 

 

 

Tractography

medInria v2 provides one tractograpy algorithm. In order run it we need to select it from the "Algorithm" box, then many configurable options will appear.

Drag and drop the image you want to process to the dark-grey box just below the algorithm selection box. If you want also to view the tensors and/or fibers overlayed with the image, open it in the main view window (also, by drag and dropping it).

 

dropsite

If the image doesn't already have its diffusion gradients list, you will be prompted to select the appropriate file.
In our example dataset there is a sample image with its gradients, ready to use for tensor and fiber processing. If you are using your own gradients file it should look like the one in the example dataset: in the first line it states how many lines are to be read next and in each of the following lines there are three integer or floating point numbers, separated by a blank space (no tabs).
Once the gradients are selected, they are stored in the image for later use. If an error occurs, drag and drop the image again in order to select another gradients file.

gradients message box


Pre-processing Section:

Automatic brain extraction

This option is activated by default, the software will remove the skull and leave only the brain. If you want to manually configure this feature deselect the "Automatic brain extraction" checkbox and the "Background removal threshold" slider will be activated. The algorithm will treat image voxels whose value falls below the threshold as belonging to the skull, hence they won't be used by further processes.

Use smoothing

By activating this feature, the algorithm will try to reduce the noise. As a drawback it will reduce the accuracy also. Usually this option is not necessary except for special cases.

smoothing

 

Tensors:

By clicking "Show tensors" medInria will generate the tensors associated with the input image.

Different diffusion tensor maps can be chosen:

FA: Fractional Anisotropy
FA (with a coloured brain behind): Coloured Fractional Anisotropy
RA: Relative Anisotropy
l1 (Lambda 1): Largest Eigenvalue
l2 (Lambda 2): 2nd Largest Eigenvalue
l3 (Lambda 3): Smallest Eigenvalue
Cl: Linear Coefficient
Cp: Planar Coefficient
Cs: Spherical Coefficient
ADC: Average Diffusion Coefficient
VR: Volume Ratio
lFA: Logarithmic Fractional Anisotropy

tensors box

 

FA pixels are colorized in relation with the principal direction of diffusion (i.e. principal eigenvector of the tensor). Consequently, the color represents an indication of the direction of the fiber bundles. A red pixel indicates that in this location white matter is mainly orientated Left-Right. Anterior-Posterior orientation is indicated by a green pixel and Inferior-Superior orientation by a blue one.


Tractography:

Several parameters can be tweaked before running the algorithm:

Starting FA threshold and Stopping FA threshold:

In order to build the fibers, the algorithm starts by seeding one in every voxel whose FA value is higher than "Starting FA threshold" and stops its construction when it reaches a voxel with FA value lower than "Stopping FA threshold".

Smoothness

The smoothness value indicates how "strictly" the fiber follows the tensors. The higher the value, the less the fiber gets deviated by the tensors. A value of 0 indicates that the fiber strictly follows the tensors.

Minimum length:

At the final stage of the algorithm, fibers whose length is below the chosen amount (in millimetres) are deleted.

Sampling:

If seeding a fiber in every voxel allowed by the FA threshold is not desired, the sampling feature will force the algorithm to only seed one fiber in every X voxels, being X the selected sampling value.

tractography

Fiber bundling toolbox

The purpose of this toolbox is to allow the user to isolate a bundle of fibers.

 
Regions of Interest:


The creation of ROIs in medInria v2.x is still under development, however future releases are expected to have an improved method for ROIs generation.

In medInria 2.x we have separated the concepts of image segmentation from DTI-related tasks. In the Segmentation configuration (currently in beta) it is possible to create ROIs by painting on slices (as in the previous version). Once finalized the ROIs can be saved to the database. For the moment we do not support opening ROI images from the database, you will need to work around it by exporting the image and the load it with the "Open ROI" button.
Instructions for using the segmentation configuration can be found in the doc page of the Segmentation configuration and the doc page of the Browser Area explains how to export an image.


We can then proceed to import an existing ROI. The first part let the user open files which state ROIs (Region of Interest). Such files are also 3D images of the same size as the displayed fiber/tensor and they declare up to 255 ROIs (each one being identified by a natural number between 0 and 255).
Once the file is loaded, medInria will isolate the fibers that (by default) touch every ROI.

This default behaviour may be changed by selecting each ROI (numbered ROI 1 to ROI 255) and changing the logical operator located on the right:

AND: fibers will need to at least touch this ROI
NOT: fibers that touch this ROI will not be considered
NULL: this ROI is not being taken into account

 

rois

 
Bundling Box
:

Below, the fiber bundling controls can be found. By checking "Activate bundling box" a movable box will be overlayed along with the fibers being displayed at the moment.
The user can increase/decrease the size of the box by dragging the white spheres that are on its borders, it can also be moved the same way images are moved.
By default, every fiber that at least touches the bundling box is selected. To achieve the opposite behaviour, the "Add" button shall be clicked (hence isolated fibers will be the ones not touching the toolbox).

Once the user successfully isolates a group of fibers, he/she may "Tag" the bundle. By doing this the bundle will be memorized by medInria and another, new bundling box, will appear. This new box will isolate fibers as explained before but will also consider the previously "tagged" fibers. The "Tag" button can be pressed as much as desired, chaining the same effect.
The "Reset" button makes medInria forgets everything and lets the user start over.
The "Validate" button will save the current shown bundle, assign it a colour, add it to the textbox below, and show useful information about it.

Finally, if you do not want to see all your previously created bundles, deselect the "Show all bundles" checkbox. 

bundling

 

Fiber bundle:

bundled fibers

 

Back to Documentation Index