Creating 3D Objects
Medial and lateral views of a left hemisphere object file, shown and colored in Display.
Creating 3D object files from your hemisphere minc masks should be done after the brains have been registered to ICBM 305 space. After this has been done, run the make_objects.csh script OR perform the steps indicated below. You will need to use the MNI tools, including Display, to run the steps in this protocol.
Using the Script
This script will do the same things as the commands listed below, but the point is to make things faster and easier for you. This script assumes that your data is in /cxfs/schizo/family_study, but you could copy and modify the script to suit the directory structure in which your data is contained.
- Make sure you have your two hemisphere masks in 305 space.
- Log on to inire
- cd /cxfs/schizo/family_study
- Run the make_object.csh script. All you have to specify is the directory name for your particular subject.
- scripts/make_object.csh 10101_
- Note that you can run more than one subject ID at once--just put the arguments on the command line, separated by spaces.
- scripts/make_object.csh 10101_ 10102_ 10104_
Choosing the Threshold
- After running the script, you will have a lot of object files at different thresholds. You will also have log files, (which you don't really need to look at unless something went wrong). In our dataset, we included thresholds from 300 to 600, however, you will have to tailor this to fit your data.
- To determine which thresholds would best suit your data, you can load the .mnc file in Display, and click "Slice View" (S), then "Recompute Histogram" (G). This will produce a histogram plot beside your threshold color bar (on the left). Choose thresholds between the beginning of the slope of the first peak and the peak itself.
- The make_object.csh script makes objects at thresholds from 300 to 600. To determine which threshold fits your data best, load your objects using Display along with the .mnc file.
Display 10101_n3_305_6p.mnc 10101_n3_305_6p_440_L.obj
- Set appropriate thresholds on the .mnc and then color your .obj by clicking on the object in the object window, then clicking the "Color coding" button (D on the keyboard) and then "Color code object" (A).
- Look at all of the views to determine whether you can see the lines that need to be drawn. Look especially at the medial side to see whether the cingulate, superior rostral, and parietoocciptal gyri are visible.
Lateral and Medial Views
Anterior and Posterior Views
- Check to see that the object is not over-thresholded (thereby cutting out more brain than necessary) by scanning the object to the volume. Click "Objects" and then "Scan Object to Vol". You will see an outline around the .mnc file where the object overlaps. Try to make sure that the area covered by your object matches up with the mnc.
Over-Thresholded Object
Over-Thresholded Object Scanned to Volume
Note how the thresholding has eaten into the brain tissue, leaving parts of the brain outside of the object.
Under-Thresholded Object
- For reference, common thresholds for the family study brains were 440 and 480.
Running without the script
- Make a transform (.xfm) file that is used on the fly for the surface extraction. The xfm file helps make sure the brain is centered in the space required for the algorithm, and results in better surface extraction. To make this transform file, edit and run mritotal.tcsh in /cxfs/schizo/family_study/scripts. You could also run mritotal on inire as follows:
- mincmask 25036_n3_305_6p.mnc 25036_mask_6p.mnc 25036_n3_305_6p_ns.mnc
- mritotal 25036_n3_305_6p_ns.mnc 25036_305_6p_total.xfm
- Use the hemisphere masks to cut out the right or left hemisphere from the whole brain volume, since the extractions are done on each hemisphere separately. Do this using mincmask.
- mincmask 25036_n3_305_6p.mnc 25036_mask_6p_lh.mnc 25036_6p_lh.mnc
- mincmask 25036_n3_305_6p.mnc 25036_mask_6p_rh.mnc 25036_6p_rh.mnc
- The outputs from mincmask are used as inputs for the surface extraction command line. However, first you must flip the right hemisphere so that it is in LEFT hemisphere space. The surface extraction only works in left hemisphere space.
- flip_volume 25036_6p_rh.mnc 25036_6p_flipped_rh.mnc
- Now you have all the pieces for the extraction. In the next part, you need to get the thresholds. Basically, higher thresholds will result in deeper sulcal lines, but smaller brain volume overall. This can be tricky... usually the range is from 350 to 640. The command line for one threshold would be as follows:
- /nethome/users/drex/scripts/medial_cortical_surface.pl 25036_6p_lh.mnc 25036_6p_lh_500.obj 500 25036_305_6p_total.xfm > log_{threshold}_lh.txt &
- Perform the same step as above for the right hemisphere, but be sure to use the flipped right hemisphere volume.
- You will now have objects for each threshold you chose. Determine which threshold to use for analysis by following the steps above.