[MINC-development] MINC2 api - hidden treasures
Vladimir S. FONOV
vladimir.fonov at gmail.com
Wed Nov 28 14:42:21 EST 2012
Hello Everybody,
I've been trying to make MINC2 API, NETCDF independent recently. And I
have to say that it's been very frustrating experience so far.
Occasionally I come across pieces of code like this:
https://github.com/BIC-MNI/libminc/blob/master/libsrc2/volume.c#L98
(written in 2004):
if (volume->has_slice_scaling) {
/* TODO: Find the slowest-varying spatial dimension; that forms
* the basis for the image-min and image-max variables. Right
* now this is an oversimplification!
*/
ndims = volume->number_of_dims - 2;
dataspace_id = H5Screate_simple(ndims, hdf_size, NULL);
} else {
ndims = 0;
dataspace_id = H5Screate(H5S_SCALAR);
}
Which means that MINC2 files created with MINC2 API are always assumed
to have more then 2 dimensions if slice normalization is enabled. And
only provide 2D slice normalization.
--
Best regards,
Vladimir S. FONOV ~ vladimir.fonov <at> gmail.com
More information about the MINC-development
mailing list