Coregistration - Overview

The coregistration of data sets is an important prerequisite for advanced data processing and visualization features, i.e. to visualize functional data from scanning session A in a 3D data set recoreded in scanning session B. This section describes the two most important alignment problems of fMRI data analysis:

  • Coregistration of functional and anatomical data

  • Coregistration of two 3D anatomical data sets

In BrainVoyager, both coregistration problems assume that 3D data sets are oriented in a certain standardized way, for details see the topic "Standardization of 3D data sets".


Standardization of 3D data sets

If you have created a .VMR project using the File->New... menu item or the Create new document icon [image] , you will immediately see your data in the appearing .VMR project window. If you do not see sagittal slices in the SAG view, you must rearrange your data as described below. In the figure, you see for example that there are axial sliced in the SAG view window. Before rearranging the axes of your data set, you may also change the contrast and brightness of the images. Most MR scanners produce 12 bit data (contained in 2 bytes = 16 bit). In order to save space and speed up processing, BrainVoyager converts the 12 bit data into an 8 bit format. For anatomical data, this reduction is reasonable (Note, that this reduction is NOT done with functional data sets). In order to obtain best results you can control the mapping from 16 bit to 8 bit data since the program retains the original 16 bit data in memory after having created a project. If the brightness and contrast is not very good (e.g., images too dark), open the 16 bit to 8 bit Data Conversion dialog using the Options->Convert 16 to 8 bit intensity... menu item.

The figure below shows the invoked dialog. You may now adjust the Contrast and Brightness fields using either the sliders or the text fields directly. Click the Convert button to let BrainVoyager convert from 16 bit to 8 bit in an optimal way. Try again with new values until you are satisfied with the result. This step is typically done only once (or not at all if your data looks good right from the beginning). After closing the created .vmr project the 16 bit data set is deleted from memory. If you want to save the original 16 bit data, use the dialogs File->Save .v16... menu item. This allows you to load the data set at a later time for readjustment of Contrast and Brightness. Note, however, that you must use the original .vmr data set since any further processing (e.g., rearrangement etc.) will make the .vmr file and the .v16 file incompatible to each other. Close the dialog using the Quit button. You may now save the .vmr data set using the File->Save As... menu item. Note, that you can also change contrast and brightness using the Options->Contrast/Brightness/Color menu item to invoke the Contrast/Brightness/Color dialog. This dialog operates directly on the 8bit data. This means that if your images are very dark or do not have good Contrast, you may improve this but you can not do it profoundly as it is done with the described dialog. Use this option for fine tuning (e.g., temporarily darkening of the intensity values to highlight colored functional clusters, see figure ?).

BrainVoyager assumes that the axes of your data are ordered in such a way that you see sagittal slices in the SAG view of the .VMR project window. If this is not the case, you may easily rearrange your data set accordingly. Click the To SAG button in the Spatial Transformation tab of the 3D Volume Tools dialog. The Transform to Standard SAG dialog appears (see below). The small icons represent possible axial, coronal and sagittal views you might see in your data set in the SAG view. Click the icon which most resembles your particular case. In the example shown above, the SAG view contains an axial view as represented with the left upper most icon. Check the correct icon and press the Rearrange button. After a few seconds you will see that the SAG view now contains sagittal slices (see figure below). Depending on how your images were initially recorded, you might see sagittal slices which are upside down. In order to correct this, finally select the icon in the SAG field and click Rearrange once more. If your data looks as it is shown in the figure below, click the Quit button to dismiss the dialog. You may now save the rearranged .VMR data set.

Although you can use many features of the 3D Volume Tools dialog with any voxel-spacing, we recommend to transform your data set to iso-voxel with a 1mm x 1mm x 1mm resolution. Some options, like the measurement of the size of a region (volumetry) indeed assume cubic-millimeter iso-voxel. If your 3D data set deviates from this use the Isovoxel Transformation dialog to interpolate your voxels accordingly. Invoke this dialog using the Iso-voxel button in the Spatial Transformations tab of the 3D Volume Tools dialog. In the X, Y, and Z fields enter the resolution of your voxels (see example below for the test data set shown in the first and last figure of this section).

