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