Align and Resample

This process allows to :

For now, this step is not included in the Primatologist pipeline because ot was not thoroughly validated. If you want to use ot however, it should be applied just after the Prepare MRI step.

Warning

Its default database behavour is to overwrite the input raw MRI. Thus, be careful when you use it. We advise to first backup the original volume.

Description

This process allows to respond to two issues we have encountered

Brain alignement

In MIRCen, animals are placed into a stereotaxic frame during the MRI acquisition. Thus, the brain is always straight and its orientation reproductible from one experiment to another. However, this is not always the case in other centers. Since Morphologist requires AC, PC and IHP points to be user-selected, it is easy to compute a rigid-body transformation that aligns the brain (Figure 1).

Figure 1. Alignment is performed from the three user-selected points that define the inter-hemispheric plane and the AC-PC line.

The alignement of the brain adds another advantage to the segmentation process, because brain orientation impacts cliques probabilities, especially for small and oriented structures (such as the hippocampus) in low-resolution images. We are thus considering the systematic use of brain alignment before any Primatologist processing.

Resampling

Moreover, clique probabilities depend greatly on the resolution of the image of labels from which statistics were computed. The beta parameter of the Markov random field allows to make a clique matrix work with an image of different resolution. However, our pipeline was only validated, and the beta parameter was optimized, for native images acquired with a quasi-isotropic resolution, which is far from always being the case.

Resampling images in a resolution for which we know clique probabilities to be suitable would allow us to get rid of the beta parameter. Additionnaly, it would allow us to systematically work with isotropic resolutions, even when the native image were not acquired this way.

One issue however is that aligning and resampling modifies the native data and introduces resampling artifacts. Additionnaly, it is necessary to choose wisely the interpolation method. A linear inteprolation insures not to introduce values outside the original dynamic, whereas cubic interpolation can introduce outsiders. On the other side, linear interpolation introduces big resampling artifacts and smoothes greatly the image.

When to use it ?

Until further validation, we only advise to use this step when dealing with highly anisotropic images, or when the resolution is very low.

In any case, always try to process a few test images without resampling. If the result suits you, stick with it. Else, you may try this extra step.

For macaques, recommanded output resolution are 0.6 mm (roughly equivalent to the validated resolution), or 0.3 mm (which we think is similar to a millimetric resolution in humans).

Parameters

input_mri: P:MRI Raw ( input )
Raw MRI
input_commissure: Commissure coordinates ( optional, input )
File containing three landmarks manually selected with the Prepare MRI process : Anterior Commissure (AC), Posterior Commissure (PC) and Inter-Hemispheric Point (IHP). This last one can be any point from the inter-hemispheric plane above the AC-PC line.
resolution: Choice ( optional, input )
Output resolution. For Macaque, we advise 0.3 mm
interpolation: Choice ( optional, input )
Interpolation method :
align_ACPC: Boolean ( optional, input )
If true, landmark points will be used to align the brain so that the inter-hemispheric plane is vertical and the AC-PC line is horizontal.
write_resampled_mri: Boolean ( optional, input )
write_commissure: Boolean ( optional, input )
write_transform: Boolean ( optional, input )
output_resampled_mri: P:MRI Raw ( output )
Output image. If you are using Primatologist's ontology, this is by default the same as the input image. Be careful to backup the original.
output_commissure: Commissure coordinates ( optional, output )
Commissure points in the new referential. If you are using Primatologist's ontology, this is by default the same as the input APC file. Be careful to backup the original.
output_transform: P:Raw to Aligned AC-PC Transformation ( optional, output )

Technical information

Toolbox : Primatologist

User level : 0

Identifier : primate_Resample

File name : brainvisa/toolboxes/primatologist/processes/blocks/primate_Resample.py

Supported file formats :

input_mri :
gz compressed NIFTI-1 image, Aperio svs, BMP image, DICOM image, Directory, ECAT i image, ECAT v image, FDF image, FreesurferMGH, FreesurferMGZ, GIF image, GIS image, Hamamatsu ndpi, Hamamatsu vms, Hamamatsu vmu, JPEG image, Leica scn, MINC image, NIFTI-1 image, PBM image, PGM image, PNG image, PPM image, SPM image, Sakura svslide, TIFF image, TIFF image, TIFF(.tif) image, TIFF(.tif) image, VIDA image, Ventana bif, XBM image, XPM image, Zeiss czi, gz compressed MINC image, gz compressed NIFTI-1 image
input_commissure :
Commissure coordinates, Commissure coordinates
output_resampled_mri :
gz compressed NIFTI-1 image, BMP image, DICOM image, Directory, ECAT i image, ECAT v image, FDF image, GIF image, GIS image, JPEG image, MINC image, NIFTI-1 image, PBM image, PGM image, PNG image, PPM image, SPM image, TIFF image, TIFF(.tif) image, VIDA image, XBM image, XPM image, gz compressed MINC image, gz compressed NIFTI-1 image
output_commissure :
Commissure coordinates, Commissure coordinates
output_transform :
Transformation matrix, Transformation matrix