If you have arranged your data to sagittal slices, the axes are defined as described in the previous section . Since the intensity values have to be recomputed for positions where no data was obtained, an interpolation method is recommended. As default, trilinear interpolation is specified but you may also chose Sinc interpolation (for more information on the selection of interpolation methods, see tip in the section Talairach transformation of 3D data sets ). If you have entered the resolution of your voxels in each text field, click the OK button. Your .vmr data set will be replaced with cubic 1mm isovoxel. Save this data set as the source .vmr file for all subsequent operations.


Coregistration of 2D functional and 3D anatomical data sets

Coregistration of functional and anatomical data sets

In order to analyze and visualize functional data in (normalized) 3D space, the original 2D functional (T2*) scans have to be aligned with a anatomical (T1) scan for each subject. The term ”2D functional scan” refers to the original set of slice-based recordings. Of course, a functional scan normally samples more than one 2D slice and, thus, it is actually ”3D”. One stack of different 2D slices is therefore termed functional volume in this guide. The term ”2D functional scan” as well as ”2D reference scan” is used to stress that the functional data is analyzed ”slice-based” within .FMR projects. In other words, a .FMR project does not know where in 3D space the slices are located; all analysis is performed for each slice independently from other slices within the original recorded space. In the same line of reasoning the term ”2D statistical map” is used to refer to a set (or stack) of statistical 2D maps, one map for each individual slice. A successfully performed 2D-3D coregistration offers the possibility to visualize statistical results on top of anatomical 3D data sets including resliced sagittal, coronal and transversal slices. It is also the first step for superimposing statistical data in normalized (Talairach-based) 3D space.

BrainVoyager offers two methods to superimpose statistical maps on a 3D data set.

  1. The first consists of computing and saving a 2D statistical map from a respective .FMR project. In applying a 2D-3D coregistration .TRF file, the 2D map can then be transformed into a 3D map. 3D maps are saved in VMP files which can be loaded into a VMR project for visualization. In order to visualize the 3D map in Talairach space an additional TRF file as well as a TAL file has to be applied for each computed map.

  2. The second, more powerful approach, requires that the full functional time course data of an FMR project is first transformed into (stereotactic) 3D space resulting in VTC files (VTC = volume time course). VTC files can be attached to a 3D anatomical (VMR) project allowing to compute any statistical test directly within that project. The resulting statistical maps are immediately visualized on top of the VMR slices. The advantage of this approach is that you do not have to apply any spatial transformations to the resulting maps since the time course data used to compute the 3D maps is already in the correct space. In addition, this approach allows to show the time course data of activated regions by simple mouse clicking.

Both approaches require the coregistration of the ”2D” space of the .FMR project with a 3D data set (.VMR file) recorded in the same or different scanning session. The VMR data set should contain at least the full extent of the brain or better the complete head of the subject.

There are three approaches for 2D-3D coregistration supported in BrainVoyager:

  • Fully automatic same-session 2D-3D alignment

  • Manual, interactive same-/inter-session alignment

  • Semi-automatic, intensity-based 2D-3D alignment (work in progress)


AutomaticSameSession2D_3DCoregistration

Automatic same-session 2D-3D coregistration

This approach requires that you have recorded the 3D data set in the same session as your functional data (assuming no or minimal head movement between scans). Using a fast 3D scan (e.g., the Siemens MPRage sequence), it is possible to obtain a 3D data set with 1mm3 resolution in about 8 minutes. A 3D scan makes the recording of a 2D anatomical reference scan obsolete, thus, this recommended approach does not require much more time as a 2D functional / 2D anatomical appraoch. A same-session 3D recording allows to use the slice position parameters of the 2D and 3D scan to quickly align the two data sets since intra-session anatomical and functional slice specifications refer to the same reference system. These values may be entered directly in the 2D-3D Same Session Alignment dialog. This dialog is invoked through clicking the Use 2D/3D pos values button in the Spatial Transformations dialog tab of the 3D Volume Tools dialog. If you work with Siemens .IMA files (not the exported file format), the necessary information is stored automatically during the .FMR and .VMR project creation process in corresponding scan position (.POS) files. You have just to use the Load... buttons to select the scan position files for the 2D and the 3D recording, respectively.

Remarks: Automatic creation of these files is currently only supported for SIEMENS IMA files. To use this type of fully automatic 2D-3D coregistration for other data file types, you must extract the relevant pieces of information for the 2D position parameters field and the 3D position parameters field yourself from the information provided by your scanner, i.e. from the header files. We currently work on extracting the relevant data from GE and Philips file headers; for more information contact Brain Innovation.

