Personal tools
You are here: Home Documentation Data Processing MRI Data Functional Data Preprocessing Reorient
Document Actions

Reorient

When we extract the raw data from the scanner with WebDB we get it in the form of a 4d NifTi .img and .hdr pair for each scan/block. The data from each run or "block" of the experiment will be in a separate directory. The first step in analyzing this data is to reorient the images to be in the correct orientation. We are using radiological (RPI) orientation throughout the entire processing stream. This allows us to use both the FSL tools and Caret without needing to change the left-right orientation of the data. RPI orientation means that the voxel counts (x,y,z) increase as we move from (R)ight to left for x, (P)osterior to anterior for y, and (I)nferior to superior for z through the image.

The orientation of the raw data from the scanner depends on the pulse sequence and the reconstruction method, but is usually RAI or LAI. An example of RAI data is show below:

EPI (RAI)

To ease with correctly reorienting data, we use a script called make_rpi which takes the data, determines what orientation the data is in by reading from the NifTi header, and then reorients the data into RPI orientation by moving the actual data and manipulating the header.  So far this method has handled all the test images it has been tried on, but it is important to check this output before continuing with further analysis by comparing with the structural, where right to left can be easily determined by the vitamin E pill we always place on the subjects right side before scanning.  See the note below for a warning on using make_rpi.

Below is the same image as above, in the correct RPI orientation:

EPI (RPI)

Procedure:

We usually use our all encompassing preprocessing script, do_all_func_preprocessing, to handle this conversion. Be sure to give it either the -I option (to just do the conversion) or the -A option (to include this conversion as part of a longer preprocessing series).

To do this by hand involves one step:

#> make_rpi rawdata.hdr data.hdr

Notes:

The preprocessing script uses a command line VoxBo job to accomplish this task for each run.

Remember, because we are using radiological orientation, in many image display programs, the right side of the image will be on the left, and vice versa. Be aware of how each program displays the data.

Warning about make_rpi: This little script assumes that the data is in NifTi format, and that the axis are correctly associated, even if they are in the wrong orientation.  This is easy to check, using FSLview.  Open the image with FSLview, and check to make sure that, no matter what orientation the data is in, the labels on the individual axis match the corresponding data, such that what is labelled as L-R is actually the L-R plane, etc.  See below for an example of correctly labelled, but mis-oriented data.  If the axis don't match, you will have to manually correct this using fslswapdim and fslorient.


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: