Home > BrainVoyager > Volume Space > Coregistration: Functional-Anatomical

Coregistration: Functional-Anatomical

Manual image registration in BrainVoyager

Performing manual alignment for functional to anatomical images

Step 1: preparation

First, open the anatomical image (*.vmr). Open the 3D Volume Tools (via 'Volumes' > 3D Volume Tools or via the blue cube on the sidebar). Navigate to the 'Coregistration' tab and click the 'Align FMR...' button. Select the functional image (*.fmr) that should be aligned to the anatomical image (*.vmr). This start situation is shown in the figure below.

Step 2: determination of the transformation parameters

Change the Translation, Rotation and/or Scaling parameters. In the current example the x-axis of the image is rotated by 90 degrees, the y-axis by 180 degrees and the z-axis by 90 degrees. The effective transformation is immediately shown in the lower window.

Step 3: apply or save the transformation

In this step, the transformation can be saved to a transformation file (*.trf) or applied immediately.


To apply the transformation, go to the Fine-Tune Alignment tab of the FMR-VMR Coregistration dialog (via the 'Align...' button). To apply the transformation, select the option 'Manual alignment - use current translation and rotation values' and click 'Run FA' (see figure below).

To save the transformation in order to apply it later, go to the 'Spatial Transf' tab of the 3D Volume Tools and click the 'Save .TRF...' button. The transformation is now saved in a 4 x 4 transformation matrix in a BrainVoyager QX transformation file (*.trf) and can be used for creation of a volume time course file (*.vtc) (in the initial alignment or fine alignment field).

Coregistration of CT and MR images via manual alignment

Import

Import the CT and MR image via 'File' > 'Create new project'. In case of Analyze 7.5 images, use file type 'ANALYZE'. BrainVoyager will ask whether the file should be isovoxelated, i.e. transform the voxel resolution to 1 x 1 x 1 mm. After this has been applied, go to the 'Spatial Transf' tab on the 3D Volume Tools (via 'Volumes > 3D Volume Tools or the blue cube icon on the toolbar). Use the 'To SAG...' button and manipulate the views so that the image is in sagittal orientation. Now, the CT and MR image have the same orientation and same resolution. This means that the transformation is only rigid body; for rigid body transformation we only need to find 6 parameters: translation in x/y/z directions and rotations about the x/y/z axes (see Appendix A for possible search spaces). First open the source image that should be transformed. To start the registration, click 'Select VMR...' on the 'Coregistration' tab of the 3D Volume Tools. When the CT image should be warped to the MR image, then select the MR image now.

Determine parameters for image registration

Determine the rotation and translation parameters to transform one image to the other via the 'Translation' and 'Rotation' boxes on the 'Coregistration' tab of the 3D volume tools (registration via intensity based alignment is less appropriate for the alignment of CT and MR since the intensities of the tissues are different). Manipulate the rotation and translation parameters until the images are overlapping.

Save the transformation in a text file (*.trf) via the 'Save TRF...' button on the Spatial Transf tab. This results in a transformation file, containing the transformation matrix (see figure below) that sends each voxel in one image space to space of the other image. 

Close all windows.

Apply the transformation

Open the image that should be transformed and select the transformation file (*.trf) via the 'Load TRF...' button on the Spatial Transf tab. Apply the transformation by clicking the button 'Transform VMR...' on the Spatial Transf tab. This will open the Spatial Transformation of VMR dialog. Select an interpolation degree (Trilinear and Nearest neighbour are fast, Sinc and Cubic spline are precise) and click 'OK' to transform the image.

The transformed image will open automatically. Load the target MR image via File > Secondary VMR or via the Select VMR... button of the 'Spatial Transf tab'. Select a blend display option to check visually whether the alignment is correct. Once the CT and MR are registered to each other, the transformation to Talairach space needs only to be performed for one data set, because the resulting transformation files (*.trf and *.tal) can also be used for the other data set since they have the same position.

For more information about the registration of functional to anatomical images, Step 10 of the BrainVoyager Getting Started Guide can be consulted. Information about the currently available image transformation methods in BrainVoyager can be obtained via the chapters 'Coregistration of Functional and Anatomical Datasets' (https://download.brainvoyager.com/bv/doc/UsersGuide/Coregistration/CoregistrationOfFunctionalAndAnatomicalDataSets.html) and 'Transformation to Normalized Space'  (https://download.brainvoyager.com/bv/doc/UsersGuide/BrainNormalization/BrainNormalization.html) of the BrainVoyager User's Guide. For questions, please contact the BrainVoyager support desk via support at brainvoyager.com.

Different Options to check the quality of the VTC (FMR) - VMR alignment

FMR-VMR alignment is a crucial step in the processing of fMRI data. Because the visual inspection is a very important part of the procedure, one should use all available options to check the quality of the alignment. Generally, it is advised to check every single VTC is a dataset to be sure before running the statistics. In this document, two different methods to check the quality of the alignment will be provided.

Step 1

First, one has to load a VMR file and to link the corresponding VTC file.

Step 2

In the 3D volume tools, you can use the “Show VTC Vol” button to visualize on volume of the VTC (the specific volume can be changed freely) or right-click on the VMR when the VTC is loaded (from BrainVoyager 23.2).

Now, the functional data (called “EPI.vmr”) as well as the anatomical data is loaded. Only the EPI is visualized at the moment. This can also be seen in the header bar of BrainVoyager.

Step 3

The standard method to check the coregistration would be to switch between the projects. This can be done using “F8”and “F9” buttons. F8 will switch between the currently loaded projects while F9 will present different modes of overlay. Pressing F9 repeatedly will cycle throught the modes. One of the modes is displayed in the image below.

Sometimes it helps to switch very fast between the EPI and the VMR by just holding down the F8 button.  Another helpful option is to position the crosshair on a specific anatomical landmark before switching. This will help in detecting detailed differences between the datasets due to alignment errors. Please keep in mind that due to the inherent differences between the datasets, there may always be some differences (e.g. due to dropout caused by the susceptibility artifact).

Step 4

One of the drawbacks of the method described above is that the intensities in the EPI data are inverted. There is a workaround that allows to visualize the VTC data with inverted intensities to possibly improve the visualisation. To do this, you have to follow a number of steps:
a) you have to save the VTC representation in the overlay as a secondary VMR:

b) you open the new EPI.vmr like an ordinary VMR. The project looks exactly the same as before (the intensities are still inverted with respect to the anatomy).

