open-discussion > freesurfer_annot_to_gifti files DataType
Showing 1-3 of 3 posts
Display:
Results per page:
Nov 7, 2016  10:11 PM | John Muschelli
freesurfer_annot_to_gifti files DataType
From the GIFTI DTD I have:

DataType (NIFTI_TYPE_UINT8 |
NIFTI_TYPE_INT32 |
NIFTI_TYPE_FLOAT32) #REQUIRED

But in the lh.aparc.a2009s.gii file from freesurfer_annot_to_gifti.tgz, the format is NIFTI_TYPE_UINT32.  Is the DTD not complete with data types or is this a misspecification?
Nov 7, 2016  11:11 PM | Nick Schmansky
RE: freesurfer_annot_to_gifti files DataType
Hi, in the case of the annotation file lh.aparc.a2009s.gii, the data is RGBA values, which are unsigned, so technically i suppose UINT32 is the accurate data type.  however, it appears the fact that UINT32 is not one of the required gifiti datatypes means that it probably should be defined as INT32.  i'm not sure what to do at this point, as an argument could be made either which should change:  either UINT32 is added as a valid datatype (thus making the freesurfer_annot valid), or freesurfer should change the datatype for annot labels to INT32.   maybe you have thoughts on this.  in any case, it gets interpreted as an RGBA value, so it doesnt really matter.

Nick
Nov 8, 2016  02:11 PM | Richard Reynolds
RE: freesurfer_annot_to_gifti files DataType
Byte-wise RGBA datasets might be stored as UINT8,
with INTENT_CODE NIFTI_INTENT_RGBA_VECTOR.

Each element would essentially be a 4-byte vector,
which would sit in memory the exact same way as with
the UINT32 datum.

Does that seem reasonable?

- rick