The fields define transformation parameters for a virtual slice running exactly through the center of the slab (image volume) covered by the 2D scan and the 3D scan, respectively. The first column of the parameters define the translation of the centre point of the virtual centre slice with respect to the iso centre of the magnet. The RowDirX/Y/Z and the ColDirX/Y/Z parameters define the orientation of the slices of the functional (2D) and anatomical (3D) scan usiong two direction vectors.


Manual interactive 2D-3D coregistration

The manual alignment method requires the interactive specification of reslicing parameters for the 3D data set in such a way that the set of resulting resliced images matches the anatomical 2D reference images of the 2D functional project as close as possible.

To manually coregister a 2D functional with a 3D anatomical data set do the following:

  • Load the 3D data set (.VMR file) to which you want to register your 2D functional data. This data set should have 1 mm resolution and the axes should fit with the BrainVoyager standard. See section "Standardization of 3D data sets" for further details on how to standardize your 3D data sets. If your data set has been standardized, the SAG view shows sagittal slices, the COR view shows coronal slices and the TRA view shows axial slices as shown in the figure above.

  • Switch to the Spatial Transf tab of the 3D Volume Tools dialog of the loaded .VMR file. Click the Select .FMR button to specify the functional project which you want to coregister to the loaded 3D data set. BrainVoyager checks whether the specified .FMR project possesses a link to a .AMR file. An .AMR file may contain a set of 2D anatomical (T1-weighted) images recorded in the same positions as corresponding functional slices. Alternatively, an AMR file may contain simply the first scan of the functional slices (T2* reference, see ?). If the .FMR project does not reference an .AMR file, BrainVoyager does this automatically at this point based on the functional data found in the FMR project. In this case, a dialog will appear informing you that now AMR file has been found and that reference images are created internally.
  • Switch to the Reslicing tab of the 3D Volume Tools dialog and click the Oblique 2D button in the Slicing Mode field. You now should see an image in the RESLICE view identical to the one shown in the TRA view. The RESLICE view is the subwindow in the left lower quadrant of the VMR project window.
  • The image in the RESLICE view shows either a resliced image of the 3D data set or one image of the set of images in the referenced .AMR data set from the functional project. Click the Show ref .AMR button in the Reslicing tab to toggle between these two views. The task to solve is to rotate and translate the 3D VMR data set in such a way that the images in the RESLICE view become as similar as possible to the images of the AMR slices from the functional project.
  • Enter all values you have available about your functional scan in the 2D-3D Alignment field of the Reslicing tab including N slices, Slice thickness (in mm) and Gap thickness (in mm). This step creates internally a 3D data set from the slices of the functional project.
  • You must also specify the field-of-view (in mm) used in the functional scan. Enter the appropriate values in the xFoV and yFoV entries of the Scale field. This information is used internally to scale the functional data to the 1mm resolution of the 3D data set. You will see the result of scaling if the Show ref .AMR slice option is deselected.
  • You should see the effects of entering the requested values immediately in the four views of the VMR project window. For example, each slice is symbolized with a horizontal white line in the SAG view. These lines are shown with apppropriate spacing according to the slice thickness and gap thickness values you have entered. The slices are internally numbered from top (slice 1) to bottom (slice N). You may inspect all resliced images using the Show slice spin control in the 2D-3D Alignment field. The selected slice is immediately shown in the RESLICE view. As described above, you may inspect either an AMR slice from the functional project or a resliced anatomical image from the VMR project by toggling with the Show ref .AMR button. Coregistration between the 2D and 3D data set has been achieved if reslicing parameters for the 3D data have been found producing resliced anatomical images which match the AMR slices as good as possible. In other words, we keep the VMR data fixed (target) and try to transform the stack of functional slices to match with corresponding positions of the VMR data. The spatial transformation is interactively performed by changing six parameters - three translation and three rotation values. The effect of changing these parameters is shown in the RESLICE view. It shows the result of "scanning" the 3D data set along the current white line representing one of the functional slices. The current white line is the one indicated in the Show slice field.
  • In the beginning of the alignment, the stack of AMR slices - visualized by the white lines - are placed horizontally which means that they are initially coregistered with horizontal slices running through the VMR data set. To change the position of the AMR slices with respect to the VMR data, adjust the x-, y- and z-coordinates of the red cross. You may change the coordinate values through clicking in the SAG, COR or TRA view (see description of navigating in 3D). For a more precise adjustment, it is recommended to use the x, y and z spin controls in the 3D Coords tab.
  • The three rotation values are specified through changing the Tra->Cor, Tra->Sag and Sag->Cor values in the Angles field of the Reslicing tab. You may enter values directly in these text boxes but for a more precise adjustment, it is recommended to use the respective spin controls. The effect of changing the rotation values is immediately shown in the RESLICE view as well as in one or more of the other three views depending on the particular angle modified.

