=====Standard Template Generation===== * Templates are generated from a selection of 15-30 nc82 stained images that are well stained and sit flat on the slide. Each image was taken from the same sex to generate sex specific templates. * One brain is chosen as the initial seed. This brain was selected because it was felt it was best stained and sat most symmetrically. * All the brains, including the seed, were registered to the seed. * The resulting registrations were checked to see if any images had failed to register properly (i.e excessive warping in any regions or total failure to register). * The **avg_adm** tool from the CMTK package was then applied to the registration files. This tool is intended to use the registrations generated to minimize the amount of warping needed to go from any individual brain to a template. This template is then generated as a shape average of the input images. For the templates, these parameters were called in **avg_adm**: --cubic uses tri cubic interpolation for constructing the image --ushort produces unsigned 16bits output --auto-scale scales images intensities to match the histogram of the original template image --no-ref-data excludes the ref image from the output image (this would be bad when iterating) --pad-out indicates the value that should be used to pad all voxels absent from all images (default is the highest available level) --output-warp indicates where to save the warping registration generated -o indicates where to save the avg grayscale image generated * This process was iterated 4 more times for a total of five rounds of registration and averaging. The output file of the **avg_adm** tool was used as the new template to which each image was registered. * This process was repeated for both sexes. Once a template specific to each sex had been generated, the female template was chosen as the new seed, and the male and female standard brains were registered to the it. The **avg_adm** command was again called and its output was the new Intersex template. * As the intersex template was not horizontally symmetric an affine registration was run to take the flipped version of the template image and align it with its unflipped version.