How to ... (PET-PET and MRI-PET)


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 two PET studies

1. Verify the voxel sizes and file dimensions of the studies

2. Decide which study you want to reslice--this study will be called "pet2" in this example. The other study will be called "pet1"

3. Use alignlinear to derive a registration parameter file (called pet2.airpet1 in this example).

If your PET images are not very noisy:

alignlinear pet1 pet2 pet2.airpet1 -m 6

If your PET images have voxels that are extremely anisotropic

alignlinear pet1 pet2 pet2.airpet1 -m 6 -z

If your PET images are moderately noisy:

alignlinear pet1 pet2 pet2.airpet1 -m 6 -b1 5.0 5.0 0.0 -b2 5.0 5.0 0.0

If your PET images are extremely noisy with voxels that are extremely anisotropic:

alignlinear pet1 pet2 pet2.airpet1 -m 6 -b1 8.0 8.0 0.0 -b2 8.0 8.0 0.0 -z

This may take several minutes.

4. Use reslice to reslice one file to match the other. The resliced file will be called rpet2 (or crpet2 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 pet2.airpet1 rpet2 -k

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

reslice pet2.airpet1 crpet2


How to interpolate your standard file to cubic voxels

1. Use zoomer to interpolate the standard pet to cubic voxels. The resulting file in this example will be called cpet1

zoomer pet1 cpet1


How to review the contents of a .air file

1. To review the contents of .air file pet2.airpet1, use scanair:

scanair pet2.airpet1


How to invert a .air file to reverse the direction of reslicing

1. Review the contents of the .air file you want to invert

2. Use invert_air to create a new .air file

invert_air pet2.airpet1 pet1.airpet2

3. Use reslice to create the desired file

reslice pet1.airpet2 rpet1 -k


How to align and average several PET studies in preparation for MRI-PET registration

1. Choose one of the studies to serve as the standard to which all the others will be registered (pet1) will be chosen here

2. Derive registration parameters to reslice each study to this standard using alignlinear:

alignlinear pet1 pet1 pet1.airpet1 -m 6

alignlinear pet1 pet2 pet2.airpet1 -m 6

alignlinear pet1 pet3 pet3.airpet1 -m 6

alignlinear pet1 pet4 pet4.airpet1 -m 6

alignlinear pet1 pet5 pet5.airpet1 -m 6

alignlinear pet1 pet6 pet6.airpet1 -m 6

(You may want to include the -b option with additional smoothing if the images are noisy or the -z option if the voxels are extremely anisotropic)

3. Reslice each study to match the standard and interpolate them all to cubic voxels at the same time:

reslice pet1.airpet1 crpet1

reslice pet2.airpet1 crpet2

reslice pet3.airpet1 crpet3

reslice pet4.airpet1 crpet4

reslice pet5.airpet1 crpet5

reslice pet6.airpet1 crpet6

4. Use softmean to create a mean image (called meanpet here) suitable for registration with an MRI

softmean meanpet n crpet1 crpet2 crpet3 crpet4 crpet5 crpet6


How to reorient an MRI image if it is upside down, backwards, and/or mirror imaged in comparison to your PET images

1. Use your display package to decide what needs to be done.

2. Use reorient to create a new MRI file in the position you want. In this example, the original upside-down and backwards MRI (ubmri) will be rotated 180° around the x-axis to create a properly oriented MRI (mri ):

reorient ubmri mri xx


How to align a PET study (or averaged PET study) to an MRI study

1. Reorient the MRI image if needed.

2. Use your image editing package to edit the MRI to remove the scalp, skull, and meninges to create an edited MRI file (emri )

3. Decide whether you want to derive parameters to match the MRI to the PET or the PET to the MRI. (You can always use invert_air if you change your mind later, or if you want both).

4. Use alignlinear to align the studies. In this example, the edited MRI (emri ) will be aligned to an averaged PET (meanpet ) to create a registration parameter file called emri.airmeanpet

alignlinear meanpet emri emri.airmeanpet -m 6 -p1 0 -p2 256 -t2 10

5. Reslicing of the MRI to match the PET or the PET to match the MRI using the derived registration parameter file is completely analogous to reslicing of PET studies as described above.


How to reslice the original unedited MRI to match the PET study using registration parameters derived with an edited MRI

1. If you used alignpettomri to derive the registration parameters, you will need to create an inverted registration parameter file using invert_air:

invert_air meanpet.airemri emri.airmeanpet

2. Copy the registration parameter file to a new file (uemri.airmeanpet in this example).

cp emri.airmeanpet uemri.airmeanpet

3. Use mv_air to change the file to be resliced to the uneditedmri (mri ) in the registration parameter file:

mv_air uemri.airmeanpet mri

4. Use reslice to create the new resliced MRI file (rmri ) to match your PET file:

reslice uemri.airmeanpet rmri -k


How to reslice each of your original PET studies to match the MRI study

1. Register each of your original PET studies to the study that will serve as the standard as described above.

2. Average your PET studies to make a mean image as described above.

3. Align the MRI study to the mean image as described above.

4. If you used alignlinear to align the MRI to the PET study, apply invert_air to the resulting registration parameter file to get parameters to align the mean PET to the MRI.

5. Use combine_air to combine the registration parameter file for aligning the mean PET to the MRI (meanpet.airemri ) with the registration parameter files for aligning each of the PET studies to the standard PET to create new registration parameter files for directly reslicing the PET studies to match the MRI:

combine_air pet1.airemri n meanpet.airemri pet1.airpet1

combine_air pet2.airemri n meanpet.airemri pet2.airpet1

combine_air pet3.airemri n meanpet.airemri pet3.airpet1

combine_air pet4.airemri n meanpet.airemri pet4.airpet1

combine_air pet5.airemri n meanpet.airemri pet5.airpet1

combine_air pet6.airemri n meanpet.airemri pet6.airpet1

In each case, the program will state that the parameters are valid only if meanpet is spatially equivalent to pet1 . It is if you have followed the examples as outlined here.

6. Use reslice to generate the resliced files (rrpet1, rrpet2, etc. ):

reslice pet1.airemri rrpet1 -k

reslice pet2.airemri rrpet2 -k

reslice pet3.airemri rrpet3 -k

reslice pet4.airemri rrpet4 -k

reslice pet5.airemri rrpet5 -k

reslice pet6.airemri rrpet6 -k


Modified: December 11, 2001

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