You have accomplished manual, interactive 2D-3D coregistration if the 3 translation and 3 rotation parameters produce a set of resliced VMR images which are spatially matched to the AMR images of the functional 2D project. If you have based your alignment on one slice and toggling with the Show ref .AMR button shows that the resliced VMR image is accurately coregistered with the corresponding .AMR slice, then all other slices should also be aligned assuming that the provided values (slice thickness, gap thickness) are correct. You may check the found coregistration by looking at several (or all) slices using the Show slice spin control to select slices and the Show ref .AMR button to check the alignment. Manual, interactive alignment is a non-triial task but it becomes quite easy after some practice. It's main advantage is that it is applicable in any case as opposed to the automatic 2D-3D alignment methods which is not yet available for all scanner data and which assumes that there is no movement between the functional data set and the same-session 3D data set.

The following figure shows the same data as above. Both figures show the result of a successful alignment. The upper figure shows the referenced AMR file (which are simply the first images of the functional data) and the lower figure shows the coregistered resliced anatomical image of the 3D data set. A 2D map was loaded to help interactive coregistration as described below.

Further options. There are two further options influencing the result of reslicing the 3D data set. Check Trilinear interpolation (default) to obtain a more precise reslicing result. You may also check Slice averaging to obtain resliced images which are averages across the specified slice thickness (see below). It is, however, not recommended to enable this option permanently since it slows down the reslicing process substantially.

TIP Using 2D maps as ”landmarks”. Manual coregistration may be much easier if you would see a statistical map superimposed on the .AMR as well as the resliced VMR images since the colored clusters of the map could serve as "landmarks" for proper alignment. You can superimpose statistical 2D maps by clicking the Analysis->Overlay maps menu item to invoke the Overlay Maps dialog. Use the Load 2D maps... menu item in the local File menu to load the map. Note, that loading 2D maps into a 3D volume file is normally not possible. It is only possible if an .FMR project file has been provided in the Spatial Transf tab of the 3D Volume Tools dialog. After loading a map, you should see clusters of the loaded statistical map in the RESLICE view. Use the Show slice spin control to inspect all slices. Use the Show ref .AMR toggle to switch between the resliced images of the .VMR data set and the .AMR slices from the functional project. If the statistical map is superimposed on the .AMR files, the resulting images in the RESLICE view look exactly as if you would have superimposed the map in a normal FMR project window. You can use the clusters from activated brain regions as "landmarks" to help during the alignment process. Toggle between .AMR and resliced .VMR images to check whether the map clusters are located at the correct position with respect to the surrounding structures (sulci/gyri). Note, that you can decrease or increase the statistical threshold and change the cluster size as usual using the Overlay Maps dialog

TIP Image fusion. A helpful feature for checking the alignment is image fusion which shows a resliced VMR image and the corresponding AMR image simultaneously. Press the F12 button to activate image fusion. Pressing the F12 button again stops image fusion. The figure below shows on the left a resliced VMR image, in the middle the corresponding AMR slice from the functional project and on the right the result of fusing the two images.

TIP A convenient way to toggle between a resliced VMR image and a corresponding AMR image is provided with the F11 button

TIP For the fine adjustment of the three translation parameters it is necessary to switch between the 3D Coords tab (for the x, y, z spin controls) and the Reslicing tab (for the Show ref .AMR toggle). This tab switching can be done more conveniently using the F3 / F4 keyboard buttons.

Spatial transformation files. It is recommended to save the adjusted 2D-3D alignment parameters to disk for later use. Click the Save .TRF button in the Spatial transf tab. This will invoke a Save As... dialog. Enter a file name like "nn_2D-3D.trf" and click the Save button. A .TRF file contains all informations about 2D-3D (or 3D-3D) spatial transformations. You may simply load such a file using the Load .TRF button to reestablish all spatial transformation values. Spatial transformation files are also needed for other alignment tasks. The 2D-3D coregistration .TRF file, for example, is required for computing volume time course (.VTC) files (see below).

