Compiled Image Registration, Segmentation, and Masking Protocol (5/02)

This is the protocol currently in use by EDEVEL group. (analyses: YALE, YALE2, leonard)

 

Image Registration

Segmentation

Brain Masking

Useful terms


 
 

Image Registration

 

We are registering our brain with the average 305 brains in MNI space.  This registration is 3 translation x 3 rotation (no scaling).
1. Register the raw mr using the average brain and tags.
register /icbm/MNI_DATA/average_brain/norm_avg_305_mri_1mm_unfilt.mnc -tag /data/devel/Elizabeth/validity/norm_avg_305_mri_1mm_unfilt.tag case#_raw.mnc
2. Set the average brain to gray, and adjust the intensity of the raw mr to a comfortable intensity. (The image can be enlarged by holding shift + the middle mouse button, and it can be moved by holding shift + the left mouse button).
3. Pick the 10 tag points on the raw scan corresponding to the ten on the average brain. Be sure to always pick the points with the "record tags" icon located on the left of the screen. Never use the right mouse button, otherwise the tag points will not stay in order, and order is critical. This is especially important if you decide to re-pick a point. For example, if you decide to re-pick the first point, go back to the first point by moving the highlighted number up to 1 using the up arrow. Then when you re-pick the point, click the record tag icon. This will move your tag point while maintaining the order. NOTE: The very center pixel of the cross hair is the actual location of the tag point.
4. The ten tag points:
 A. Left and Right Cerebellum (1 & 2)
Scroll through the sagittal view. Keep an eye on the cerebellum, and watch for when it becomes so small that you can no longer see the horizontal striations. Then in the sagittal view, click on the very center of the cerebellum, seen as an oval shape, with the left mouse button (Fig 1, Fig 2).  In the coronal view you should be able to see a rough triangle formed by the transverse sinus (Fig 1, Fig 3).  Look at the coronal view, and select the tag by choosing the apex of the triangle formed by the transverse sinus, cerebrum, and cerebellum (Fig 2, Fig 4). Double check through the axial view that the tag point chosen is in approximately the same area as the average brain.
B. Corpus Callosum  (3 & 4)
Most Anterior Point:
In the sagittal view, scroll to the mid sagittal slice until you're at the most anterior point of the corpus callosum (Fig 5). Click on the most anterior point at which the corpus callosum curves. Be sure to look in all views of the raw scan and compare them to see how similar the image is with the averaged brains. Make sure you are in the very middle by checking in the coronal view that you are between the two hemispheres (Fig 5).
Most Posterior Point:
Again, go to the sagittal view. You must scroll through again because sometimes the head can be tilted to the left or right (which is visible in the axial view), and find the most posterior point of the corpus callosum (Fig 6). Click on the corpus callosum right before the point at which it starts to curve in, but after the round peak (Fig 6). Check in all views and compare your image with the sample images to double check. NOTE: be cautious of what you think the most posterior point is because sometimes the head can be tilted forward.
C. Left and Right Eye Sockets (5 & 6)
Scroll through the axial view until you can see the cornea quite distinctly. Pick the center of the eye socket (Fig 7, Fig 8). Scroll through the coronal view to make sure you are at the point where the diameter of the eye socket bones are the largest. Also make sure you are in the middle of the socket. Be sure to check all views, and make sure the tag point is centered in all the views (Fig 7, Fig 8).
D. Fourth Ventricle  (7)
Scroll in the mid sagittal view until you are at the very corner of the fourth ventricle (Fig 9). Look at the axial view to be sure you are in the middle and at the most posterior point of the fourth ventricle. If not just scroll through the sagittal view, while looking at the axial view, until you are at the most anterior point. Then pick the tag point (Fig 9).
E. Left and Right Temporal Lobe  (8 & 9)
Scroll through the coronal view until you are at the most anterior point of the left temporal lobe. NOTE: be aware of bone and fats that are right below the temporal lobe. Do not confuse the fats and bone with the temporal lobe. Click on the very center of the most anterior point of the temporal lobe. Be sure to pick in the slice right before it is no longer visible (Fig 10, Fig 11). Look at all views, and scroll through to be sure you are at the most anterior point. Again be cautious of fatty tissue and deposits. Scroll through and enlarge the image to be sure that you have picked the most anterior point (Fig 10, Fig 11). NOTE: be cautious of what you think is the most anterior point. You must account for the possibility of the head being tilted forward or backwards.
F.Mammillary Bodies  (10)
Go to the mid sagittal slice by scrolling through the sagittal view. Use the left and right arrows to go through slice by slice. Tag the mammillary body at the point where the body looks very round and clear. Another reference is to be able to see the brainstem, especially the pons, very clearly (Fig 12). NOTE: clear, meaning the structures look well defined, and have a very clear and rigid edge or boundary.
5. After selecting the tag points, go into the third window, and bring the blend bar all the way to the left. Now scroll through the brain and see: if the temporal lobes come in together, the ventricles come in and leave together, and if the parietal lobes come in together. If there is an asymmetry, check the other lobes and ventricles, and decide if the asymmetry is due to bad tag points, or actual asymmetries in the brain.  Also check to see if the midsagittal line is straight up and down.
6. Enter the name of the tag file in the top white box, and then press "save tags."
case#_reslice.tag
7. Enter the name of the transform file in the second white box, and then press the blank yellow box (to save)
case#_reslice.xfm
8. The reorientation transform file is now used to create a reoriented file.
mincresample -short case#_raw.mnc case#_reslice_raw.mnc -like /icbm/MNI_DATA/templates/icbm_template_1.00mm.mnc -transformation case#_reslice.xfm

