/*
 * Copyright (C) 1997-2005, R3vis Corporation.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA,
 * or visit http://www.gnu.org/copyleft/gpl.html.
 *
 * Contributor(s):
 *   Wes Bethel, R3vis Corporation, Marin County, California
 *
 * The OpenRM project is located at http://openrm.sourceforge.net/.
 */
/*
 * $Id: libdio.h,v 1.6 2005/06/08 18:34:16 wes Exp $
 * $Revision: 1.6 $
 * $Name: OpenRM-1-6-0-2-c $
 * $Log: libdio.h,v $
 * Revision 1.6  2005/06/08 18:34:16  wes
 * Code cleanup to eliminate compiler warnings.
 *
 * Revision 1.5  2003/04/13 18:13:23  wes
 * Updated copyright dates.
 *
 * Revision 1.4  2002/06/17 00:49:25  wes
 * Updated copyright lines.
 *
 * Revision 1.3  2001/03/31 16:55:18  wes
 * Added procmode.h, which defines an RMpipe processing mode used in
 * most demonstration programs. The default processing mode is
 * RM_PIPE_MULTISTAGE_VIEW_PARALLEL.
 *
 * Revision 1.2  2000/04/27 03:12:33  wes
 * Fixed ifdef that was causing some compiler warnings.
 *
 * Revision 1.1.1.1  2000/02/28 21:55:30  wes
 * OpenRM 1.2 Release
 *
 * Revision 1.5  2000/02/28 17:21:55  wes
 * RM 1.2, pre-OpenRM
 *
 */

#ifndef __libdio_h
#define __libdio_h

#define DIO_UNIFORM     1
#define DIO_RECTILINEAR 2
#define DIO_CURVILINEAR 3

typedef struct dataobject
{
    int width;
    int height;
    int depth;
    
    int nspace;			/* coordinate dims */
    int veclen;
    int gridtype;

    int dims[3];

    float datamin,datamax;

    float *rawdata;

    float *xcoords,*ycoords,*zcoords;
    RMvertex3D *corners;
    
} dioDataObject;


RMimage       *dioReadAVSImage(char *fname);
int           dioWriteAVSImage(const RMimage *img,char *fname);

dioDataObject *dioReadDataObject(char *fname);
void          dioObjectConditioner(dioDataObject *d);

dioDataObject *dioDataObjectNew();
void          dioObjectScaleData(dioDataObject *d, float scalef);

void          dioDeleteDataObject(dioDataObject *d);

#endif /* __libdio_h */

