00001 /************************************************************************* 00002 * $Id: simri3d.h,v 1.18 2005/09/22 11:42:37 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 _SIMRI3D_H 00036 #define _SIMRI3D_H 00037 00038 #include <stdio.h> 00039 #include <math.h> 00040 #ifdef SUNOS5 00041 #define M_PI 3.14159265358979323846 00042 #endif 00043 00044 #ifdef _MSC_VER 00045 #define M_PI 3.14159265358979323846 00046 #endif 00047 00048 #ifndef SWIG 00049 00050 #ifdef _MSC_VER 00051 #define INLINE __inline 00052 #else 00053 #define INLINE inline 00054 #endif 00055 00056 #endif 00057 00058 #define G 267.522128e+6 /* Giromagnetic moment of the proton in rad/sec/Tesla*/ 00059 #define G_rad_T 267.522128e+6 /* Giromagnetic moment of the proton in rad/sec/Tesla*/ 00060 #define G_kHz_G 4.2577469 /* Giromagnetic moment of the proton in kHz/Gauss */ 00061 #define G_rad_G 26752.2128 /* Giromagnetic moment of the proton in rad/sec/Gauss*/ 00062 #define G_Hz_T 4.2577469e+7 /* Giromagnetic moment of the proton in Hz/Tesla */ 00063 00064 #define NONE 0 00065 #define PHASE 1 00066 #define FREQUENCY 2 00067 #define PLUS 1 00068 #define MINUS -1 00069 #define REPLACE -1 00070 #define TAILLE_NOM 200 00071 00072 #ifndef TRUE 00073 #define TRUE 1 00074 #endif 00075 #ifndef FALSE 00076 #define FALSE 0 00077 #endif 00078 00079 #ifndef SEEK_CUR 00080 #define SEEK_CUR 1 00081 #endif 00082 00083 #ifndef MAX 00084 #define MAX(x,y) (x > y ? x : y) 00085 #endif 00086 #define RINT(x,y) (y=floor(x),(x-y > (double) 0.5 ? y+1 : y)) 00087 00088 00089 #ifndef SWIG 00090 00091 #ifdef _USRDLL 00092 #define FPRINTF ConsoleOut 00093 void ConsoleOut(FILE*, ...); /* used for old wrapping in tcl */ 00094 #else 00095 #define FPRINTF fprintf 00096 #endif 00097 00098 #endif 00099 00100 #endif