Only four essential properties must be specified prior to creating a new dimension. Other properties will be set to default values which can be changed individually after the dimension is created.
micreate_dimension(const char *name, midimclass_t class, midimattr_t attr,unsigned long length, midimhandle_t *new_dim_ptr);Accessing or modifying any of the dimension properties is done by using
miget_dimension_units(midimhandle_t dimension, char **units_ptr); miset_dimension_units(midimhandle_t dimension, const char *units);
you can retrieve the dimensions associated with an open MINC file using
miget_volume_dimensions(mihandle_t hvol, midimclass_t class, midimattr_t attr, miorder_t order, int max_dims, midimhandle_t dims);
where miorder_t is an enumerated type flag which determines whether the dimension order is determined by the file (i.e., the order the dimensions were created) or by the apparent order (i.e., any order other than the file order) which must be set by the user.
Finally, to release the memory associated with a dimension,
the dimension handle must be passed to mifree_dimension_handle().
Note that calling mifree_dimension_handle() on a dimension that is associated with a volume will result in an error.