How to ... (subject-subject)


How to verify and voxel sizes and file dimensions

1. Use the program scanheader to review the header information that the AIR package will use to align and manipulate your studies.

Example:

scanheader pet1

will display the header information for the study pet.img

The AIR package provides a means for directly modifying voxel sizes (see program fixheader) If the values for the file dimensions or bits/pixel are incorrect, the program makeaheader can be used to make a new, corrected header.


How to register subjects to one another or to an atlas using a linear affine spatial tranformation

1. If you are using MRI data, manually edit the data to remove nonbrain structures. For PET data with a PET atlas, editing is not required.

2. In this example, the file called atlas can either be an edited image or averaged edited image in a standardized space (e.g., Talairach space) or it can simply be edited data from another subject in its native space.

Use alignlinear to derive a registration parameter file (called mri01.airatlas in this example).

alignlinear atlas mri01 mri01.airatlas -m 12 -x 3 -c 1

This can take many minutes.

3. Use reslice to reslice the mri01 to match the atlas. The resliced file will be called rmri01 (or cmri01 if you want it interpolated to cubic voxels).

If you want the reslice file to have the same voxel z_size and number of planes as the standard_pet file:

reslice mri01.airatlas rmri01 -k

If you want the reslice file interpolated to cubic voxels in addition to being resliced:

reslice mri01.airatlas crmri01


How to create your own atlas

1. Pick one subject and register the images of all subjects to the one you have selected (register that subject to their self as well). This example will assume that you have registered three subjects to subject number one to generate .air files, "mri01.airmri01", "mri02.airmri01", and "mri03.airmri01".

2. Use definecommon_air to create .air files for registering each individual into a space that approximates the average size, shape and orientation of the original images of the subjects:

definecommon_air mri .airmri01 mri .aircommon y 01 02 03

This will produce output .air files, "mri01.aircommon", "mri02.aircommon" and "mri03.aircommon".

3. Use reslice to resample each original file into the common space:

reslice mri01.aircommon crmri01
reslice mri02.aircommon crmri02
reslice mri03.aircommon crmri03

4. Use softmean to average the files in the common space:

softmean atlas y null crmri01 crmri02 crmri03

This will create an averaged file called "atlas.img"

5. If you like, you can repeat this entire process using "atlas" as the target in step 1 (don't register "atlas" to itself). You are unlikely to see much change after one or two iterations.

6. If you want the atlas to have a standardized orientation (e.g., with the AC-PC line horizontal), you can figure out the transformation required to achieve this orientation and then use manualreslice to create a .air file that will allow "atlas" to be resliced to that orientation (use only rigid-body transformations, i.e.no rescaling). Suppose that this file is called "atlas.airstandardspace", you can then create .air files that will allow each individual file to be resliced directly into that standard space using combine_air:

combine_air mri01.airstandardspace y atlas.airstandard mri01.airatlas
combine_air mri02.airstandardspace y atlas.airstandard mri02.airatlas
combine_air mri03.airstandardspace y atlas.airstandard mri03.airatlas

7. Now you can reslice each individual file directly into the standard space:

reslice mri01.airstandard crmri01 -o
reslice mri02.airstandard crmri02 -o
reslice mri03.airstandard crmri03 -o

and create an average atlas in the standard space:

softmean standardatlas y null crmri01 crmri02 crmri03

The file "standardatlas.img" is the final atlas.


How to register subjects to an atlas using nonlinear spatial transformations

1. If you are using MRI data, manually edit the data to remove nonbrain structures. For PET data with a PET atlas, editing is not required.

2. In this example, the file called atlas can either be an edited image or averaged edited image in a standardized space (e.g., Talairach space) or it can simply be edited data from another subject in its native space.

Use align_warp to derive a registration parameter file (called mri01.warpatlas in this example) using a 5th order polynomial fit for MRI data (or a 3rd order polynomial fit for PET data).

For MRI data:

align_warp mriatlas mri01 mri01.warpmriatlas -m 1 5

For PET data:

align_warp petatlas pet01 pet01.warppetatlas -m 1 3

This can take a long time. You may get better results by initializing align_warp with a linear tranformation derived using alignlinear. See the align_warp page for details.

3. Use reslice_warp to reslice the original file to match the atlas:

reslice_warp mri01.warpmriatlas rmri01 -k


How to link together a series of .air files and a .warp file

Suppose that you have:

and you want a single file for transforming "pet1" directly into the standardized space.

1. Use combine_air to combine any sequential .air files into a single tranformation:

combine_air pet1.airmri y meanpet.airmri pet1.airmeanpet

2. Use combine_warp to combine .air and .warp files into a single .warp file:

combine_warp pet1.warpstandardspace y atlas.airstandardspace mri.warpatlas pet1.airmri

3. Use reslice_warp to resample "pet1.img"

reslice_warp pet1.warpstandardspace rpet1 -k


Modified: December 22, 2001

© 1995-2001 Roger P. Woods, M.D.(rwoods@ucla.edu)