00001 /************************************************************************* 00002 * $Id: idvol-ido.h,v 1.1 2005/09/09 08:22:42 bellet Exp $ 00003 ************************************************************************** 00004 This software is governed by the CeCILL license under French law and 00005 abiding by the rules of distribution of free software. You can use, 00006 modify and/ or redistribute the software under the terms of the CeCILL 00007 license as circulated by CEA, CNRS and INRIA at the following URL 00008 "http://www.cecill.info". 00009 00010 As a counterpart to the access to the source code and rights to copy, 00011 modify and redistribute granted by the license, users are provided only 00012 with a limited warranty and the software's author, the holder of the 00013 economic rights, and the successive licensors have only limited 00014 liability. 00015 00016 In this respect, the user's attention is drawn to the risks associated 00017 with loading, using, modifying and/or developing or reproducing the 00018 software by the user in light of its specific status of free software, 00019 that may mean that it is complicated to manipulate, and that also 00020 therefore means that it is reserved for developers and experienced 00021 professionals having in-depth computer knowledge. Users are therefore 00022 encouraged to load and test the software's suitability as regards their 00023 requirements in conditions enabling the security of their systems and/or 00024 data to be ensured and, more generally, to use and operate it in the 00025 same conditions as regards security. 00026 00027 The fact that you are presently reading this means that you have had 00028 knowledge of the CeCILL license and that you accept its terms. 00029 00030 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de 00031 l'Image). All rights reserved. See License.txt for details. 00032 00033 Version 1.0 05/09/2005 00034 *************************************************************************/ 00035 00036 #ifndef __IDVOL_IDO_H__ 00037 #define __IDVOL_IDO_H__ 00038 00039 00040 /* Types de volume 3d */ 00041 00042 #define VOL_CHAR (VOL | TY_CHAR) 00043 #define VOL_UCHAR (VOL | TY_UCHAR) 00044 #define VOL_SHORT (VOL | TY_SHORT) 00045 #define VOL_USHORT (VOL | TY_USHORT) 00046 #define VOL_LONG (VOL | TY_LONG) 00047 #define VOL_ULONG (VOL | TY_ULONG) 00048 #define VOL_FLOAT (VOL | TY_FLOAT) 00049 #define VOL_DOUBLE (VOL | TY_DOUBLE) 00050 #define VOL_COMPLEX (VOL | TY_COMPLEX) 00051 #define VOL_RGB (VOL | TY_RGB) 00052 #define VOL_COMPLEX_DOUBLE (VOL | TY_COMPLEX_DOUBLE) 00053 #define VOL_COMPLEX_FLOAT (VOL | TY_COMPLEX_FLOAT ) 00054 #define VOL_COMPLEX_CHAR (VOL | TY_COMPLEX_CHAR ) 00055 #define VOL_COMPLEX_UCHAR (VOL | TY_COMPLEX_UCHAR ) 00056 #define VOL_COMPLEX_SHORT (VOL | TY_COMPLEX_SHORT ) 00057 #define VOL_COMPLEX_USHORT (VOL | TY_COMPLEX_USHORT) 00058 #define VOL_COMPLEX_LONG (VOL | TY_COMPLEX_LONG ) 00059 #define VOL_COMPLEX_ULONG (VOL | TY_COMPLEX_ULONG ) 00060 #define VOL_BIT (VOL | TY_BIT ) 00061 #define VOL_POINTER (VOL | TY_POINTER ) 00062 00063 /***************************************************************/ 00064 00065 typedef void *** PPPVOLUME; 00066 typedef char *** PPPVOLUME_CHAR; 00067 typedef unsigned char *** PPPVOLUME_UCHAR; 00068 typedef float *** PPPVOLUME_FLOAT; 00069 typedef double *** PPPVOLUME_DOUBLE; 00070 typedef COMPLEX *** PPPVOLUME_COMPLEX; 00071 typedef RGB *** PPPVOLUME_RGB; 00072 typedef short *** PPPVOLUME_SHORT; 00073 typedef unsigned short *** PPPVOLUME_USHORT; 00074 typedef long *** PPPVOLUME_LONG; 00075 typedef unsigned long *** PPPVOLUME_ULONG; 00076 typedef COMPLEX_DOUBLE *** PPPVOLUME_COMPLEX_DOUBLE; 00077 typedef COMPLEX_FLOAT *** PPPVOLUME_COMPLEX_FLOAT; 00078 typedef COMPLEX_CHAR *** PPPVOLUME_COMPLEX_CHAR; 00079 typedef COMPLEX_UCHAR *** PPPVOLUME_COMPLEX_UCHAR; 00080 typedef COMPLEX_SHORT *** PPPVOLUME_COMPLEX_SHORT; 00081 typedef COMPLEX_USHORT *** PPPVOLUME_COMPLEX_USHORT; 00082 typedef COMPLEX_LONG *** PPPVOLUME_COMPLEX_LONG; 00083 typedef COMPLEX_ULONG *** PPPVOLUME_COMPLEX_ULONG; 00084 typedef PPPVOLUME_UCHAR PPPVOLUME_BIT; 00085 typedef void **** PPPVOLUME_POINTER; 00086 00087 /* structure VOLUME */ 00088 00089 typedef struct 00090 { 00091 int UsedNbZ; 00092 int UsedNbY; 00093 int UsedNbX; 00094 int subObject; 00095 int DimZ; 00096 int DimY; 00097 int DimX; 00098 int Numero; 00099 char *_message,*_fichier; 00100 int BitsPerPixel; /* nombre de bits reellement utilises */ 00101 int Type; /* IMPERATIVEMENT DERNIER DE LA STRUCTURE */ 00102 00103 } PRIVATE_VOLUME; 00104 00105 #define _IdVolPrivate(vol) ( ((PRIVATE_VOLUME*)(vol) )-1 ) 00106 00107 00108 #define IdVolDimX(volume_) ( (_IdVolPrivate(volume_) )->DimX) 00109 #define IdVolDimY(volume_) ( (_IdVolPrivate(volume_) )->DimY) 00110 #define IdVolDimZ(volume_) ( (_IdVolPrivate(volume_) )->DimZ) 00111 00112 #define IdVolUsedNbX(volume_) ( (_IdVolPrivate(volume_) )->UsedNbX) 00113 #define IdVolUsedNbY(volume_) ( (_IdVolPrivate(volume_) )->UsedNbY) 00114 #define IdVolUsedNbZ(volume_) ( (_IdVolPrivate(volume_) )->UsedNbZ) 00115 00116 #define IdVolSetUsedNbX(vol_,nb) ( _IdVolPrivate(vol_)->UsedNbX=(nb) ) 00117 #define IdVolGetUsedNbX(vol_) ( _IdVolPrivate(vol_)->UsedNbX) 00118 #define IdVolSetUsedNbY(vol_,nb) ( _IdVolPrivate(vol_)->UsedNbY=(nb) ) 00119 #define IdVolGetUsedNbY(vol_) ( _IdVolPrivate(vol_)->UsedNbY) 00120 #define IdVolSetUsedNbZ(vol_,nb) ( _IdVolPrivate(vol_)->UsedNbZ=(nb) ) 00121 #define IdVolGetUsedNbZ(vol_) ( _IdVolPrivate(vol_)->UsedNbZ) 00122 00123 #define IdVolType(volume_) ( (_IdVolPrivate(volume_) )->Type) 00124 00125 #ifdef SWIG 00126 int IdVolDimX(PPPVOLUME); 00127 int IdVolDimY(PPPVOLUME); 00128 int IdVolDimZ(PPPVOLUME); 00129 00130 int IdVolUsedNbX(PPPVOLUME); 00131 int IdVolUsedNbY(PPPVOLUME); 00132 int IdVolUsedNbZ(PPPVOLUME); 00133 00134 int IdVolGetUsedNbX(PPPVOLUME); 00135 int IdVolGetUsedNbY(PPPVOLUME); 00136 int IdVolGetUsedNbZ(PPPVOLUME); 00137 00138 void IdVolSetUsedNbX(PPPVOLUME,int); 00139 void IdVolSetUsedNbY(PPPVOLUME,int); 00140 void IdVolSetUsedNbZ(PPPVOLUME,int); 00141 #endif 00142 // SWIG 00143 00144 00145 00146 #endif 00147