NAME
micreate_dimension - define a new dimension in a MINC volume
SYNOPSIS
#include <minc2.h>
int micreate_dimension ( const char *name,
midimclass_t class, midimattr_t attr,
unsigned long size, midimhandle_t *new_dim_ptr);
DESCRIPTION
This function defines a dimension that can be used in the definition
of a new MINC volume (see the create_volume function). The name may
be an arbitrary string of up to 128 alphanumeric characters. Any of
the "standard" names retained from MINC 1.0 retain their default
behaviors: MIxspace, MIyspace, and MIzspace default to spatial
dimensions, and MItime default to be a time dimension. MItfrequency
is a temporal frequency axis, and MIxfrequency, MIyfrequency, and
MIzfrequency are spatial frequency axes. Any other name may be used.
When initially defined, a regularly-sampled dimension will have a
"start" value of zero, and a "separation" or "step" value of 1.0. An
irregular dimension will be initialized with all offsets equal to
zero.
The type midimclass_t is defined as follows:
typedef enum {
MI_DIMCLASS_ANY = 0, /* Don't care (or unknown) */
MI_DIMCLASS_SPATIAL = 1, /* Space */
MI_DIMCLASS_TIME = 2, /* Time */
MI_DIMCLASS_SFREQUENCY = 3, /* Spatial frequency */
MI_DIMCLASS_TFREQUENCY = 4, /* Temporal frequency */
MI_DIMCLASS_USER = 5, /* Arbitrary user-defined axis */
MI_DIMCLASS_FLAT_RECORD = 6 /* Record as dimension */
} midimclass_t;
The type midimattr_t is a bit field of dimension attributes, defined as
follows:
typedef unsigned int midimattr_t;
#define MI_DIMATTR_ALL 0
#define MI_DIMATTR_REGULARLY_SAMPLED 0x1
#define MI_DIMATTR_NOT_REGULARLY_SAMPLED 0x2
The "size" argument may range from 0 to 2^32, which should provide
enough range to represent detail on the order of 10 Angstroms in
typical medical imaging applications.
If successful, the function will return a handle to the newly-defined
dimension in the location specified by "new_dim_ptr".
RETURN VALUE
micreate_dimension returns MI_NOERROR on success, MI_ERROR on failure.