84f1e917c1279a33ec97dd479ef3522a6fc759f5
[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-2009 Kevin Rosenberg
11 **
12 **  This program is free software; you can redistribute it and/or modify
13 **  it under the terms of the GNU General Public License (version 2) as
14 **  published by the Free Software Foundation.
15 **
16 **  This program is distributed in the hope that it will be useful,
17 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
18 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 **  GNU General Public License for more details.
20 **
21 **  You should have received a copy of the GNU General Public License
22 **  along with this program; if not, write to the Free Software
23 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24 ******************************************************************************/
25
26 #ifndef CT_H
27 #define CT_H
28
29 #define NO_MAIN 1    // filter out all old main blocks
30
31 #ifdef MSVC
32 #include "msvc_compat.h"
33 #endif
34
35 #ifdef HAVE_CONFIG_H
36   #include <config.h>
37 #endif
38
39 #ifdef _DEBUG
40 #undef DEBUG
41 #define DEBUG 1
42 #endif
43
44 #define HAVE_ANSI_CPP 1
45 #ifdef HAVE_ANSI_CPP
46 #include <complex>
47 #include <cmath>
48 #include <cstdio>
49 #include <cctype>
50 #include <cstring>
51 #include <cstddef>
52 #include <cstdarg>
53 #include <cstdlib>
54
55 #if defined(MSVC) || HAVE_SSTREAM
56 #include <sstream>
57 #else
58 #include <sstream_subst>
59 #endif
60
61 #include <fstream>
62 #include <iostream>
63 #include <string>
64 #include <iterator>
65 #include <algorithm>
66 #include <exception>
67 #include <stdexcept>
68 #include <memory>
69
70 #else
71
72 #ifdef HAVE_CTYPE_H
73 #include <ctype.h>
74 #endif
75 #ifdef HAVE_MATH_H
76 #include <math.h>
77 #endif
78 #ifdef HAVE_STDIO_H
79 #include <stdio.h>
80 #endif
81 #ifdef HAVE_STRING_H
82 #include <string.h>
83 #endif
84 #ifdef HAVE_STDDEF_H
85 #include <stddef.h>
86 #endif
87 #ifdef HAVE_STDLIB_H
88 #include <stdlib.h>
89 #endif
90 #ifdef HAVE_STDARG_H
91 #include <stdarg.h>
92 #endif
93
94 #endif
95
96
97 #ifdef HAVE_DMALLOC
98 #include <dmalloc.h>
99 #endif
100 #ifdef HAVE_UNISTD_H
101 #include <unistd.h>
102 #endif
103 #ifdef HAVE_PNG
104   #include "png.h"
105 #endif
106 #ifdef HAVE_G2_H
107 extern "C" {
108 #include "g2.h"
109 }
110 #ifdef HAVE_X11
111 extern "C" {
112 #include "g2_X11.h"
113 }
114 #endif
115 #endif
116
117
118 #ifdef  HAVE_SYS_TYPES_H
119 #include <sys/types.h>
120 #endif
121 #ifdef HAVE_SYS_STAT_H
122 #include <sys/stat.h>
123 #endif
124 #ifdef HAVE_SYS_FCNTL_H
125 #include <sys/fcntl.h>
126 #endif
127 #ifdef HAVE_FCNTL_H
128 #include <fcntl.h>
129 #endif
130 #if defined(HAVE_GETOPT_H) || defined(HAVE_GETOPT_LONG)
131 #include <getopt.h>
132 #endif
133 #ifdef HAVE_SETJMP_H
134 #include <setjmp.h>
135 #endif
136 #ifdef HAVE_SYS_PARAM_H
137 #include <sys/param.h>          /* for htonl on FreeBSD */
138 #endif
139 #ifdef HAVE_NETINET_IN_H
140 #include <netinet/in.h>         /* for htonl on Linux/Solaris */
141 #endif
142 #ifdef HAVE_INTTYPES_H
143 #include <inttypes.h>           /* for htonl on Solaris */
144 #endif
145 #ifdef HAVE_STDINT_H
146 #include <stdint.h>             /* Standard ints on Linux */
147 #endif
148 #ifdef HAVE_ASSERT_H
149 #include <assert.h>
150 #endif
151
152
153 #ifdef HAVE_FFTW
154 #include <fftw3.h>
155 #define HAVE_FFT 1
156 #endif
157
158 #ifdef HAVE_MPI
159 #include "mpi++.h"
160 #include "mpiworld.h"
161 #endif
162
163 #include "ctsupport.h"
164 #include "fnetorderstream.h"
165
166 #ifdef HAVE_SGP
167   #include "ezplot.h"
168   #include "sgp.h"
169 #endif
170
171 #include "array2d.h"
172 #include "array2dfile.h"
173 #include "fnetorderstream.h"
174 #include "imagefile.h"
175 #include "phantom.h"
176 #include "scanner.h"
177 #include "backprojectors.h"
178 #include "filter.h"
179 #include "fourier.h"
180 #include "procsignal.h"
181 #include "projections.h"
182 #include "reconstruct.h"
183 #include "plotfile.h"
184 #include "trace.h"
185
186 #include "ctglobals.h"
187
188 #endif
189