r87: Upgraded from MPI to MPI++
[ctsim.git] / include / ct.h
1 /*****************************************************************************
2 **  This is part of the CTSim program
3 **  Copyright (C) 1983-2000 Kevin Rosenberg
4 **
5 **  $Id: ct.h,v 1.11 2000/06/07 10:12:09 kevin Exp $
6 **  $Log: ct.h,v $
7 **  Revision 1.11  2000/06/07 10:12:09  kevin
8 **  Upgraded from MPI to MPI++
9 **
10 **  Revision 1.10  2000/06/07 07:43:39  kevin
11 **  *** empty log message ***
12 **
13 **  Revision 1.9  2000/06/07 03:49:54  kevin
14 **  *** empty log message ***
15 **
16 **  Revision 1.8  2000/06/07 02:30:27  kevin
17 **  Added C++ image files
18 **
19 **  Revision 1.7  2000/06/07 00:59:38  kevin
20 **  added imagefiles
21 **
22 **  Revision 1.6  2000/05/24 22:48:17  kevin
23 **  First functional version of SDF library for X-window
24 **
25 **  Revision 1.5  2000/05/11 01:04:44  kevin
26 **  Added Microsoft Windows compatibility
27 **
28 **  Revision 1.4  2000/05/03 19:51:41  kevin
29 **  function renaming for phantoms and phantom elements
30 **
31 **  Revision 1.3  2000/04/30 19:17:35  kevin
32 **  Set up include files for conditional SGP
33 **
34 **  Revision 1.2  2000/04/28 14:14:16  kevin
35 **  *** empty log message ***
36 **
37 **
38 **  This program is free software; you can redistribute it and/or modify
39 **  it under the terms of the GNU General Public License (version 2) as
40 **  published by the Free Software Foundation.
41 **
42 **  This program is distributed in the hope that it will be useful,
43 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
44 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
45 **  GNU General Public License for more details.
46 **
47 **  You should have received a copy of the GNU General Public License
48 **  along with this program; if not, write to the Free Software
49 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
50 ******************************************************************************/
51 /*---------------------------------------------------------------------*/
52 /*                  HEADER FILE FOR TOMOGRAPY SYSTEM                   */
53 /*---------------------------------------------------------------------*/
54
55 #ifndef CT_H
56 #define CT_H
57
58 #ifdef _WIN32
59   typedef long off_t;
60   #define HAVE_STRING_H 1
61   #include <fcntl.h>
62   #define snprintf _snprintf
63   #define vsnprintf _vsnprintf
64   #define strcasecmp stricmp
65   #define strncasecmp strnicmp
66 #endif
67
68 #ifdef HAVE_CONFIG_H
69   #include <config.h>
70 #endif
71 #ifdef HAVE_PNG
72   #include "png.h"
73 #endif
74 #ifdef HAVE_G2_H
75   #ifdef __cplusplus
76   extern "C" { 
77     #include "g2.h" 
78   }
79   #else
80   #include "g2.h"
81   #endif
82   #ifdef HAVE_X11
83     #ifdef __cplusplus
84       extern "C" {
85         #include "g2_X11.h"
86       }
87     #else
88         #include "g2_X11.h"
89     #endif
90   #endif
91 #endif
92 #ifdef HAVE_STDIO_H
93 #include <stdio.h>
94 #endif
95 #ifdef HAVE_STRING_H
96 #include <string.h>
97 #endif
98 #ifdef HAVE_STDDEF_H
99 #include <stddef.h>
100 #endif
101 #ifdef HAVE_STDLIB_H
102 #include <stdlib.h>
103 #endif
104 #ifdef HAVE_STDARG_H
105 #include <stdarg.h>
106 #endif
107 #ifdef  HAVE_SYS_TYPES_H
108 #include <sys/types.h>
109 #endif
110 #ifdef HAVE_SYS_STAT_H
111 #include <sys/stat.h>
112 #endif
113 #ifdef HAVE_CTYPE_H
114 #include <ctype.h>
115 #endif
116 #ifdef HAVE_MATH_H
117 #include <math.h>
118 #endif
119 #ifdef HAVE_SYS_FCNTL_H
120 #include <sys/fcntl.h>
121 #endif
122 #ifdef HAVE_FCNTL_H
123 #include <fcntl.h>
124 #endif
125 #if defined(HAVE_GETOPT_H) || defined(HAVE_GETOPT_LONG)
126 #include <getopt.h>
127 #endif
128 #ifdef HAVE_UNISTD_H
129 #include <unistd.h>
130 #endif
131 #ifdef HAVE_SETJMP_H
132 #include <setjmp.h>
133 #endif
134 #ifdef HAVE_SYS_PARAM_H
135 #include <sys/param.h>          /* for htonl on FreeBSD */
136 #endif
137 #ifdef HAVE_NETINET_IN_H
138 #include <netinet/in.h>         /* for htonl on Linux/Solaris */
139 #endif
140 #ifdef HAVE_INTTYPES_H
141 #include <inttypes.h>           /* for htonl on Solaris */
142 #endif
143 #ifdef HAVE_STDINT_H
144 #include <stdint.h>             /* Standard ints on Linux */
145 #endif
146
147 #ifdef HAVE_MPI
148 #include "mpi++.h"
149 #endif
150
151 #include "kstddef.h"
152 #include "kmath.h"
153 #include "keyboard.h"
154 #include "cio.h"
155
156 #ifdef HAVE_SGP
157   #include "ezplot.h"
158   #include "sgp.h"
159 #endif
160
161 #ifdef __cplusplus
162   #include <iostream>
163   #include <string>
164
165   using namespace std;
166
167   #include "array2d.h"
168   #include "imagefile.h"
169 #endif
170
171 #include "ir.h"
172
173 #endif
174