GannetCoRegister for Siemens

We receive a number of support requests on GannetCoRegister for Siemens. We hope that Gannet’s co-registration for Siemens data does the correct job in most cases. However, on occasion, there can be hiccups. This post attempts to explain their origin, how to avoid them, and how to fix them.


At first glance, it seems trivial to correctly draw a box on a brain. Unfortunately, it is not, and the process has pitfalls. One reason is a lack of standardization and documentation. Unlike imaging metadata (at least some of which are agreed upon in DICOM fields), there is no universal vendor-independent data structure that carries the parameters of an MRS voxel, that is, dimension, position and rotation. Siemens, Philips and GE all have their own conventions and formats of defining and storing the voxel parameters, and they may even vary between sequence and/or software versions.

On top of that, the rotated-and-offset voxel is usually planned in the context of an oblique-and-offset anatomical image. Sometimes, the image on which the voxel is planned is not the one it is intended to be coregistered to. That makes three frames of reference, which may not even share the same coordinate system, e.g. when the table moves during scans. 


Despite a few caveats, GannetCoRegister will very likely work smoothly for you, if you adhere to a few Golden Rules.

  • Place your voxel in the image that you want to use for coregistration. This is usually an axial 3D MPRAGE. It is common to acquire three separate orthogonal 2D scans for voxel planning, because the Siemens software does not automatically provide sagittal and coronal reconstructions of the MPRAGE. We would encourage users not to do this - reconstruct the T1 manually, or ask your tech for help!
  • If the above is not possible, make sure that all your images are acquired in REF or FIXED mode. Running a sequence in ISO mode will reset the isocenter, move the table, and create a new frame of reference.
  • Take screenshots of each planned voxel.
  • Double check the reconstructed voxel for each dataset. Thoroughly compare it to the screenshot taken while planning the voxel on the scanner. See the Troubleshooting section below if you believe the reconstruction is not correct.

If you follow these, and still meet with issues, please let us know, so we can revise or further clarify them.


If your reconstructed voxel does not appear correct, you may try the following fixes:

  • If the voxel appears to be in the correct position, but the dimensions (or rotations) look swapped, you can edit GannetMask_Siemens.m (lines 80-83 as of today).
MRS_struct.p.voxoff = [rda.VOIPositionSag rda.VOIPositionCor rda.VOIPositionTra];
MRS_struct.p.voxsize = [rda.VOIThickness rda.VOIReadoutFOV rda.VOIPhaseFOV];
MRS_Rot(:,1) = rda.row.'.* [-1 -1 1]';
MRS_Rot(:,2) = rda.column.';

The first line determines the voxel offset (and should be fine in all cases). The second line determines the voxel dimensions, while the third and fourth rotate the voxel in space. You may try to swap the dimension variables, or modify the -1 and 1 values in the multiplication array.

  • If you have planned your voxel in an image other than your MPRAGE and get wrong results, you can try fixing this with SPM. Coregister (estimate & reslice) your MPRAGE to the image you used for planning, and feed the new image to GannetCoRegister. This will reconcile the coordinate systems defined in the nifti headers, but the coregistration of the two images might be suboptimal (depending on the quality of the planning image).

Please let us know when you encounter difficulties using GannetCoRegister or GannetSegment, along with the specific sequence and Siemens software version you are using. Your feedback will help improve future versions of Gannet!