changeset 1577:f913beaa6a67

Initial revision
author bert <bert>
date Wed, 12 Nov 2003 18:23:05 +0000
parents e6b10da68821
children 509a8d3763c6
files libsrc2/doc/minc_20.tex
diffstat 1 files changed, 3338 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/libsrc2/doc/minc_20.tex
@@ -0,0 +1,3338 @@
+%
+% Copyright 2003  Bert Vincent, McConnell Brain Imaging Centre, 
+% Montreal Neurological Institute, McGill University.
+% John G Sled and Leila Baghdadi Mouse Imaging Centre, Toronto
+% Permission to use, copy, modify, and distribute this
+% software and its documentation for any purpose and without
+% fee is hereby granted, provided that the above copyright
+% notice appear in all copies.
+%
+\documentclass{article}
+\title{MINC 2.0 Application Programming Interface (API)}
+\author{Bert Vincent and Leila Baghdadi and John G Sled}
+\date{OCT 31, 2003}
+\textwidth 6.0in
+\oddsidemargin 0.125in
+\textheight 8.5in
+\topmargin -0.75in
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\clearpage
+
+\section{Changes and Updates}
+
+First draft of the API definition for libminc\\*
+
+THRS APR 24/2003\\*
+
+THRS MAY 01/2003\\*
+
+THRS MAY 02/2003\\*
+
+WED  MAY 07/2003 Bert\\*
+
+TUS  MAY 20/2003 Leila and John\\*
+
+THU  MAY 29/2003 Bert\\*
+* Corrected a bunch of minor syntax errors/issues.\\*
+* Added complex type as a peer to integer, real, record, etc.\\*
+* Proposed changing the term "midge" to a more standard "class".\\*
+* Added functions for getting/setting labels in la belled volumes.\\*
+
+MON  JUN 02/2003 Leila and John\\*
+* Added Attribute Functions.\\*
+* Sorted methods in Alphabetical order.\\*
+
+WED  JUN 04/2003 Leila and John\\*
+* Bert's suggested changes.\\*
+
+THU  JUN 05/2003 Bert\\*
+* Added ICV stuff.\\*
+
+MON  JUN 09/2003 Bert\\*
+* Elaborated on complex datatypes.\\*
+* Added volume property list functions.\\*
+* Added miopen\_volume.\\*
+* Added "units" functions.\\*
+
+WED  JUN 11/2003 Leila and John\\* 
+* Added the group functions to attribute functions.\\*
+* Added the name argument to all attribute functions.\\* 
+* Created a new flag mivoxel\_order\_t.\\* 
+* Cleaned the description of micreate\_volume function.\\*
+* Moved miget\_volume\_dimensions from the volume group into the dimension functions group.\\*
+* Added a new flag miorder\_t.\\*
+* Added hyper-cube functions.\\*
+
+THU  JUN 12/2003 Bert\\*
+* Minor edits.\\*
+* Added miclose\_volume().\\*
+
+THU  JUN 13/2003 Leila and John\\*
+* Merged the double and string type attribute functions.\\*
+* Added valid min/max and range functions.\\*
+* Added the hyper\_cube with icv functions.\\*
+
+MON  JUL 21/2003 Leila and John and Bert\\*
+* Added uniform and non-uniform records.\\*
+* Added template volumes.\\*
+* Added additional voxel/world conversion functions.\\*
+
+TUE  JUL 22/2003 Bert\\*
+* Minor edits.\\*
+* Added miget\_data\_type\_size.\\*
+
+THU  JUL 24/2003 Leila and John\\*
+* Added Two new record functions.\\*
+* Replaced opague record with non-uniform.\\*
+
+FRI  JUL 25/2003 Leila and John and Bert\\*
+* Added volume scale functions\\*
+* changed miget\_data\_size to miget\_data\_type\_size\\*
+
+FRI  OCT 31/2003 Bert\\*
+* Added missing documentation for some functions\\*
+* Added mode argument to miopen\_volume\\*
+* Changed hyper_cube to hyperslab for all relevant functions\\*
+
+\section{Introduction}
+
+
+
+\section{An Introduction to HDF5}
+
+(For a complete description, see the ``HDF5 User's Guide'').
+
+\subsection{The HDF5 file}
+
+To be completed later. 
+
+\section{ATTRIBUTE/GROUP FUNCTIONS (7)}
+\subsection{micreate\_group}
+
+\begin{verbatim}
+NAME 
+
+micreate_group - create a new group
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int micreate_group ( mihandle_t      volume,
+                     const char      *path,
+                     const char      *name)
+                    
+                       
+                                
+DESCRIPTION
+
+This method creates a new empty group with the specified path and name.
+
+RETURN VALUE
+
+micreate_group returns MI_NOERROR if it successfully creates a group or 
+MI_ERROR otherwise
+
+\end{verbatim}
+
+\subsection{midelete\_attr}
+
+\begin{verbatim}
+NAME 
+
+midelete_attr - delete the attribute given its name
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int midelete_attr ( mihandle_t          volume,
+                    const char          *path,
+                    const char          *name)
+                       
+                                
+DESCRIPTION
+
+This methods deletes the attribute with the specified name. It also clears 
+memory and releases handles.
+
+
+RETURN VALUE
+
+midelete_attr returns MI_NOERROR if it successfully deletes the attribute
+or MI_ERROR otherwise
+
+\end{verbatim}
+
+\subsection{midelete\_group}
+
+\begin{verbatim}
+NAME 
+
+midelete_group - delete an existing group
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int midelete_group ( mihandle_t      volume,
+                     const char      *path,
+                     const char      *name)    
+                       
+                                
+DESCRIPTION
+
+This method deletes the group with the given group name.
+
+RETURN VALUE
+
+midelete_group returns MI_NOERROR if it successfully deletes a group 
+or MI_ERROR otherwise
+
+\end{verbatim}
+
+\subsection{miget\_attr\_length}
+
+\begin{verbatim}
+
+NAME 
+
+miget_attr_length - get the length of an attribute
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_attr_length ( mihandle_t              volume,
+                        const char              *path,
+                        const char              *name,
+                        int                     *length ) 
+               
+                                
+DESCRIPTION
+
+This method gets the length of the given attribute name.
+
+RETURN VALUE
+miget_attr_length returns MI_NOERROR if it successfully gets the
+the dimension of a given attribute name or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_attr\_type}
+
+\begin{verbatim}
+NAME 
+
+miget_attr_type - get the data type of the attribute
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_attr_type ( mihandle_t                volume,
+                      const char                *path,
+                      const char                *name,
+                      mitype_t                  *attr_data_type) 
+               
+                                
+DESCRIPTION
+
+This method gets the data_type the given attribute name. For the
+definition of mitype_t see miget_data_type().
+
+
+RETURN VALUE
+miget_attr_type returns MI_NOERROR if it successfully gets the
+data type of a given attribute name or MI_ERROR otherwise
+
+In the initial implementation, attributes are restricted to type of
+either MI_TYPE_DOUBLE or MI_TYPE_CHAR.
+
+\end{verbatim}
+
+\subsection{miget\_attr\_values}
+
+\begin{verbatim}
+NAME 
+
+miget_attr_values - get the value(s) of an attribute
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_attr_values ( mihandle_t              volume, 
+                        mitype_t                attr_data_type,
+                        const char              *path,
+                        const char              *name,
+                        int                     length,
+                        void                    *values)
+
+                                                
+DESCRIPTION
+
+This method returns the values of a given attribute name 
+(of type double or string) in array "values".
+
+
+RETURN VALUE
+
+miget_attr_values returns MI_NOERROR if it successfully gets the
+attribute value(s) or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_attr\_values}
+
+\begin{verbatim}
+
+NAME 
+
+miset_attr_values - set the value(s) of the attribute
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_attr_values ( mihandle_t              volume,
+                        mitype_t                attr_data_type,
+                        const char              *path,
+                        const char              *name,
+                        int                     length,
+                        void                    *values)
+                       
+                                
+DESCRIPTION
+
+This method sets the value(s) of type double or string for the 
+specified attribute name.  If the attribute does not exist, 
+it will be created.
+
+RETURN VALUE
+
+miset_attr_values returns MI_NOERROR if it successfully sets the
+attribute value(s) or MI_ERROR otherwise
+\end{verbatim}
+
+\section{DATA TYPE/SPACE FUNCTIONS (5)}
+\subsection{miget\_data\_class}
+
+\begin{verbatim}
+NAME
+
+miget_data_class - get the class type of data
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_data_class ( mihandle_t       volume,
+                       miclass_t        *volume_class) 
+
+DESCRIPTION
+
+volume_class is the interpretation of the numerical values of the volume
+independent of the numerical type used to represent the data.  The
+class type is defined as follows.
+
+tyepdef enum {
+MI_CLASS_REAL            = 0,
+MI_CLASS_INT             = 1,
+MI_CLASS_LABEL           = 2,
+MI_CLASS_COMPLEX         = 3,
+MI_CLASS_UNIFORM_RECORD  = 4,
+MI_CLASS_NON_UNIFORM_RECORD   = 5
+} miclass_t;
+
+where MI_CLASS_LABEL is used for enumerated data in which a
+description is associated with each value and MI_CLASS_RECORD is used
+for aggregate datatypes consisting of multiple values.
+ 
+RETURN VALUE
+
+miget_data_class returns the data class of the volume or MI_ERROR if an 
+error occurs.
+\end{verbatim}
+
+\subsection{miget\_data\_type}
+\begin{verbatim}
+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_CHAR = 2,       /* ASCII text */
+        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,     /* 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.
+\end{verbatim}
+
+\subsection{miget\_data\_type\_size}
+\begin{verbatim}
+NAME
+
+miget_data_type_size - get the size of an individual voxel in a MINC volume
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_data_type_size( mihandle_t        volume, 
+                          misize_t          *voxel_size);
+
+DESCRIPTION
+
+This function retrieves the size, in bytes, of the "native" voxel data
+type of the volume.
+
+RETURN VALUE
+
+Returns MI_ERROR on error (invalid volume handle, for example), or
+MI_NOERROR on success.
+\end{verbatim}
+
+\subsection{miget\_space\_name/miset\_space\_name}
+\begin{verbatim}
+NAME 
+
+miget_space_name, miset_space_name - get or set the space type name for
+a MINC volume
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_space_name( mihandle_t volume, char **name );
+
+int miset_space_name( mihandle_t volume, const char *name );
+
+DESCRIPTION
+
+miget_space_name retrieves the "space" name of the given volume,
+returning a pointer to a string.  The memory allocated
+by this function should be released with a call to mifree_name().
+
+miset_space_name will set the space name of the volume.  The new name
+must be no greater than 128 characters in length, including the
+trailing zero byte.
+
+Space names are used to define the coordinate system of the volume.  Three
+standard values are defined by MINC:
+
+MI_NATIVE    "native____"
+MI_TALAIRACH "talairach_"
+MI_CALLOSAL  "callosal__"
+
+"Native" space specifies the coordinate system of a particular
+scanner.  Talairach and callosal are standard coordinate systems for
+brain images.
+
+If not explicitly set, the space will be type MI_NATIVE by default.
+
+RETURN VALUE
+
+miget_space_name returns the length of the name retrieved, including
+the terminating zero byte.  miset_space_name will return MI_NOERROR
+on success.  Both functions return MI_ERROR if an error occurs.
+
+SEE ALSO
+
+mifree_name
+\end{verbatim}
+
+\section{DIMENSION FUNCTIONS (37)}
+\subsection{miget\_volume\_from\_dimension}
+\begin{verbatim}
+NAME 
+
+miget_volume_from_dimension - to figure out whether a dimensions is
+associated with a volume or not
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_volume_from_dimension ( midimhandle_t         dimension,
+                                  mihandle_t            *volume)
+                                
+DESCRIPTION
+
+This method returns the volume handle associated with a given dimension.
+
+
+RETURN VALUE
+
+miget_volume_from_dimension returns MI_ERROR if the specified handle
+is not associated with the volume and MI_NOERROR otherwise.
+\end{verbatim}
+
+\subsection{micopy\_dimension}
+\begin{verbatim}
+NAME
+
+micopy_dimension - create copy of the given dimension
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int micopy_dimension ( midimhandle_t       dim_ptr,
+                       midimhandle_t       *new_dim_ptr)
+
+DESCRIPTION
+
+Creates a copy of the specified dimension and returns the handle to the copy
+
+RETURN VALUE
+
+micopy_dimension returns MI_NOERROR if it successfully copies all the 
+attributes of the provided dimension and MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{micreate\_dimension}
+\begin{verbatim}
+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.
+\end{verbatim}
+
+\subsection{mifree\_dimension\_handle}
+\begin{verbatim}
+NAME
+
+mifree_dimension_handle - delete the dimension definition associated 
+with the given handle
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int mifree_dimension_handle ( midimhandle_t       dim_ptr)
+
+DESCRIPTION
+
+Deletes the dimension definition (i.e., dimension handle and dimension itself)
+only if the dimension is NOT associated with a volume.
+
+RETURN VALUE
+
+mifree_dimension_handle returns MI_NOERROR if it successfully deletes 
+a dimension or MI_ERROR otherwise.
+\end{verbatim}
+
+\subsection{miget\_volume\_dimensions}
+\begin{verbatim}
+NAME  
+
+miget_volume_dimensions - retrieve the list of dimensions defined in a MINC 
+volume, according to their class and attribute.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_volume_dimensions ( mihandle_t        volume, 
+                              midimclass_t      class, 
+                              midimattr_t       attr, 
+                              miorder_t         order,
+                              int               array_length,
+                              midimhandle_t     dimensions[]);
+                              
+
+DESCRIPTION
+
+This function is used to retrieve an array of dimension handles for a
+MINC volume.  It will place the handles of the first "array_length"
+dimensions into the "dimensions[]" array, returning only those dimension
+whose characteristics match the "class" and "attr" parameters. 
+The miorder_t is an enumerated type flag which determines whether the
+dimension order is determined by the file or by the apparent order set by 
+the user.
+
+
+The following example will return up to 3 spatial dimensions:
+
+    int result;
+    midimhandle_t dimensions[3];
+    mihandle_t volume;
+
+    result = miget_vol_dimensions (volume, MI_DIMCLASS_SPATIAL, 
+                                   MI_DIMATTR_ALL, MI_ORDER_FILE, 
+                                   3, dimensions);
+
+
+RETURN VALUE
+
+miget_volume_dimensions returns the number of dimension handles copied 
+to the array, or MI_ERROR on failure.
+
+SEE ALSO
+
+miset_apparent_dimension_order, miset_apparent_dimension_order_by_name
+\end{verbatim}
+
+\subsection{miset\_apparent\_dimension\_order}
+\begin{verbatim}
+NAME 
+
+miset_apparent_dimension_order - set apparent dimension order
+
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_apparent_dimension_order ( mihandle_t         volume,
+                                     int                array_length,
+                                     midimhandle_t      dimensions[])
+                                     
+
+
+DESCRIPTION
+
+This method sets an apparent dimension order. The user can sort the
+dimensions in any desired order. If the user specifies fewer dimensions
+than the existing ones, then they are assumed to be added to the last.
+For example, given (z,y,x) for the file dimension order of (x,y,z,t) 
+will result in (t,z,y,x) and so on. 
+
+RETURN VALUE
+
+miset_apparent_dimension_order returns MI_NOERROR if it successfully
+sets the apparent dimension order or MI_ERROR otherwise
+
+SEE ALSO
+
+miset_apparent_dimension_order_by_name
+\end{verbatim}
+
+\subsection{miset\_apparent\_dimension\_order\_by\_name}
+\begin{verbatim}
+NAME 
+
+miset_apparent_dimension_order_by_name - set apparent dimension order
+by name
+
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_apparent_dimension_order_by_name ( mihandle_t         volume,
+                                             int                array_length,
+                                             char               **names)
+                                             
+
+
+DESCRIPTION
+
+This method sets an apparent dimension order by dimension name. Note that
+all dimension names must be different or an error occurs.
+
+
+RETURN VALUE
+
+miset_apparent_dimension_order_by_name returns MI_NOERROR if it successfully
+sets the apparent dimension order by name or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_apparent\_record\_dimension\_flag}
+\begin{verbatim}
+NAME 
+
+miset_apparent_record_dimension_flag - set the record flag
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_apparent_record_dimension_flag ( mihandle_t           volume,
+                                           int                  flatten_flag)
+                                             
+
+
+DESCRIPTION
+
+This method causes a volume to appear to have a record dimension. The record
+dimension will be set to uniform and flat (i.e., the volume will have one more
+dimension (n+1)).
+
+
+RETURN VALUE
+
+miset_apparent_record_dimension_flag sets a flat uniform_record dimension to
+a volume and returns MI_NOERROR or MI_ERROR otherwise. 
+\end{verbatim}
+
+\subsection{miget\_dimension\_apparent\_voxel\_order}
+\begin{verbatim}
+NAME 
+
+miget_dimension_apparent_voxel_order - gets the apparent order of voxels
+
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_apparent_voxel_order ( midimhandle_t        dimension,
+                                           miflipping_t         *file_order,
+                                           miflipping_t         *sign)
+                                     
+
+
+
+DESCRIPTION
+
+This method gets the apparent order of voxels for the specified dimension
+and the sign of the step values.
+
+RETURN VALUE
+
+miget_dimension_apparent_voxel_order returns MI_NOERROR if it successfully
+gets the apparent voxel order of the specified dimension or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_dimension\_apparent\_voxel\_order}
+\begin{verbatim}
+NAME 
+
+miset_dimension_apparent_voxel_order - sets the apparent order of voxels
+
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_dimension_apparent_voxel_order ( midimhandle_t        dimension,
+                                           miflipping_t         flipping_order)
+
+
+
+
+DESCRIPTION
+
+This method sets the apparent order of voxels for the specified dimension.
+The miflipping_t is an enumerated type as follows:
+
+tyepdef enum {
+        MI_FILE_ORDER           = 0,   /* no flip */
+        MI_COUNTER_FILE_ORDER   = 1,   /* flip    */
+        MI_POSITIVE             = 2,   /* check step if positive -> no flip
+                                                        negative -> flip    */
+        MI_NEGATIVE             = 3    /* check step if positive -> flip
+                                                        negative -> no flip */
+} miflipping_t;
+
+
+
+
+RETURN VALUE
+
+miset_dimension_apparent_voxel_order returns MI_NOERROR if it successfully
+sets the apparent voxel order of the specified dimension or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_dimension\_class/miset\_dimension\_class}
+\begin{verbatim}
+NAME
+
+miget_dimension_class, miset_dimension_class - get or set the class of
+a MINC dimension.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_class ( midimhandle_t       dimension,
+                            midimclass_t        *class );
+
+int miset_dimension_class ( midimhandle_t       dimension,
+                            midimclass_t        class);
+
+DESCRIPTION
+
+The "class" of a MINC dimension defines the general type of a dimension, 
+whether it is a spatial dimension, a time dimension, or a frequency dimension
+as transformed from either space or time.  User-defined dimension are also
+permitted, with no default handling assumed. Finally, a record can be specified
+as a dimension.
+
+The definition of midimclass_t is 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;
+
+
+While the MINC library does not enforce any particular semantics based
+upon dimension class, individual MINC programs may define default
+behaviors for certain classes of dimensions.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, or MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miget\_dimension\_cosines/miset\_dimension\_cosines}
+\begin{verbatim}
+NAME
+
+miget_dimension_cosines, miset_dimension_cosines - Get or set the dimension's
+cosine vector.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_cosines ( midimhandle_t dimension,
+                              double        cosines[3]);
+
+int  miset_dimension_cosines ( midimhandle_t dimension,
+                               const double  cosines[3]);
+
+DESCRIPTION
+
+Spatial dimension in MINC volumes may be associated with a vector of direction
+cosines which define the precise orientation of the axis relative to "true"
+x, y, or z coordinates.
+
+The direction cosine vector always consists of exactly three values
+which correspond to the x, y, and z directions, respectively.  This is
+true regardless of the ordering of dimensions in a specific volume or
+data object.
+
+Because of the direction cosines, it is possible for MINC volumes to
+define non-orthogonal dimensions.
+
+These functions fail if the dimension is not of the spatial class.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, or MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miget\_dimension\_name/miset\_dimension\_name}
+\begin{verbatim}
+NAME
+
+miget_dimension_name, miset_dimension_name - get or set the identifier
+of a MINC dimension
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_name ( midimhandle_t dimension, char **name_ptr );
+int miset_dimension_name ( midimhandle_t dimension, const char *name );
+
+DESCRIPTION
+
+miget_dimension_name retrieves the name of the given dimension, allocating
+the space needed.  The memory allocated by this function should be released
+with a call to mifree_name().
+
+miset_dimension_name will rename an existing dimension.  The new name
+must be no greater than 128 characters in length, including the
+trailing zero byte.
+
+RETURN VALUE
+
+miget_dimension_name returns the length of the name retrieved, including
+the terminating zero byte.  miset_dimension_name will return MI_NOERROR
+on success.  Both functions return MI_ERROR if an error occurs.
+
+SEE ALSO
+
+mifree_name
+\end{verbatim}
+
+\subsection{miget\_dimension\_offsets/miset\_dimension\_offsets}
+\begin{verbatim}
+NAME
+
+miget_dimension_offsets, miset_dimension_offsets - get or set the absolute
+world coordinates of points along a MINC dimension
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_offsets ( midimhandle_t     dimension, double       offsets[],
+                              unsigned long     array_length, 
+                              unsigned long     start_position);
+
+int miset_dimension_offsets ( midimhandle_t     dimension, const double offsets[],
+                              unsigned long     array_length, 
+                              unsigned long     start_position);
+
+DESCRIPTION
+
+These functions get or set the dimension offsets, that is, the
+absolute world coordinates of each sampled point along the dimension.
+
+The caller may retrieve up to "array_length" values, starting at the
+integer index "start_position".  Thus an arbitrary contiguous subset
+of the dimension's offsets may be retrieved or stored.  An error is
+returned if the "start_position" exceeds the total size of the
+dimension.  If the value of "start_position" is legal, but the sum of
+"start_position" and "array_length" exceeds the size of the dimension,
+the function will get or set offsets up to the size of the dimension.
+Any extra positions in the offsets[] array will be ignored.
+
+It is explicitly legal to call this function for a regularly sampled
+dimension.  The result will be a list of values calculated from the
+"start" and "separation" values of the dimension.  However, it is 
+not possible to set offsets on a regularly sampled dimension.
+
+RETURN VALUE
+
+Returns the number of offset values read or written , or MI_ERROR if
+an error is detected.
+\end{verbatim}
+
+\subsection{miget\_dimension\_sampling\_flag/miset\_dimension\_sampling\_flag}
+\begin{verbatim}
+NAME
+
+miget_dimension_sampling_flag, miset_dimension_sampling_flag - get or set
+the sampling flag for a MINC dimension
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_sampling_flag ( midimhandle_t       dimension,
+                                    BOOLEAN             *sampling_flag);
+
+int miset_dimension_sampling_flag ( midimhandle_t       dimension,
+                                    BOOLEAN             sampling_flag);
+
+DESCRIPTION
+
+The miget_dimension_sampling flag function retrieves the value
+of the "sampling" flag for a given MINC dimension.  This flag
+is true (non-zero) if the dimension is sampled at regular
+intervals, and false if the dimension is sampled irregularly.
+
+If a dimension has regular sampling, the miget_dimension_step
+function may be used to retrieve the sampling interval, and the
+miget_dimension_start function may be used to retrieve the origin
+value along the axis.
+
+If a dimension has irregular sampling, the miget_dimension_offsets
+function may be used to retrieve the positions of each sample along
+that axis.
+
+RETURN VALUE
+
+These functions returns MI_NOERROR on success, or MI_ERROR if an 
+error is detected (for example, if a parameter is invalid).
+\end{verbatim}
+
+\subsection{miget\_dimension\_separation/miset\_dimension\_separation}
+\begin{verbatim}
+NAME
+
+miget_dimension_separation, miset_dimension_separation - set/get the 
+sampling interval for a single dimension
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_separation ( midimhandle_t          dimension,
+                                 mivoxel_order_t        voxel_order,
+                                 double                 *separation_ptr );
+
+int miset_dimension_separation ( midimhandle_t          dimension,
+                                 mivoxel_order_t        voxel_order,
+                                 double                 separation );
+
+DESCRIPTION
+
+Gets or sets the constant sampling interval defined on a regularly-sampled
+dimension.  While it is legal to call these functions for an irregularly-
+sampled dimension, the values will be ignored. The mivoxel_order_t is an 
+enumerated type which is defined as follows
+
+typedef enum {
+        MI_FILE_ORDER   = 0,
+        MI_APPARENT_ORDER  = 1
+} mivoxel_order_t;
+
+This flag specifies whether the voxel order is original from file or
+is an apparent one which can be the default (i.e., the same as the 
+original file) or the order that is specified by the user.
+
+If not explicitly set, the separation will have a default value of one.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, or MI_ERROR on failure.
+
+SEE ALSO
+
+miget_dimension_separations, miset_dimension_separations
+\end{verbatim}
+
+\subsection{miget\_dimension\_separations/miset\_dimension\_separations}
+\begin{verbatim}
+NAME
+
+miget_dimension_separations, miset_dimension_separations - get/set the
+sampling intervals for a list of dimensions.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_separations ( const midimhandle_t   dimensions[],
+                                  mivoxel_order_t       voxel_order,
+                                  int                   array_length,
+                                  double                separations[] );
+
+int miset_dimension_separations ( const midimhandle_t   dimensions[],
+                                  mivoxel_order_t       voxel_order,
+                                  int                   array_length,
+                                  const double          separations[] );
+
+DESCRIPTION
+
+These functions get or set the scalar separation (sampling interval)
+associated with each of the dimensions in the input "dimensions[]"
+array.  The "array_length" parameter specifies the size of both the
+input and output arrays. While it is legal to call these functions for
+an regularly- sampled dimension, the values will be ignored.
+
+RETURN VALUE
+
+Returns the number of separations copied to (or from) the array, or
+MI_ERROR if an error occurs.
+
+SEE ALSO
+
+miget_dimension_separation, miset_dimension_separation
+\end{verbatim}
+
+\subsection{miget\_dimension\_size/miset\_dimension\_size}
+\begin{verbatim}
+NAME
+
+miget_dimension_size, miset_dimension_size - get or set the length of a
+MINC dimension
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_size ( midimhandle_t        dimension, 
+                           unsigned long        *size_ptr );
+
+int miset_dimension_size ( midimhandle_t        dimension, 
+                           unsigned long        size );
+
+DESCRIPTION
+
+These functions get or set the size (or length) of a MINC 2 dimension
+object used in creating a new volume.  The size of a dimension
+associated with an existing volume cannot be changed.  One can, however,
+make a copy of an existing dimension and set the size of the copy. 
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miget\_dimension\_sizes}
+\begin{verbatim}
+NAME
+
+miget_dimension_sizes - retrieve the sizes of an array of dimension handles
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_sizes ( const midimhandle_t         dimensions[],
+                            int                         array_length,
+                            unsigned long               sizes[] );
+
+DESCRIPTION
+
+This function will copy the lengths of each of the dimensions listed in the
+"dimensions[]" array into the "sizes[]" array.  The parameter "array_length"
+specifies the length of both of the arrays.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, or MI_ERROR on failure.
+
+SEE ALSO
+
+miget_dimension_size, miset_dimension_size
+\end{verbatim}
+
+\subsection{miget\_dimension\_start/miset\_dimension\_start}
+\begin{verbatim}
+NAME
+
+miget_dimension_start, miset_dimension_start - get or set the origin
+of a MINC dimension
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_start ( midimhandle_t       dimension, 
+                            mivoxel_order_t     voxel_order,
+                            double              *start_ptr);
+
+int miset_dimension_start ( midimhandle_t       dimension,
+                            mivoxel_order_t     voxel_order,
+                            double              start);
+
+DESCRIPTION
+
+These functions get or set the origin of the dimension in world
+coordinates. While a "start" value may be legally associated with any
+dimension, it is considered meaningless when associated with an
+irregularly sampled dimension.   
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, or MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miget\_dimension\_starts/miset\_dimension\_starts}
+\begin{verbatim}
+NAME
+
+miget_dimension_starts, miset_dimension_starts - get or set the start
+values
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_starts ( const midimhandle_t        dimensions[],
+                             mivoxel_order_t            voxel_order,
+                             int                        array_length,
+                             double                     starts[]);
+      
+int miset_dimension_starts ( const midimhandle_t        dimensions[],
+                             mivoxel_order_t            voxel_order,
+                             int                        array_length,
+                             const                      double starts[]);
+
+DESCRIPTION
+
+These functions get or set the start value for an array of
+regularly-sampled dimensions.  The start value defines the origin of
+that dimension.  While it is legal to call these functions for a
+regularly-sampled dimension, the values will be ignored.
+
+If not explicitly set, the start value defaults to zero.
+
+RETURN VALUE
+
+These functions return the number of start values copied to or from
+the starts[] array, or MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miget\_dimension\_units/miset\_dimension\_units}
+\begin{verbatim}
+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
+\end{verbatim}
+
+\subsection{miget\_dimension\_width/miset\_dimension\_width}
+\begin{verbatim}
+NAME
+
+miget_dimension_width, miset_dimension_width - get or set the full-width
+half-maximum value for points along a MINC dimension
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_width ( midimhandle_t       dimension, 
+                            mivoxel_order_t     voxel_order,
+                            double              *width_ptr );
+
+int miset_dimension_width ( midimhandle_t       dimension, 
+                            mivoxel_order_t     voxel_order,
+                            double              width );
+
+DESCRIPTION
+
+These functions get or set the dimension width, that is, the
+full-width half-maximum values of each sampled point along the
+dimension.  
+
+These functions are used to set a constant width for regularly-sampled
+dimensions.
+
+If not explicitly set, the width will be assumed to be equal to the
+dimension's step size.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, or MI_ERROR on failure.  Will fail if
+called for an irregularly-sampled dimension.
+
+SEE ALSO
+
+miget_dimension_widths, miset_dimension_widths
+\end{verbatim}
+
+\subsection{miget\_dimension\_widths/miset\_dimension\_widths}
+\begin{verbatim}
+NAME
+
+miget_dimension_widths, miset_dimension_widths - get or set the full-width
+half-maximum values for points along a MINC dimension
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_dimension_widths ( midimhandle_t      dimension, 
+                             mivoxel_order_t    voxel_order,
+                             unsigned long      array_length, 
+                             unsigned long      start_position,
+                             double             widths[]);
+
+int miset_dimension_widths ( midimhandle_t      dimension, 
+                             mivoxel_order_t    voxel_order,
+                             unsigned long      array_length, 
+                             unsigned long      start_position,
+                             const double       widths[]);
+
+DESCRIPTION
+
+These functions get or set the dimension widths, that is, the
+full-width half-maximum values of each sampled point along the
+dimension.
+
+The caller may retrieve up to "array_length" values, starting at the
+integer index "start_position".  Thus an arbitrary contiguous subset
+of the dimension's widths may be retrieved or stored.  An error is
+returned if the "start_position" exceeds the total size of the
+dimension.  If the value of "start_position" is legal, but the sum of
+"start_position" and "array_length" exceeds the size of the dimension,
+the function will get or set widths up to the size of the dimension.
+Any extra positions in the widths[] array will be ignored.
+
+It is explicitly legal to call this function for a regularly sampled
+dimension.  The result will be a list of constant width values.
+However, it is not possible to set widths on a regularly sampled
+dimension.
+
+RETURN VALUE
+
+Returns the number of offset values read or written , or MI_ERROR if
+an error is detected.
+
+SEE ALSO
+
+miget_dimension_width, miset_dimension_width
+\end{verbatim}
+
+\section{FREE FUNCTIONS (2)}
+\subsection{mifree\_name/mifree\_names}
+\begin{verbatim}
+NAME
+
+mifree_name, mifree_names - free the storage allocated for strings by 
+MINC functions
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int mifree_name ( char *name );
+int mifree_names ( char **names );
+
+DESCRIPTION
+
+Frees the space allocated for string storage by MINC function such as
+miget_dimension_name and miget_space_name.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, or MI_ERROR on failure.
+
+SEE ALSO
+
+miget_dimension_name, miget_space_name
+\end{verbatim}
+
+\section{HYPERSLAB FUNCTIONS (9)}
+\subsection{miget\_hyperslab\_normalized}
+\begin{verbatim}
+NAME
+
+miget_hyperslab_normalized - get a normalized hyperslab
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_hyperslab_normalized ( mihandle_t    volume,
+                                 mitype_t      buffer_data_type,
+                                 long          voxel_offsets[],
+                                 long          sizes[],
+                                 double        min,
+                                 double        max,
+                                 void          *buffer)
+                                  
+                                
+DESCRIPTION
+
+The real values in the volume from the interval min through max
+is mapped to the maximum representable range for the requested
+data type. Float type is NOT an allowed data type.
+
+RETURN VALUE
+
+miget_hyperslab_normalized returns MI_NOERROR if it successfully returns
+a normalized hyperslab with specified size and type and MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_hyperslab\_size}
+\begin{verbatim}
+NAME
+
+miget_hyperslab_size - calculate the size of the hyperslab
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_hyperslab_size ( mitype_t            volume_data_type,
+                           int                 number_of_dimensions,
+                           int                 sizes_of_dimensions[],
+                           misize_t            *size)
+
+DESCRIPTION
+
+calculate the size of the hyperslab. i.e., the amount of memory in BYTES
+which is needed to store the hyperslab
+
+RETURN VALUE
+
+miget_hyperslab_size returns MI_NOERROR if it successfully calculates the
+size of the hyperslab with specified dimensions and MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_hyperslab\_with\_icv}
+\begin{verbatim}
+NAME
+
+miget_hyperslab_with_icv - get hyperslab with the specified icv
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_hyperslab_with_icv ( int             icv,
+                               mitype_t        buffer_data_type,
+                               long            voxel_offsets[],
+                               long            sizes[],
+                               void            *buffer)                
+                                        
+DESCRIPTION
+
+This method gets the hyperslab with the specified icv.
+
+RETURN VALUE
+
+miget_hyperslab_with_icv returns MI_NOERROR if it successfully gets
+the hyperslab with specified icv and MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_hyperslab\_with\_icv}
+\begin{verbatim}
+NAME
+
+miset_hyperslab_with_icv - set hyperslab with the specified icv
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_hyperslab_with_icv ( int             icv,
+                               mitype_t        buffer_data_type,
+                               long            voxel_offsets[],
+                               long            sizes[],
+                               void            *buffer)                
+                                        
+DESCRIPTION
+
+This method sets the hyperslab with the specified icv.
+
+RETURN VALUE
+
+miset_hyperslab_with_icv returns MI_NOERROR if it successfully sets
+the hyperslab with specified icv and MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_real\_value\_hyperslab}
+\begin{verbatim}
+NAME
+
+miget_real_value_hyperslab - get a real value hyperslab
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_real_value_hyperslab( mihandle_t     volume,
+                                mitype_t       buffer_data_type,
+                                long           voxel_offsets[],
+                                long           sizes[],
+                                void           *buffer)
+
+DESCRIPTION
+
+This method converts the data from the type that is in the file in a value
+preserving way.If real value exceeds range of the requested data type, the
+result is UNDEFINED. The void pointer is pointing to memory which has to be 
+allocated by the programmer in advance.
+
+
+RETURN VALUE
+
+miget_real_value_hyperslab returns MI_NOERROR if it successfully returns
+the real value hyperslab and MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_real\_value\_hyperslab}
+\begin{verbatim}
+NAME
+
+miset_real_value_hyperslab - set a real value hyperslab
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_real_value_hyperslab( mihandle_t     volume,
+                                mitype_t       buffer_data_type,
+                                long           voxel_offsets[],
+                                long           sizes[],
+                                void           *buffer)
+
+DESCRIPTION
+
+This method sets a real value hyperslab with the specified type and size. The 
+void pointer would get casted to the appropriate type once it is used. The data_type
+argument will be used to ensure type compatibility with the hyperslab data type. 
+
+RETURN VALUE
+
+miset_real_value_hyperslab returns MI_NOERROR if it successfully sets
+the hyperslab with specified size and type and MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_voxel\_value\_hyperslab}
+\begin{verbatim}
+NAME
+
+miget_voxel_value_hyperslab - get a voxel value hyperslab
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_voxel_value_hyperslab( mihandle_t    volume,
+                                 mitype_t      buffer_data_type,
+                                 long          voxel_offsets[],
+                                 long          sizes[],
+                                 void          *buffer)
+
+DESCRIPTION
+
+This method returns a voxel value hyperslab.
+
+
+RETURN VALUE
+
+miget_voxel_value_hyperslab returns MI_NOERROR if it successfully gets 
+the hyperslab with specified size and type and MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_voxel\_value\_hyperslab}
+\begin{verbatim}
+NAME
+
+miset_voxel_value_hyperslab - set a voxel value hyperslab
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_voxel_value_hyperslab( mihandle_t    volume,
+                                 mitype_t      buffer_data_type,
+                                 long          voxel_offsets[],
+                                 long          sizes[],
+                                 void          *buffer)
+
+DESCRIPTION
+
+This method sets a voxel value hyperslab with the specified type and size. If
+the type does not match a simple C cast will be applied.
+
+RETURN VALUE
+
+miset_voxel_value_hyperslab returns MI_NOERROR if it successfully sets the
+voxel value hyperslab with specified size and type and MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{mitransform\_hyperslab}
+\begin{verbatim}
+NAME 
+
+mitransform_hyperslab
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  mitransform_hyperslab( mihandle_t      volume,
+                            long            offsets[],    
+                            long            sizes[],
+                            int             target_depth,
+                            long            target_offsets[],
+                            long            target_sizes[])
+                                
+                        
+                                
+DESCRIPTION
+
+
+RETURN VALUE
+
+\end{verbatim}
+
+\section{IMAGE CONVERSION VARIABLE FUNCTIONS (4)}
+\subsection{miicv\_volume\_attach}
+\begin{verbatim}
+NAME
+
+miicv_volume_attach - attach a MINC ICV object to a MINC 2.0 volume.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miicv_volume_attach ( int           icv, 
+                          mihandle_t    volume);
+
+DESCRIPTION
+
+This function attaches a MINC image conversion variable (ICV) object
+to a MINC 2.0 volume.
+
+Given the flexibility of the MINC format, there are many different
+possible choices available for details such as dimension order, data
+type, and data range. Accounting for all of the possible combinations
+of these items could make MINC programming too complex or unwieldy in
+many situations.
+
+MINC ICV objects are a solution to this problem.  They are essentially
+a specification of the properties that the programmer would like the
+data to have. The ICV is responsible for making any necessary
+conversions, hiding the details of the actual data format from the
+programmer.
+
+A program may allocate any number of ICV objects and may configure and
+attach them independently, allowing the program to have several
+different views of the volume's data at the same time.
+
+Note that ICV properties cannot be modified while a variable is
+attached to the ICV. If a file and variable are already attached to
+the ICV, they will be automatically detached before the new variable
+is attached.
+
+NOTE
+
+This interface is being extended to allow use with the new MINC 2.0
+interface, however, the existing ICV interface will be retained as
+well.
+
+RETURN VALUE
+
+MI_NOERROR on success, or MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miicv\_volume\_detach}
+\begin{verbatim}
+NAME
+
+miicv_volume_detach - detach an image conversion variable from a volume.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miicv_volume_detach ( int   icv);
+
+DESCRIPTION
+
+Deletes the association between an image conversion variable (ICV) 
+and a MINC2.0 volume object.
+
+RETURN VALUE
+
+MI_NOERROR on success, or MI_ERROR on failure.
+
+SEE ALSO 
+
+miicv_volume_attach
+\end{verbatim}
+
+\subsection{miicv\_volume\_get/miicv\_volume\_put}
+\begin{verbatim}
+NAME
+
+miicv_volume_get, miicv_volume_put
+                
+SYNOPSIS
+
+#include <minc2.h>
+
+int miicv_volume_get(int                 icv, 
+                     mihandle_t          volume, 
+                     const unsigned long start[], 
+                     const unsigned long count[], 
+                     void                *value_ptr);
+
+int miicv_volume_put(int                 icv, 
+                     mihandle_t          volume, 
+                     const unsigned long start[], 
+                     const unsigned long count[], 
+                     void                *value_ptr);
+
+DESCRIPTION
+
+These functions actually read or write data through the ICV to the attached 
+variable and volume.
+
+All value/range conversions and dimension conversions are applied before the
+data is read or written.
+
+RETURN VALUES
+
+MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\section{LABEL FUNCTIONS (3)}
+\subsection{midefine\_label}
+\begin{verbatim}
+NAME
+
+midefine_label - define a label value for a labelled volume.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int midefine_label ( mihandle_t         volume, 
+                     int                value, 
+                     const char         *name );
+
+DESCRIPTION
+
+This function associates a label name with an integer value for the given
+volume. Functions which read and write voxel values will read/write 
+in integer values, and must call miget_label_name() to discover the 
+descriptive text string which corresponds to the integer value.
+
+RETURN VALUE
+
+MI_NOERROR on success, or MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miget\_label\_name}
+\begin{verbatim}
+NAME
+
+miget_label_name - convert a label type to a text string
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_label_name ( mihandle_t       volume, 
+                       int              value, 
+                       char             **name );
+
+DESCRIPTION
+
+For a labelled volume, this function retrieves the text name
+associated with a given integer value.
+
+The name pointer returned must be freed by calling mifree_name().
+
+RETURN VALUE
+
+MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miget\_label\_value}
+\begin{verbatim}
+
+NAME
+
+miget_label_value - translate a label name into the corresponding integer
+value.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_label_value ( mihandle_t      volume, 
+                        const char      *name, 
+                        int             *value_ptr );
+
+DESCRIPTION
+
+This function is the inverse of miget_label_name. It is called to determine
+what integer value, if any, corresponds to the given text string.
+
+RETURN VALUE
+
+MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\section{RECORD FUNCTIONS (4)}
+\subsection{miget\_record\_name}
+\begin{verbatim}
+NAME
+
+miget_record_name - get the name of the record
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_record_name ( mihandle_t      volume,
+                        char            **name)
+
+
+DESCRIPTION
+
+This method gets the name of the record dimension.
+
+RETURN VALUE
+
+MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miget\_record\_length}
+\begin{verbatim}
+NAME
+
+miget_record_length - get the length of the record
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_record_length ( mihandle_t    volume,
+                          int           *length)
+
+
+DESCRIPTION
+
+This method gets the length (i.e., number of fields in the case of uniform
+records and number of bytes for non_uniform ones) of the record.
+
+RETURN VALUE
+
+MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miget\_record\_field\_name}
+\begin{verbatim}
+NAME
+
+miget_record_field_name - get the record's field name
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_record_field_name ( mihandle_t        volume,
+                              int               index,
+                              char              **name)
+
+DESCRIPTION
+
+This method sets a field name for the given record.
+
+RETURN VALUE
+
+MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miset\_record\_field\_name}
+\begin{verbatim}
+NAME
+
+miset_record_field_name - set the record's field name
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_record_field_name ( mihandle_t        volume,
+                              int               index,
+                              char              *name)
+                                
+
+DESCRIPTION
+
+This method sets a field name for the given record. e.g. field is "red"
+
+
+RETURN VALUE
+
+MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\section{SLICE/VOLUME SCALE FUNCTIONS (14)}
+\subsection{miget\_slice\_max}
+\begin{verbatim}
+NAME 
+
+miget_slice_max - get maximum real value of all the slice
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_slice_max ( mihandle_t        volume,
+                      unsigned long     start_positions[],
+                      unsigned long     array_length,
+                      double            *slice_max)
+                       
+NOTE
+
+All of the slice scale (i.e., one scale per slice) functions take an array
+of long integer coordinates to specify the slice in particular and the order 
+of the coordinates is always set to FILE ORDER of the dimensions (i.e. not the
+apparent order). The number of coordinates to specify is the first (n-2) 
+dimensions except in the case of a uniform record which is also flattened
+(i.e., flatten_flag=1) that is the first (n-3) dimensions.                                
+
+
+DESCRIPTION
+
+This method returns the slice_max with the minimum real value of
+the corresponding slice. Note that this function is not defined for
+floating point data type nor it works if the volume is globally scaled.
+
+RETURN VALUE
+
+miget_slice_max returns MI_NOERROR if it successfully returns the slice_max
+or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_slice\_max}
+\begin{verbatim}
+NAME 
+
+miset_slice_max - set maximum real value for the slice
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_slice_max ( mihandle_t        volume,
+                      unsigned long     start_positions[],
+                      unsigned long     array_length,
+                      const double      slice_max)
+                       
+                                
+DESCRIPTION
+
+This method sets the slice_max with the minimum real value for
+the corresponding slice. Note that this function is not defined for
+floating point data type nor it works if the volume is globally scaled.
+
+RETURN VALUE
+
+miset_slice_max returns MI_NOERROR if it successfully sets the slice_max
+or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_slice\_min}
+\begin{verbatim}
+NAME 
+
+miget_slice_min - get the minimum real value of the slice
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_slice_min ( mihandle_t     volume,
+                      unsigned long     start_positions[],
+                      unsigned long     array_length,
+                      double            *slice_min)
+                       
+                                
+DESCRIPTION
+
+This method returns the slice_min with the minimum real value of
+the corresponding slice. Note that this function is not defined 
+for floating point data type nor it works if the volume is globally scaled.
+
+RETURN VALUE
+
+miget_slice_min returns MI_NOERROR if it successfully returns the slice_min
+or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_slice\_min}
+\begin{verbatim}
+NAME 
+
+miset_slice_min - set the minimum real value for all the slice
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_slice_min ( mihandle_t        volume,
+                      unsigned long     start_positions[],
+                      unsigned long     array_length,
+                      const double      slice_min)
+                       
+                                
+DESCRIPTION
+
+This method sets the slice_min with the minimum real value for
+the corresponding slice. Note that this function is not defined for
+floating point data type nor it works if the volume is globally scaled.
+
+RETURN VALUE
+
+miset_slice_min returns MI_NOERROR if it successfully sets the slice_min
+or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_slice\_range}
+\begin{verbatim}
+NAME 
+
+miget_slice_range - get the min and max real values of the slice range
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_slice_range ( mihandle_t      volume,
+                        unsigned long   start_positions[],
+                        unsigned long   array_length,
+                        double          *slice_min,
+                        double          *slice_max)
+                       
+                                
+DESCRIPTION
+
+This method returns the slice range according to their minimum and maximum
+real values . Note that this function is not defined for floating point 
+data type nor it works if the volume is globally scaled.
+
+RETURN VALUE
+
+miget_slice_range returns MI_NOERROR if it successfully returns min and
+max or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_slice\_range}
+\begin{verbatim}
+NAME 
+
+miset_slice_range - set the min and max real values of the slice range
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_slice_range ( mihandle_t      volume,
+                        unsigned long   start_positions[],
+                        unsigned long   array_length,
+                        const double    slice_min,
+                        const double    slice_max)
+                       
+                                
+DESCRIPTION
+
+This method sets the slice range according to the minimum and maximum
+real values . Note that this function is not defined forfloating point 
+data type nor it works if the volume is globally scaled.
+
+
+RETURN VALUE
+
+miset_slice_range returns MI_NOERROR if it successfully sets the slice_max
+and the slice_min or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_slice\_scaling\_flag}
+\begin{verbatim}
+NAME 
+
+miget_slice_scaling_flag - get the scaling flag for slices
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_slice_scaling_flag ( Boolean      *scaling_flag)
+                                
+DESCRIPTION
+
+This method gets the scaling flag for slices which determines whether 
+the volume slices have different scale factors. 
+
+RETURN VALUE
+
+miget_slice_scaling_flag returns MI_NOERROR if it successfully gets 
+the scaling flag or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_slice\_scaling\_flag}
+\begin{verbatim}
+NAME 
+
+miset_slice_scaling_flag - set the scaling flag for slices
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_slice_scaling_flag ( mihandle_t       volume,
+                               Boolean          scaling_flag)
+                                
+DESCRIPTION
+
+This method sets the scaling flag for slices which determines whether 
+the volume slices have different scale factors.
+
+RETURN VALUE
+
+miset_slice_scaling_flag returns MI_NOERROR if it successfully sets 
+the scaling flag or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_volume\_max}
+\begin{verbatim}
+NAME
+
+miget_volume_max - get the global max scale for volume
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_volume_max ( mihandle_t       volume,
+                       double           *volume_max)
+
+
+DESCRIPTION
+
+This method gets the max scale value for the volume. Note that this 
+method only works if volume is not slice scaled.
+
+RETURN VALUE
+
+miget_volume_max returns MI_NOERROR if it successfully gets the
+global max scale for the volume or MI_ERROR otherwise. 
+\end{verbatim}
+
+\subsection{miset\_volume\_max}
+\begin{verbatim}
+NAME
+
+miset_volume_max - set the global max scale for volume
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_volume_max ( mihandle_t       volume,
+                       double           volume_max)
+
+
+DESCRIPTION
+
+This method sets the max scale value for the volume. Note that this 
+method only works if volume is not slice scaled.
+
+RETURN VALUE
+
+miset_volume_max returns MI_NOERROR if it successfully sets the
+global max scale for the volume or MI_ERROR otherwise. 
+\end{verbatim}
+
+\subsection{miget\_volume\_min}
+\begin{verbatim}
+NAME
+
+miget_volume_min - get the global min scale for volume
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_volume_min ( mihandle_t       volume,
+                       double           *volume_min)
+
+
+DESCRIPTION
+
+This method gets the min scale value for the volume. Note that this 
+method only works if volume is not slice scaled.
+
+RETURN VALUE
+
+miget_volume_min returns MI_NOERROR if it successfully gets the
+global min scale for the volume or MI_ERROR otherwise. 
+\end{verbatim}
+
+\subsection{miset\_volume\_min}
+\begin{verbatim}
+NAME
+
+miset_volume_min -  set the global min scale for volume
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_volume_min ( mihandle_t       volume,
+                       double           volume_min)
+
+
+DESCRIPTION
+
+This method sets the min scale value for the volume. Note that this 
+method only works if volume is not slice scaled.
+
+RETURN VALUE
+
+miset_volume_min returns MI_NOERROR if it successfully sets the
+global min scale for the volume or MI_ERROR otherwise.
+\end{verbatim}
+
+\subsection{miget\_volume\_range}
+\begin{verbatim}
+NAME
+
+miget_volume_range - get the global range scale for volume
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_volume_range ( mihandle_t     volume,
+                         double         *volume_max,
+                         double         *volume_min)
+
+
+DESCRIPTION
+
+This method gets the range (min and max) scale value for the volume. Note that this 
+method only works if volume is not slice scaled.
+
+RETURN VALUE
+
+miget_volume_range returns MI_NOERROR if it successfully gets the
+global range scale for the volume or MI_ERROR otherwise. 
+\end{verbatim}
+
+\subsection{miset\_volume\_range}
+\begin{verbatim}
+NAME
+
+miset_volume_range - set the global range scale for volume
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_volume_range ( mihandle_t     volume,
+                         double         volume_max,
+                         double         volume_min)
+
+
+DESCRIPTION
+
+This method sets the range (min and max) scale value for the volume. Note that this 
+method only works if volume is not slice scaled.
+
+RETURN VALUE
+
+miset_volume_range returns MI_NOERROR if it successfully sets the
+global range scale for the volume or MI_ERROR otherwise.
+\end{verbatim}
+
+\section{VALID MIN/MAX AND RANGE FUNCTIONS (7)}
+\subsection{miget\_valid\_max}
+\begin{verbatim}
+
+NAME 
+
+miget_valid_max - get the valid maximum value 
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_valid_max ( mihandle_t        volume,
+                      double            *valid_max)
+                                
+DESCRIPTION
+
+This method gets the valid maximum value specific to the data type.
+
+RETURN VALUE
+
+miget_valid_max returns MI_NOERROR if it successfully gets 
+the valid maximum or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_valid\_max}
+\begin{verbatim}
+NAME 
+
+miset_valid_max - set the valid maximum value 
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_valid_max ( mihandle_t        volume,
+                      double            valid_max)
+                                
+DESCRIPTION
+
+This method sets the valid maximum value specific to the data type.
+
+RETURN VALUE
+
+miset_valid_max returns MI_NOERROR if it successfully sets 
+the valid maximum or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_valid\_min}
+\begin{verbatim}
+NAME 
+
+miget_valid_min - get the valid minimum value 
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_valid_min ( mihandle_t        volume,
+                      double            *valid_min)
+                                
+DESCRIPTION
+
+This method gets the valid minimum value specific to the data type.
+
+RETURN VALUE
+
+miget_valid_min returns MI_NOERROR if it successfully gets 
+the valid minimum or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_valid\_min}
+\begin{verbatim}
+NAME 
+
+miset_valid_min - set the valid minimum value 
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_valid_min ( mihandle_t        volume,
+                      double            valid_min)
+                                
+DESCRIPTION
+
+This method sets the valid minimum value specific to the data type.
+
+RETURN VALUE
+
+miset_valid_min returns MI_NOERROR if it successfully sets 
+the valid minimum or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_volume\_valid\_range}
+\begin{verbatim}
+NAME 
+
+miget_volume_valid_range - get the valid range values
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_volume_valid_range ( mihandle_t      volume,
+                               double          *valid_max,
+                               double          *valid_min)
+                                
+DESCRIPTION
+
+This method gets the valid range values specific to the data type.
+
+
+RETURN VALUE
+
+miget_volume_valid_range returns MI_NOERROR if it successfully gets 
+the valid range values or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_volume\_valid\_range}
+\begin{verbatim}
+NAME 
+
+miset_volume_valid_range - set the valid range values
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_volume_valid_range ( mihandle_t      volume,
+                               double          valid_max,
+                               double          valid_min)
+                                
+DESCRIPTION
+
+This method sets the valid range values specific to the data type.
+
+RETURN VALUE
+
+miset_volume_valid_range returns MI_NOERROR if it successfully sets 
+the valid range values or MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miset\_valid\_range\_to\_default}
+\begin{verbatim}
+NAME 
+
+miset_valid_range_to_default - set the range to the default value
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_valid_range_to_default ( mihandle_t   volume)
+                        
+                                
+DESCRIPTION
+
+This method sets the valid range to the dafault value specific to the
+data type.
+
+RETURN VALUE
+
+miset_valid_range_to_default returns MI_NOERROR if it successfully sets 
+the valid range to default values  or MI_ERROR otherwise
+\end{verbatim}
+
+\section{VOLUME FUNCTIONS (4)}
+\subsection{micreate\_volume}
+\begin{verbatim}
+NAME
+
+micreate_volume - create a volume with the specified properties
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int micreate_volume ( const char        *filename,
+                      int               number_of_dimensions,
+                      midimhandle_t     dimensions[],
+                      mitype_t          volume_type,
+                      miclass_t         volume_class,
+                      mivolumeprops_t   create_props,
+                      mihandle_t        *volume)
+
+DESCRIPTION
+
+Create a volume with the specified filename, data type, dimension handles,
+type, class and compression type.
+
+RETURN VALUE
+
+micreate_volume returns MI_NOERROR if it successfully creates a
+volume with all the specified properties and MI_ERROR otherwise
+\end{verbatim}
+
+\subsection{miget\_volume\_dimension\_count}
+\begin{verbatim}
+NAME
+
+miget_volume_dimension_count - get the number of dimensions defined in a MINC
+volume, according to their class and attribute.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_volume_dimension_count ( mihandle_t           volume, 
+                                   midimclass_t         class,
+                                   midimattr_t          attr );
+
+DESCRIPTION
+
+This function may be used to determine the number of dimensions with the
+given class and attributes.
+
+RETURN VALUE
+
+The number of dimensions defined in the file, or MI_ERROR if an error
+is detected.
+\end{verbatim}
+
+\subsection{miopen\_volume}
+\begin{verbatim}
+NAME
+
+miopen_volume - open a volume for reading
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miopen_volume(const char    *filename, 
+                  int            mode,
+                  mihandle_t    *volume);
+
+DESCRIPTION
+
+Opens an existing MINC volume for read-only access if mode argument is
+MI2_OPEN_READ, or read-write access if mode argument is MI2_OPEN_RDWR.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success or MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miclose\_volume}
+\begin{verbatim}
+NAME
+
+miclose_volume - close an open volume, freeing the volume handle
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miclose_volume ( mihandle_t    volume);
+
+DESCRIPTION
+
+Close an existing MINC volume. If the volume was newly created, all
+changes will be written to disk. In all cases this function closes
+the open volume and frees memory associated with the volume handle.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success or MI_ERROR on failure.
+\end{verbatim}
+
+\section{VOXEL/REAL FUNCTIONS (16)}
+\subsection{miconvert\_real\_to\_voxel, miconvert\_voxel\_to\_real}
+\begin{verbatim}
+NAME 
+
+miconvert_real_to_voxel, miconvert_voxel_to_real  - conversion between
+voxel and real values
+
+SYNOPSIS
+
+#include <minc2.h>
+
+
+int miconvert_real_to_voxel( mihandle_t                 volume,
+                             const unsigned long        location[],
+                             int                        array_length,
+                             double                     value,
+                             double                     *voxel_ptr );
+
+int miconvert_voxel_to_real ( mihandle_t                volume, 
+                              const unsigned long       location[],
+                              int                       array_length,
+                              double                    voxel,
+                              double                    *value_ptr );
+
+DESCRIPTION
+
+These functions convert values between real (scaled) values and voxel
+(unscaled) values.  The voxel value is the unscaled value, and
+corresponds to the value actually stored in the file, whereas the
+"real" value is the value at the given location after scaling has been
+applied.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miconvert\_3D\_voxel\_to\_world}
+\begin{verbatim}
+NAME 
+
+miconvert_3D_voxel_to_world - convert voxel to world coordinates
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  miconvert_3D_voxel_to_world ( mihandle_t        volume,
+                                   const double      voxel[3],
+                                   double            world[3])
+                                
+DESCRIPTION
+
+This method makes conversion from voxel to world coordinate system. The
+voxels can come in any order but the result in world coordinate system 
+would be in (x,y,z) order. Use "miconvert_voxel_to_world" if any number
+of spatial dimensions other than three (3) is present.
+
+RETURN VALUE
+
+miconvert_3D_voxel_to_world returns MI_ERROR if there are not exactly
+three (3) spatial dimensions present or MI_NOERROR otherwise.
+\end{verbatim}
+
+\subsection{miconvert\_3D\_world\_to\_voxel}
+\begin{verbatim}
+NAME 
+
+miconvert_3D_world_to_voxel - convert world to voxel coordinates
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  miconvert_3D_world_to_voxel ( mihandle_t        volume,
+                                   double            voxel[3],
+                                   const double      world[3])
+                       
+                                
+DESCRIPTION
+
+This method makes conversion from world to voxel coordinate system. The
+dimensions in world coordinate system come in (x,y,z) order but the result  
+in voxel coordinates will be in the order of spatial dimensions. 
+Use "miconvert_world_to_voxel" if any number of spatial dimensions other
+than three (3) is present.
+
+
+RETURN VALUE
+
+miconvert_3D_world_to_voxel returns MI_ERROR if there are not exactly
+three (3) spatial dimensions present or MI_NOERROR otherwise.
+\end{verbatim}
+
+\subsection{miconvert\_3D\_voxel\_to\_spatial\_frequency}
+\begin{verbatim}
+NAME 
+
+miconvert_3D_voxel_to_spatial_frequency
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  miconvert_3D_voxel_to_spatial_frequency ( mihandle_t            volume,
+                                               const double          voxel[3],
+                                               double                world[3])
+                                   
+                       
+                                
+DESCRIPTION
+
+
+RETURN VALUE
+
+miconvert_3D_voxel_to_spatial_frequency
+\end{verbatim}
+
+\subsection{miconvert\_3D\_spatial\_frequency\_to\_voxel}
+\begin{verbatim}
+NAME 
+
+miconvert_3D_spatial_frequency_to_voxel
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  miconvert_3D_spatial_frequency_to_voxel ( mihandle_t            volume,
+                                               double                voxel[3],
+                                               const double          world[3])
+                       
+                                
+DESCRIPTION
+
+
+RETURN VALUE
+
+miconvert_3D_spatial_frequency_to_voxel
+\end{verbatim}
+
+\subsection{miconvert\_voxel\_to\_world}
+\begin{verbatim}
+NAME 
+
+miconvert_voxel_to_world
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  miconvert_voxel_to_world ( midimhandle_t   dimensions[],
+                                const double    voxels[],
+                                double          worlds[])
+                                   
+                       
+                                
+DESCRIPTION
+
+
+RETURN VALUE
+
+miconvert_voxel_to_world
+\end{verbatim}
+
+\subsection{miconvert\_world\_to\_voxel}
+\begin{verbatim}
+NAME 
+
+miconvert_world_to_voxel
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  miconvert_world_to_voxel ( midimhandle_t   dimensions[],
+                                double          voxels[],
+                                const double    worlds[])
+                                   
+                       
+                                
+DESCRIPTION
+
+
+RETURN VALUE
+
+miconvert_world_to_voxel
+\end{verbatim}
+
+\subsection{miget\_real\_value}
+\begin{verbatim}
+NAME
+
+miget_real_value -  return a specific scaled value from a volume
+
+SYNOPSIS
+
+#include <minc2.h>
+
+
+
+int miget_real_value ( mihandle_t               volume,
+                       const unsigned long      location[],
+                       int                      array_length,
+                       double                   *value_ptr );
+
+DESCRIPTION
+
+This function retrieves the real values of a position in the
+MINC volume.  The "real" value is the value at the given location 
+after scaling has been applied.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miset\_real\_value}
+\begin{verbatim}
+NAME
+
+miset_real_value - set the scaled value of a particular position 
+in the MINC volume.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+
+int miset_real_value( mihandle_t                volume,
+                      const unsigned long       location[],
+                      int                       array_length,
+                      double                    value );
+
+DESCRIPTION
+
+This function sets the  real value of a position in the MINC
+volume. The "real" value is the value at the given location 
+after scaling has been applied.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miconvert\_spatial\_origin\_to\_start}
+\begin{verbatim}
+NAME 
+
+miconvert_spatial_origin_to_start
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  miconvert_spatial_origin_to_start( mihandle_t           volume,
+                                        double               world[3],
+                                        double               starts[3])
+                       
+                                
+DESCRIPTION
+
+This function calculates the start values for the volume dimensions,
+assuming that the spatial origin is relocated to the given world
+coordinate.
+
+RETURN VALUE
+
+Returns MI_ERROR or MI_NOERROR
+
+\end{verbatim}
+
+\subsection{miconvert\_spatial\_frequency\_origin\_to\_start}
+\begin{verbatim}
+NAME 
+
+miconvert_spatial_frequency_origin_to_start
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  miconvert_spatial_frequency_origin_to_start( mihandle_t         volume,
+                                                  const double       world[3],
+                                                  double             starts[3])
+                       
+                                
+DESCRIPTION
+
+This function calculates the start values for the volume dimensions,
+assuming that the spatial origin is relocated to the given world
+coordinate.
+
+RETURN VALUE
+
+Returns MI_ERROR or MI_NOERROR
+
+\end{verbatim}
+
+\subsection{miset\_world\_origin}
+\begin{verbatim}
+NAME 
+
+miset_world_origin
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  miset_world_origin( mihandle_t volume,
+                         double     world[3])
+                       
+DESCRIPTION
+
+This function sets the world coordinates of the point (0,0,0) in voxel
+coordinates.  This changes the constant offset of the two coordinate
+systems.
+
+RETURN VALUE
+
+Returns MI_ERROR or MI_NOERROR
+
+\end{verbatim}
+
+\subsection{miset\_spatial\_frequency\_origin}
+\begin{verbatim}
+NAME 
+
+miset_spatial_frequency_origin
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  miset_spatial_frequency_origin( mihandle_t volume,
+                                     double     world[3])
+                       
+                                
+DESCRIPTION
+
+This function moves the origin for the world coordinate system of the 
+volume to the 3-dimensional coordinate ``world''.
+
+RETURN VALUE
+
+Returns MI_ERROR or MI_NOERROR
+
+\end{verbatim}
+
+\subsection{miget\_voxel\_value}
+\begin{verbatim}
+NAME
+
+miget_voxel_value  - return a specific unscaled value from a given volume
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_voxel_value ( mihandle_t              volume,
+                        const unsigned long     location[],
+                        int                     array_length,
+                        double                  *voxel_ptr );
+
+
+DESCRIPTION
+
+This function retrieves the real values of a position in the
+MINC volume. The voxel value is the unscaled value, and corresponds
+to the value actually stored in the file.
+
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miset\_voxel\_value}
+\begin{verbatim}
+NAME
+
+miset_voxel_value - set the unscaled value of a particular position
+in the MINC volume.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_voxel_value( mihandle_t               volume,
+                       const unsigned long      location[],
+                       int                      array_length,
+                       double                   voxel );
+
+
+DESCRIPTION
+
+This function sets the voxel value of a position in the MINC
+volume.  The voxel value is the unscaled value, and corresponds to the
+value actually stored in the file.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, MI_ERROR on failure.
+\end{verbatim}
+
+\section{VOLUME PROPERTIES FUNCTIONS (17)}
+\subsection{minew\_volume\_props/mifree\_volume\_props}
+\begin{verbatim}
+NAME
+
+minew_volume_props, mifree_volume_props - create or destroy a volume
+property list.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int minew_volume_props(mivolumeprops_t          *props);
+int mifree_volume_props(mivolumeprops_t          props);
+
+DESCRIPTION
+
+MINC volume properties objects are used to set or query the state of a number
+of the internal parameters of the volume.
+
+RETURN VALUE
+\end{verbatim}
+
+\subsection{miget\_volume\_props}
+\begin{verbatim}
+NAME
+
+miget_volume_props - Get a copy of the property list of a volume.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miget_volume_props(mihandle_t               volume, 
+                       mivolumeprops_t          *props);
+
+DESCRIPTION
+
+Returns a copy of the properties associated with the volume.  Any
+changes made to the properties will not take effect on the original volume,
+but the resulting properties structure may be used in the creation of a new
+volume.
+
+The handle must be freed by calling mifree_volume_props().
+
+RETURN VALUE
+
+MI_NOERROR on success, MI_ERROR on failure
+\end{verbatim}
+
+\subsection{miset\_props\_multi\_resolution/miget\_props\_multi\_resolution}
+\begin{verbatim}
+NAME
+
+miset_props_multi_resolution, miget_props_multi_resolution - get or set the
+multi-resolution properties for a property list.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_props_multi_resolution(mivolumeprops_t        props, 
+                                 BOOLEAN                enable_flag,
+                                 int                    depth);
+int miget_props_multi_resolution(mivolumeprops_t        props, 
+                                 BOOLEAN                *enable_flag,
+                                 int                    *depth);
+
+DESCRIPTION
+
+Returns the multi-resolution properties for a property list.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, MI_ERROR on failure
+\end{verbatim}
+
+\subsection{miselect\_resolution}
+\begin{verbatim}
+NAME 
+
+miselect_resolution - compute a different resolution
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  miselect_resolution ( mihandle_t        volume,
+                           int               depth)
+                                   
+                       
+                                
+DESCRIPTION
+
+This method computes a new resolution on according to the depth 
+(resolution level) provided by the user. 
+
+RETURN VALUE
+
+miselect_resolution returns MI_NOERROR if it successfully computes a
+new resolution from the data or MI_ERROR otherwise.
+\end{verbatim}
+
+\subsection{miflush\_from\_resolution}
+\begin{verbatim}
+NAME 
+
+miflush_from_resolution - compute all resolutions
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int  miflush_from_resolution ( mihandle_t            volume,
+                               int                   depth)
+                                   
+                       
+                                
+DESCRIPTION
+
+This method sets the the resolution level (depth) to the parameter
+provided and computes all the other resolutions.
+
+RETURN VALUE
+
+miflush_from_resolution returns MI_NOERROR if it successfully computes 
+all the resolutions from the data or MI_ERROR otherwise.
+\end{verbatim}
+
+\subsection{miset\_props\_compression\_type/miget\_props\_compression\_type}
+\begin{verbatim}
+NAME
+
+miset_props_compression_type, miget_props_compression_type - get or set
+the compression type for a volume property list.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_props_compression_type(mivolumeprops_t        props, 
+                                 micompression_t        compression_type);
+
+int miget_props_compression_type(mivolumeprops_t        props,
+                                 micompression_t        *compression_type);
+
+DESCRIPTION
+
+Set or retrieve the compression type, if any, for the volume properties.
+Currently only two compression types are defined:
+
+Enabling compression will automatically enable blocking with default
+parameters (see miset_props_blocking).
+
+typedef enum {
+        MI_COMPRESS_NONE = 0,
+        MI_COMPRESS_ZLIB = 1
+} micompression_t ;
+
+RETURN VALUE
+
+MI_NOERROR on success, or MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miset\_props\_zlib\_compression/miget\_props\_zlib\_compression}
+\begin{verbatim}
+NAME 
+
+miset_props_zlib_compression, miget_props_zlib_compression - get or
+set the zlib compression properties for a volume property list.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_props_zlib_compression(mivolumeprops_t        props, 
+                                 int                    zlib_level);
+int miget_props_zlib_compression(mivolumeprops_t        props, 
+                                 int                    *zlib_level);
+
+DESCRIPTION
+
+Get or set the Zlib compression level for the volume properties.  The 
+compression level is an integer from 1 to 9.
+
+RETURN VALUE
+
+MI_NOERROR on success, or MI_ERROR on failure.
+\end{verbatim}
+
+\subsection{miset\_props\_blocking/miget\_props\_blocking}
+\begin{verbatim}
+NAME
+
+miset_props_blocking, miget_props_blocking - get or set the blocking 
+structure properties for a volume property list.
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_props_blocking(mivolumeprops_t        props, 
+                         int                    edge_count,
+                         const int              *edge_lengths);
+
+int miget_props_blocking(mivolumeprops_t        props, 
+                         int                    *edge_count, 
+                         int                    *edge_lengths, 
+                         int                    max_lengths);
+
+DESCRIPTION
+
+Gets or sets the block-structuring properties of a volume property
+list.  If this option is set on a MINC volume, image data will be
+stored in a series of 2D or 3D chunks rather than as a simple linear
+array.
+
+This option is enabled implicitly whenever compression is enabled - all
+compressed volumes must be block-structured.
+
+RETURN VALUE
+
+Returns MI_NOERROR on success, MI_ERROR on failure
+\end{verbatim}
+
+\subsection{miset\_props\_uniform\_record}
+\begin{verbatim}
+NAME
+
+miset_props_uniform_record - set properties of a uniform record dimension
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_props_uniform_record ( mivolumeprops_t        props,
+                                 long                   length,
+                                 char                   *name)
+
+DESCRIPTION
+
+This method sets the properties of an uniform record given its name and
+size (i.e., number of fields included in the record).
+
+RETURN VALUE
+
+miset_props_uniform_record returns MI_NOERROR if it successfully sets
+the properties of an uniform record or MI_ERROR otherwise.
+\end{verbatim}
+
+\subsection{miset\_props\_non\_uniform\_record}
+\begin{verbatim}
+NAME
+
+miset_props_non_uniform_record - set properties of a non_uniform record
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_props_non_uniform_record ( mivolumeprops_t            props,
+                                     long                       length,
+                                     char                       *name)
+
+DESCRIPTION
+
+This method sets properties of a non_uniform record dimension given the 
+record's name and its size. Note that for the case of a non_uniform record
+size is specified in BYTEs instead of fields.
+
+RETURN VALUE
+
+miset_props_non_uniform_record returns MI_NOERROR if it successfully sets
+the properties of a non_uniform record or MI_ERROR otherwise.
+\end{verbatim}
+
+\subsection{miset\_props\_template}
+\begin{verbatim}
+NAME
+
+miset_props_template - set the template volume flag
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_props_template ( mivolumeprops_t              props,
+                           int                          template_flag)          
+
+DESCRIPTION
+
+This method sets the template volume flag to (1) to create a template volume
+(i.e, which is exaclty like an image except the image itself) or (0) for
+no template volume. The default flag is set to zero.
+
+RETURN VALUE
+
+miset_props_template returns MI_NOERROR if it successfully sets the template
+flag or MI_ERROR otherwise.
+\end{verbatim}
+
+\subsection{miset\_multi\_resolution\_method}
+\begin{verbatim}
+NAME
+
+miset_multi_resolution_method - set the multi-resolution calculation algorithm
+
+SYNOPSIS
+
+#include <minc2.h>
+
+int miset_multi_resolution_method()
+{
+}
+
+\end{verbatim}
+
+
+\end{document}