Segmentation

Summary of tissue segmentation:
Tag points
1 -------> 40
41 ------> 80
81 -------> 100
101 -------> 120
Label (tissue classification)
1
2
3
4
Intensity (EXAMPLE VALUES)
60 <-------> 120
34 <--------> 58
12 <--------> 30
0 <--------> 4
Tissue Type
White matter
Gray matter
CSF 
Background
TS image color
Black
Green
Red
White
1. 120 points need to be tagged in the reslice_mr scan. When selecting the tag points, all three views need to be examined to make sure the tag is fully volumed. Although all views are used to view the tag point, it is only selected in the coronal view.  Move the cross hair by clicking with the left mouse button.  Select the point by clicking the right mouse button in the coronal view.  Try to take samples from posterior to anterior, and equally in both hemispheres.
2. Open the resliced gray-scale image in register.
register case#_reslice_mr.mnc
3.  The file opens in spectral color, change it to gray scale by selecting the "Gray" button.  Then adjust the contrast on the horizontal bar directly above that button to view it comfortably.  Fig 1
4.  Select the 120 tag points. Do not take any of the tag points in the cerebellum.

 

A. WHITE MATTER:

Required Samples:
General Guidelines:
Many samples in the middle 8/10ths of the brain will be taken in regions of the centrum semiovale extending from the parietal to the frontal lobes (points lateral to the cingulate cortex) Fig 13.  Many other samples should be taken superior to the lateral fissure--and parietal operculum--across the extent of the parietal and into the frontal lobe Fig 14, Fig 15.  Others more anterior to the lateral ventricles can be taken in the center of the frontal white matter Fig 16 and more laterally in each hemisphere closer to the cortical ribbon Fig 17.  It is important to check all three views for every sample taken to ensure that the tag point is entirely volumed white matter.  Some inadequate samples: Fig 18, Fig 19
After the 40th sample, type the number 1 in the far right window for later editing purposes.

B. GRAY MATTER:

Required Samples:

Thalamus:

Caudate:

Putamen:

Continue taking the cortical gray matter samples.  After the 40th sample (tag number 80) type the number 2 in the far right window for later editing purposes.

C. CEREBROSPINAL FLUID SAMPLES:

After the 20th sample (tag number 100) type the number 3 in the far right window for later editing purposes.

D. BACKGROUND SAMPLES:

After the 20th sample (tag number 120), type the number 4 in the far right window.
4. Save the tag file by typing the filename in the white box between the "load tags" and "save tags" buttons.  When the name is typed, press enter then select the "save tags" button.  After saving the tags, quit register.
case#_reslice_seg.tag
5. The tag file now needs to be edited to fill in the 1s, 2s, 3s,and 4s that were not filled in.  Open the tag file in nedit, highlight all of the numbers until you see a "1" on the far right side.  Every row above the row containing the "1" should be highlighted.  Go to the search menu and select replace.  In the search for box type "", and in the replace with box type "1".  Select replace in selection, and there should now be ones on the far right of the first 40 lines.  Repeat this procedure for 2, 3, and 4.  Save the tag file.
nedit case#_reslice_seg.tag
6. The segmentation tags can be used to create the segmented image.
classify -verbose -min -tag case#_reslice_seg.tag case#_reslice_mr.mnc case#_reslice_seg.mnc
7. Create 2mm resliced files for the reslice_mr file and for the reslice_seg file to be used in brain masking.
mincresample -short case#_reslice_seg.mnc case#_reslice_seg_2mm.mnc -like /data/icbm/MNI_DATA/templates/icbm_template_2.00mm.mnc
mincresample -short case#_reslice_mr.mnc case#_reslice_mr_2mm.mnc -like /data/icbm/MNI_DATA/templates/icbm_template_2.00mm.mnc
8. Gzip the mnc files.
gzip *.mnc

