a0383afae73797de76304cb78b402b2b2031080e
[ctsim.git] / include / ct.h
1 /*****************************************************************************
2 ** FILE IDENTIFICATION
3 **
4 **   Name:          ct.h
5 **   Purpose:       Master header file for CTSim
6 **   Programmer:    Kevin Rosenberg
7 **   Date Started:  Aug 1984
8 **
9 **  This is part of the CTSim program
10 **  Copyright (C) 1983-2000 Kevin Rosenberg
11 **
12 **  $Id: ct.h,v 1.31 2000/08/19 22:59:06 kevin Exp $
13 **
14 **  This program is free software; you can redistribute it and/or modify
15 **  it under the terms of the GNU General Public License (version 2) as
16 **  published by the Free Software Foundation.
17 **
18 **  This program is distributed in the hope that it will be useful,
19 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
20 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 **  GNU General Public License for more details.
22 **
23 **  You should have received a copy of the GNU General Public License
24 **  along with this program; if not, write to the Free Software
25 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 ******************************************************************************/
27
28 #ifndef CT_H
29 #define CT_H
30
31 #ifdef _WIN32
32   extern "C" {int strcasecmp(const char*, const char*);}
33   typedef long off_t;
34   #define HAVE_STRING_H 1
35   #include <fcntl.h>
36   #define snprintf _snprintf
37   #define vsnprintf _vsnprintf
38   #define strcasecmp stricmp
39   #define strncasecmp strnicmp
40 #endif
41
42 #ifdef HAVE_CONFIG_H
43   #include <config.h>
44 #endif
45 #ifdef HAVE_DMALLOC
46 #include <dmalloc.h>
47 #endif
48 #ifdef HAVE_PNG
49   #include "png.h"
50 #endif
51 #ifdef HAVE_G2_H
52 extern "C" { 
53 #include "g2.h" 
54 }
55 #ifdef HAVE_X11
56 extern "C" {
57 #include "g2_X11.h"
58 }
59 #endif
60 #endif
61 #ifdef HAVE_STDIO_H
62 #include <stdio.h>
63 #endif
64 #ifdef HAVE_STRING_H
65 #include <string.h>
66 #endif
67 #ifdef HAVE_STDDEF_H
68 #include <stddef.h>
69 #endif
70 #ifdef HAVE_STDLIB_H
71 #include <stdlib.h>
72 #endif
73 #ifdef HAVE_STDARG_H
74 #include <stdarg.h>
75 #endif
76 #ifdef  HAVE_SYS_TYPES_H
77 #include <sys/types.h>
78 #endif
79 #ifdef HAVE_SYS_STAT_H
80 #include <sys/stat.h>
81 #endif
82 #ifdef HAVE_CTYPE_H
83 #include <ctype.h>
84 #endif
85 #ifdef HAVE_MATH_H
86 #include <math.h>
87 #endif
88 #ifdef HAVE_SYS_FCNTL_H
89 #include <sys/fcntl.h>
90 #endif
91 #ifdef HAVE_FCNTL_H
92 #include <fcntl.h>
93 #endif
94 #if defined(HAVE_GETOPT_H) || defined(HAVE_GETOPT_LONG)
95 #include <getopt.h>
96 #endif
97 #ifdef HAVE_UNISTD_H
98 #include <unistd.h>
99 #endif
100 #ifdef HAVE_SETJMP_H
101 #include <setjmp.h>
102 #endif
103 #ifdef HAVE_SYS_PARAM_H
104 #include <sys/param.h>          /* for htonl on FreeBSD */
105 #endif
106 #ifdef HAVE_NETINET_IN_H
107 #include <netinet/in.h>         /* for htonl on Linux/Solaris */
108 #endif
109 #ifdef HAVE_INTTYPES_H
110 #include <inttypes.h>           /* for htonl on Solaris */
111 #endif
112 #ifdef HAVE_STDINT_H
113 #include <stdint.h>             /* Standard ints on Linux */
114 #endif
115 #ifdef HAVE_ASSERT_H
116 #include <assert.h>
117 #endif
118
119 #ifdef HAVE_FFTW
120 #include <rfftw.h>
121 #include <fftw.h>
122 #endif
123
124 #include <fstream>
125 #include <iostream>
126 #include <sstream>
127 #include <string>
128 #include <iterator>
129 #include <algorithm>
130 #include <exception>
131 #include <stdexcept>
132 #include <memory>
133 #include <complex>
134
135 using namespace std;
136
137 #ifdef HAVE_MPI
138 #include "mpi++.h"
139 #include "mpiworld.h"
140 #endif
141
142 #include "ctsupport.h"
143 #include "fnetorderstream.h"
144
145 #ifdef HAVE_SGP
146   #include "ezplot.h"
147   #include "sgp.h"
148 #endif
149
150 #include "array2d.h"
151 #include "array2dfile.h"
152 #include "fnetorderstream.h"
153 #include "imagefile.h"
154 #include "phantom.h"
155 #include "scanner.h"
156 #include "backprojectors.h"
157 #include "filter.h"
158 #include "procsignal.h"
159 #include "projections.h"
160 #include "trace.h"
161
162
163 #endif
164