Yaroslav,
You do indeed need to collapse the 23406 x 7 arrays into a single array. I don't remember why it is split into 7 vectors, something to do with being able to read into AFNI I think. Doug will know and will probably answer. But in any case you can collapse 23406 x 7 data into a single array.
Nick
On Tue, 2008-04-29 at 18:12 -0400, Yaroslav Halchenko wrote:
Dear Freesurfers,
First thanks everyone who helped me out with reading-in .mgh data from within Python (especial thanks to Krish).
Now I wonder what actually I got ;-) and please pardon my ignorance
When I read in thickness file in I get an array of (23406, 7, 58) dimensionality, where 58 makes sense to me since we have 58 subjects.
P.S. I've got the same dimensions whenever I didn't use Krish's python binding but converted to minc and loaded using NetCDF module (in python though again, but python's numpy.ndarray dimensionality is not limited by short)
What I wonder about is that why 23406 and 7? ok - the product is equal to the surface number of vertices:23406*7=163842, so it seems that I can simply collapse those two dimensions (which one goes first?)
but why is that done so?
according to http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/MghFormat and mri.h in particular I don't see any limit on width/hight to be of short (not int) type and int (4 bytes) should be good enough to store full index. Is that due to some historical perspective? or am I just completely missing smth?
Thanks in advance for the hints!