c) You open the “Contrast and Brightness” dialog (via “Options” of the BrainVoyager main menu).

d) you invert the intensities of the project:

To be able to directly save the change in the file, it’s advised to use “save the change to file” option. Otherwise, the adaptation will only be temporarily but vanish as soon as the VMR file is closed. The new inverted VMR project looks like this:

Now, the bright background intensity has to be removed. It’s quite easy to use the “Grow region” and “Expand” buttons (on the Segmentation tab) to do this. Because the background intensity is homogeneous, a very small value range can be used (in this case a Min: of 141 and a Max: of 143 was used).

The Reload “Non-Marked” button has to be used to reload only the functional dataset and to cut out the exterior / background.

This will result in the following representation:

It is advised to save the new project, e.g. as 'EPI_inv.vmr'. Using the Load Secondary VMR, one can overlay the 3D anatomical VMR to check the quality of the alignment with the new representation (via the BrainVoyager “File” > “Load secondary VMR” option).

As usual, the F8 and F9 buttons can be used to either toggle between the different representations or to choose  a different overlay.

Correction of in-plane non-isodimensional data

In the rare case that your anatomical data is not of same dimensions in-plane --i.e. x:256 y:192, z:192-- which can give problems for the initial alignment of the coregistration, you can correct this as follows:

  • Create VMR project
  • Click "Cancel" at the "Contrast/Brightness" window
  • Next a window pops up asking for transformation to sagittal format. Click "No".
  • Go to "VMR Properties- -> Options" dialog
  • At the "Center data in new dimensions..." field, check whether it displays New xdim 256, New ydim 256, New zdim 256 and click "Frame". Save the VMR.
  • Go to "3D Volume tools-->Spatial Transformations". Click the "To Sag" button, and click yes in the pop-up window.
  • Check the result. This should be in the BV standard representation.