devel > access to data array
Showing 1-3 of 3 posts
Feb 21, 2008 11:02 PM | Nick Schmansky
access to data array
this a basic question. in my code to read-in a .gii file, i do
this:
gifti_image* image = gifti_read_image (fname, 0);
giiDataArray* coords = gifti_find_DA
(image, NIFTI_INTENT_POINTSET, 0);
giiDataArray* faces = gifti_find_DA
(image, NIFTI_INTENT_TRIANGLE, 0);
but when i look at the coords and faces arrays in debugger, the 'data' field is null. this happens when reading in the caret data, or the vistrails data.
i am probably just not doing something simple. is reading the data array an extra step? i can't seem to figure this out from the example files.
N.
gifti_image* image = gifti_read_image (fname, 0);
giiDataArray* coords = gifti_find_DA
(image, NIFTI_INTENT_POINTSET, 0);
giiDataArray* faces = gifti_find_DA
(image, NIFTI_INTENT_TRIANGLE, 0);
but when i look at the coords and faces arrays in debugger, the 'data' field is null. this happens when reading in the caret data, or the vistrails data.
i am probably just not doing something simple. is reading the data array an extra step? i can't seem to figure this out from the example files.
N.
Feb 22, 2008 12:02 AM | Richard Reynolds
RE: access to data array
Hi Nick,
Yeah, in the call:
gifti_read_image (fname, 0);
that second parameter is a flag for whether to read the data. So pass 1, instead.
- rick
Yeah, in the call:
gifti_read_image (fname, 0);
that second parameter is a flag for whether to read the data. So pass 1, instead.
- rick
Feb 22, 2008 02:02 AM | Nick Schmansky
RE: access to data array
thanks. the answer was right there in front of me. kind of like
looking for keys and not checking your pocket first.
