00001 /************************************************************************* 00002 * $Id: object.h,v 1.9 2005/09/22 11:42:36 yougz 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 #ifndef _OBJECT_H 00036 #define _OBJECT_H 00037 00038 #include <stdlib.h> 00039 #include <idseq.h> 00040 #include <idvol.h> 00041 #include <idsig.h> 00042 #include <idmatric.h> 00043 00046 #define WATER 0 00047 #define FAT 1 00048 00050 #define DECWATER 0.0 00051 #define DECFAT 150.0 00052 00053 #define RO 0 00054 #define T1 1 00055 #define T2 2 00056 00057 00058 00060 typedef struct _Object3D { 00062 int x,y,z; 00064 float lx,ly,lz; 00066 int nbcomponent; 00068 int component; 00070 int nbparam; 00072 PPPVOLUME_FLOAT deltaB0; 00074 PPPPSEQUENCE_USHORT values; 00076 PSIGNAL_FLOAT chemshift; 00078 PPPVOLUME_FLOAT fielddefault; 00079 } OBJECT3D; 00080 00081 /**************************************** 00082 * Function prototypes 00083 *****************************************/ 00084 OBJECT3D* GetTestObject2D (int,int,int,double); 00085 OBJECT3D* GetTestObject3D (int,int,int,int,double); 00086 OBJECT3D* AllocObject (int,int,int,int,int); 00087 void FreeObject (OBJECT3D*); 00088 void WriteObject (OBJECT3D*,char *); 00089 void SaveObjectAsVolFloat (OBJECT3D*); 00090 OBJECT3D* ReadObject (char *); 00091 void SetObjectSize (OBJECT3D*, float, float, float); 00092 void SetObjectDeltaB0 (OBJECT3D*, double); 00093 void SetObjectChemicalShift (OBJECT3D*,float,int); 00094 void SetObjectActiveComponent(OBJECT3D*, int); 00095 void SetObjectPoint (OBJECT3D*,int,int,int,int,int,int,int); 00096 #endif