next up previous contents
Next: miget_data_type_size Up: DATA TYPE/SPACE FUNCTIONS (5) Previous: miget_data_class   Contents

miget_data_type

NAME

miget_data_type - get the volume's data type

SYNOPSIS

#include <minc2.h>


int  miget_data_type( mihandle_t       volume,
                      mitype_t         *volume_data_type)

DESCRIPTION

miget_data_type gets the date-type of the volume, which in this case refers
to the actual format in which the data is stored on disk. Note that volume
of type string is not supported.

The mitype_t type is defined as follows:

typedef enum {
        MI_TYPE_BYTE = 1,       /* 8-bit signed integer */
        MI_TYPE_SHORT = 3,      /* 16-bit signed integer */
        MI_TYPE_INT = 4,        /* 32-bit signed integer */
        MI_TYPE_FLOAT = 5,      /* 32-bit floating point */
        MI_TYPE_DOUBLE = 6,     /* 64-bit floating point */
        MI_TYPE_STRING = 7,     /* ASCII string */
        MI_TYPE_UBYTE = 100,    /* 8-bit unsigned integer */
        MI_TYPE_USHORT = 101,   /* 16-bit unsigned integer */
        MI_TYPE_UINT = 102,     /* 32-bit unsigned integer */
        MI_TYPE_SCOMPLEX = 1000,   /* 16-bit signed integer complex */
        MI_TYPE_ICOMPLEX = 1001,   /* 32-bit signed integer complex */
        MI_TYPE_FCOMPLEX = 1002,   /* 32-bit floating point complex */
        MI_TYPE_DCOMPLEX = 1003,   /* 64-bit floating point complex */
        MI_TYPE_UNKNOWN  = -1     /* when the type is a  non_uniform record */

} mitype_t;

typedef struct {
        short real;
        short imag;
} miscomplex_t;

typedef struct {
        int real;
        int imag;
} miicomplex_t;

typedef struct {
        float real;
        float imag;
} mifcomplex_t;

typedef struct {
        double real;
        double imag;
} midcomplex_t;


RETURN VALUE

miget_data_type returns the data-type of the volume or MI_ERROR if an
error occurs.



Robert VINCENT 2005-03-09