After the hemispheres have been masked, medial objects may be created. A copy of all the scripts that are used can be found either on the web here , or you can go to /loni/edevel/ALL_SCRIPTS/ As always, be sure to open and edit each script so that all file and directory names that it points to are correct. As the scripts are being run, be sure to keep an eye on it for the first couple subjects to be sure that the script is running correctly.
1. Run 1_convert_hem_masks.csh Before running this script, make sure that you enter the subject numbers for the study you are working on. This script changes the hemisphere mask mncs into imgs, then transforms them from reslice to 305 space. After this is done, the 305 space hemisphere mask imgs are then converted back to mncs and all the temporary files are cleaned from the directory.
2. Run 2_skull_strip_hem_nocereb.csh Again, make sure the subject numbers are entered (the easiest way to ensure consistency in this is to copy and paste from the first script). This script takes the volumes and removes the tissue that has been identified as "skull". After this is done for both hemispheres the whole volume is then flipped.
3. Run 3_make_xfm_for_object_script.csh XFM files are created so that the cortical object may be made. Enter the subject numbers and run the script. At the script's end you will be reminded to edit and invert the xfms.
To edit the xfms: Go into each subject's directory and type: nedit *xfm This should bring up two xfms. Edit the xfms by adding a semicolon at the end of the array and removing the bracket at the beginning of the array. The next script needs these xfms to be in this format in order to be read correctly. Remember to save the xfms after you are done.
To invert the xfms: Go to the parent directory of all the subject directories. In that directory, type in the following that is in blue(this may vary slightly depending on how exactly the data is organized in your study):
command line: foreach
x (put subject numbers here)
? cd $x
? xfminvert inverted_L_{$x}_to_323_air.xfm
L_{$x}_to_323_air.xfm
? xfminvert inverted_R_{$x}_to_323_air.xfm
R_{$x}_to_323_air.xfm
? cd ../
? end
4. After the xfms have been edited and inverted, we are ready to make objects! To do this, you must first open and edit 4_create_cortical_objects_hem.csh For this script, we are only going to run 10 subjects at a time (any more would bog down the processor). Enter the subject numbers for 10 or less subjects along with the corresponding thresholds for each subject. These threshold can be found by going to that subject's directory, and finding it embedded in one of the file names. When this is done, you can run the script, 10 subjects at a time.
5. Run 5_reflect_right_lines.csh
Because
the right hemisphere has been flipped, the lines for that hemisphere must
be flipped as well. This script does that for us.