next up previous contents
Next: miget_dimension_width/miset_dimension_width Up: DIMENSION FUNCTIONS (39) Previous: miget_dimension_starts/miset_dimension_starts   Contents

miget_dimension_units/miset_dimension_units

NAME

miget_dimension_units, miset_dimension_units - get or set the unit string
for a MINC dimension

SYNOPSIS

#include <minc2.h>

int miget_dimension_units ( midimhandle_t dimension, char **units_ptr );
int miset_dimension_units ( midimhandle_t dimension, const char *units );

DESCRIPTION

miget_dimension_units retrieves the units of the given dimension,
allocating the space needed for the string.  The memory allocated by
this function should be released with a call to mifree_name().

miset_dimension_name will set the units for an existing dimension.
The new string must be no greater than 128 characters in length,
including the trailing zero byte.

Typical values for units include "mm" or "cm" for spatial dimensions
and "seconds" or "msec" for time dimensions.

RETURN VALUE

miget_dimension_units returns the length of the string retrieved,
including the terminating zero byte.  miset_dimension_units will
return MI_NOERROR on success.  Both functions return MI_ERROR if an
error occurs.

SEE ALSO

mifree_name



Robert VINCENT 2005-03-09