REMARK It is planned for a future release of BrainVoyager to use the manual approach in combination with the intensity-based coregistration approach. It is then only necessary to manually provide a rough alignment from which then the automatic intensity-based procedure attempts to find a detailed match.


Semi-automatic intensity-based 2D-3D coregistration

This approach works via an intermediate step which creates a .VMR data set from the .AMR file referenced by the .FMR project selected for coregistration with a anatomical 3D data set. The VMR file is build by using information about the number of slices, slice thickness and gap thickness. The problem is then to coregister two VMR files for which the 3D-3D alignment procedure described subsequently can be used. Since the VMR file from the functional measurements covers a smaller volume with a smaller resolution, this approach requires some help from the user, i.e. in providing a rough initial manual alignment to start with. This approach is currently in beta testing and will be made available and fully described with one of the next program releases.


Alignment of two 3D data sets

This option allows to automatically align 3D T1 weighted data sets with subvoxel precision. The source and the target data set may be of different quality, e.g., the source might be a fast 3D scan (e.g., Siemens MPR sequence) whereas the target might be a high-quality T1 FLASH scan. However, both recordings should have scanned roughly the same area (e.g., head) with the same resolution (e.g., 1mm x 1mm x 1mm). If the last condition is not fulfilled, use the Isovoxel Transformation dialog as described above to produce two data sets with the same resolution.

An important application of 3D-3D alignment is to spatially match a 3D T1 scan of a subject to another 3D T1 scan of the same subject. This is particular helpful if the target .vmr data set has been already rotated into the AC-PC plane (Talairach step I, see ?). This removes (usually small) variations between the interactive Talairach transformation procedures of the same subject. The following describes a possible scenario of inter-session Talairach normalization using 3D-3D alignment:

1) Session I

  • T1 FLASH recording of subject nn (plus functional measurements)

  • Interactive specification of AC-PC plane (creation of nn_acpc.trf file)
  • Rotation of 3D data set into AC-PC plane, creation of nn_acpc.vmr
  • Interactive specification of the borders of the cerebrum (see below), creation of nn_cerebrum.tal file

2) Session II

  • Fast T1 (i.e. MPR) recording of subject nn (plus functional measurements)

  • Automatic 3D-3D alignment with nn_acpc.vmr file (-> nn_s2_acpc.trf file)
  • Application of the nn_cerebrum.tal file for the final Talairach step.

With 3D-3D alignment, manual Talairach transformation has to be done only once per subject. For all later measurements of the same subject, Talairach transformation is done fully automatically. Since the functional data is also incorporated automatically into the 3D data set of the respective recording session (intra-session 2D-3D coregistration), functional data (.VTC files) may be aligned very precisely and automatically between different recording sessions of the same subject. That is, both .TRF files for creation of .vtc files are generated automatically: the nn_2D-3D.trf file and the nn_acpc.trf file. The third file for .VTC creation, the nn_cerebrum.tal file is also available from the Talairach normalization of the first session. A multi-study analysis across several sessions with the same subject can be performed using the General Linear Model (see ?).

To perform 3D-3D alignment:

  • Load the source 3D data set using the File->Open menu item

  • Load the target .3D data set using the Load button in the 3D-3D alignment field in the Spatial Transformations tab of the 3D Volume Tools dialog.
  • In the 3D-3D alignment field, you may now select one orthogonal slice view (check TRA, SAG or COR option) which is shown during the alignment process. You may want also to choose to have subvoxel interpolation activated. Check either Trilinear (fast) or Sinc interpolation slow, Hanning window of 2 recommended).
  • Press the Align button in the 3D-3D alignment field to start the spatial alignment process. In the RESLICE view, you can observe the ongoing process: small transformations slowly rotate the source data set into the target space.
  • The result of the 3D-3D alignment process consists in the computations of appropriate translation and rotation parameters which are set in the respective fields. You should save them with the Save .trf button to disk (e.g, nn_acpc_session2.trf). In order to finally get the transformed .VMR file, you have to apply the computed parameters to the source data set using the Export .VMR button (e.g., nn_acpc_session2.vmr).

NOTE You may "help" the alignment process by specifying initial translation and/or rotation parameters. This is helpful (or even necessary) if you have very different 3D recordings. It is also useful to simply speed up the alignment process.

TIP You can interrupt the fitting procedure pressing the <Escape> button on the keyboard.