Hi Russell,
You seem to be describing a surface dataset, along with its normals
and curvature values.
If you are not comfortable with what is generated by FreeSurfer or
Caret and want to write you own, that might be a noble effort. But
you will almost certainly not want your data in ascii format. Anatomical
datasets typically have millions of voxels, and maybe a million just of
gray matter.
If you do this, consider working with binary data, perhaps starting
from the NIfTI format. But if you have not done so before, consider
evaluating what is already being done.
- rick