Brain Masking

 

1. The reslice_mr, 2mm reslice_seg, and 2mm reslice_mr files are displayed to create the brain mask.  The mask will be drawn on the 2mm reslice_seg image.
Display case#_reslice_mr.mnc case#_reslice_seg_2mm.mnc case#_resliced_mr_2mm.mnc
2. Once display opens, there should be an image of a brain that is orangeish.  Type the following commands to set the paint label and masking threshold:
3. The 2mm reslice_mr image will be altered to view it best.  Type:
4. The 2mm reslice_seg image will be similarly altered.  Type:
5. The reslice_mr will now be adjusted.  Type:
6. The brain mask can now be created.  Return to the segmented image view.  Type:
All of the work will be done on the segmented image in the coronal plane.  Pull the axis down so that the coronal view is at a comfortable size Fig 44. To adjust the image size, drag the mouse up and down on the image while holding shift + middle mouse button.  (Be sure caps lock is off.)  Holding shift + left mouse button will move the image in the window.  To navigate between sections/slices, use the "+" and "-" keys.
Use the right mouse button to paint the label.  Hold down shift + right mouse button to erase a label.  The brush size should be only one pixel for masking.  To change it, select "F" Segmenting menu, then "F" XY Radius. Type "1" for the new xy radius.
The whole idea of the brain mask is to fill in all that is brain, and exclude all that is not.  Often times that which is brain is touching that which is not.  To fill in only the brain, paint (using the right mouse button) the portion of the brain touching non-brain.  As soon as these "leaks" are filled in, move the curser on to the brain and press "E" Label Fill to fill in the brain.  The regions already painted and the CSF border will serve as a limit to how far the filling will go.  The threshold is set to include only gray and white matter, so the label fill will stop at the CSF border.  NOTE: It is only necessary to patch the leaks where the brain is touching non brain that segments as white or gray matter.  Fig 45: empty slice, Fig 46: holes filled in, Fig 47: slice masked
It is also difficult to distinguish brain from non-brain using only the segmented image.  This is the reason the mr images are displayed.  From the Slice View "S" menu, type "R" to toggle between images.  It is often easier to distinguish the brain/non-brain border in the mr, and then paint the correct brain pixels in the segmented image.
NOTE: Be careful when you paint the brain regions touching non-brain. If you miss even one pixel, the entire slide gets painted when you Label Fill.  Press 7 to Undo, and then fill in the missed pixels.
The masking process begins in the most anterior section in which brain tissue can be distinguished and continues for each slice of the segmented image.  Different regions of the brain have different areas that need to be avoided.  In the most anterior portion of the brain, avoid the dura mater between the two hemispheres Fig 48.  Then watch out for the meninges and superior sagittal sinus in between the two hemispheres Fig 49.  These will continue throughout the entire brain.  Everything in between the temporal lobes, from the pons forward, is non-brain Fig 50.  Sometimes the border between the temporal lobes and non-brain is very hard to distinguish.  If you aren't sure what's what, just leave it in, and ask later.  One of the more difficult things to distinguish in the segmented view is the optic nerve crossing.  The optic nerves emerge into the gap between the temporal lobes and the insula and then pass along side the temporal lobes Fig 54, Fig 55.  Use the mr in particular, to make sure these aren't included in the brain mask.  The next non-brain tissue to avoid is the transverse and sigmoid sinus separating the cerebrum from the cerebellum Fig 51.  In the most posterior regions, watch out for the dura mater in between the two hemispheres Fig 52.
When the brain stem appears, only label the part that is as inferior as the most inferior portion, bottom, of the cerebellum.  To do this, adjust the screen so the axial view can be seen.  Scroll through the slices until the most inferior portion of the cerebellum is visible.  Label the cerebellum and brain stem in this axial slice, creating an inferior border.  Return to the coronal view to finish masking the brain Fig 53.
When the brain is labeled, save the brain mask. To do this, type:
case#_reslice_mask_2mm.mnc

Please see Creating Cortical Objects protocol to use the output of the above described processes to obtain a surface extraction.

Back to Protocols.

 

If you have any questions, please e-mail:

esowell@loni.ucla.edu


Updated by Amy and Suzanne (5/02)