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 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.