Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Common/vtkSystemIncludes.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSystemIncludes.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00027 #ifndef __vtkSystemIncludes_h
00028 #define __vtkSystemIncludes_h
00029 
00030 /* first include the local configuration for this machine */
00031 #define __VTK_SYSTEM_INCLUDES__INSIDE
00032 #include "vtkWin32Header.h"
00033 #undef __VTK_SYSTEM_INCLUDES__INSIDE
00034 
00035 // The language wrapper files do not need the real streams.  They
00036 // define VTK_STREAMS_FWD_ONLY so that the streams are only
00037 // forward-declared.  This significantly improves compile time on some
00038 // platforms.
00039 #if defined(VTK_STREAMS_FWD_ONLY)
00040 # include "vtkIOStreamFwd.h" // Forward-declare the C++ streams.
00041 #else
00042 # include "vtkIOStream.h"    // Include the real C++ streams.
00043 #endif
00044 
00045 // define the type of floating point interface used for old and new versions
00046 // of VTK VTK42 and older use float and VTK 44 and newer use double for most
00047 // of the API calls
00048 #define vtkFloatingPointType vtkFloatingPointType 
00049 typedef double vtkFloatingPointType;
00050 
00051 #define __VTK_SYSTEM_INCLUDES__INSIDE
00052 #include "vtkIdType.h"            // Define vtkIdType and its stream operators.
00053 #include "vtkOStreamWrapper.h"    // Include the ostream wrapper.
00054 #include "vtkOStrStreamWrapper.h" // Include the ostrstream wrapper.
00055 #undef __VTK_SYSTEM_INCLUDES__INSIDE
00056 
00057 // Include generic stuff.
00058 #include <stdio.h>
00059 #include <stdlib.h>
00060 #include <string.h>
00061 
00062 // Some constants used throughout the code
00063 #define VTK_LARGE_FLOAT 1.0e+38F
00064 #ifdef VTK_USE_64BIT_IDS
00065 #  ifdef _WIN32
00066 #    define VTK_LARGE_ID 9223372036854775807i64 // 2^63 - 1
00067 #  else
00068 #    define VTK_LARGE_ID 9223372036854775807LL // 2^63 - 1
00069 #  endif
00070 #else
00071 #  define VTK_LARGE_ID 2147483647 // 2^31 - 1
00072 #endif
00073 
00074 #define VTK_LARGE_INTEGER 2147483647 // 2^31 - 1
00075 
00076 // These types are returned by GetDataType to indicate pixel type.
00077 #define VTK_VOID            0
00078 #define VTK_BIT             1 
00079 #define VTK_CHAR            2
00080 #define VTK_UNSIGNED_CHAR   3
00081 #define VTK_SHORT           4
00082 #define VTK_UNSIGNED_SHORT  5
00083 #define VTK_INT             6
00084 #define VTK_UNSIGNED_INT    7
00085 #define VTK_LONG            8
00086 #define VTK_UNSIGNED_LONG   9
00087 #define VTK_FLOAT          10
00088 #define VTK_DOUBLE         11 
00089 #define VTK_ID_TYPE        12
00090 
00091 // These types are not currently supported by GetDataType, but are 
00092 // for completeness.
00093 #define VTK_STRING         13
00094 #define VTK_OPAQUE         14
00095 
00096 // Some constant required for correct template performance
00097 #define VTK_BIT_MIN            0
00098 #define VTK_BIT_MAX            1
00099 #define VTK_CHAR_MIN          -128
00100 #define VTK_CHAR_MAX           127
00101 #define VTK_UNSIGNED_CHAR_MIN  0
00102 #define VTK_UNSIGNED_CHAR_MAX  255
00103 #define VTK_SHORT_MIN         -32768
00104 #define VTK_SHORT_MAX          32767
00105 #define VTK_UNSIGNED_SHORT_MIN 0
00106 #define VTK_UNSIGNED_SHORT_MAX 65535
00107 #define VTK_INT_MIN          (-VTK_LARGE_INTEGER-1)
00108 #define VTK_INT_MAX            VTK_LARGE_INTEGER
00109 #define VTK_UNSIGNED_INT_MIN   0
00110 #define VTK_UNSIGNED_INT_MAX   4294967295UL
00111 #define VTK_LONG_MIN         (-VTK_LARGE_INTEGER-1)
00112 #define VTK_LONG_MAX           VTK_LARGE_INTEGER
00113 #define VTK_UNSIGNED_LONG_MIN  0
00114 #define VTK_UNSIGNED_LONG_MAX  4294967295UL
00115 #define VTK_FLOAT_MIN         -VTK_LARGE_FLOAT
00116 #define VTK_FLOAT_MAX          VTK_LARGE_FLOAT
00117 #define VTK_DOUBLE_MIN        -1.0e+299
00118 #define VTK_DOUBLE_MAX         1.0e+299
00119 
00120 // These types are returned to distinguish data object types
00121 #define VTK_POLY_DATA                       0
00122 #define VTK_STRUCTURED_POINTS               1
00123 #define VTK_STRUCTURED_GRID                 2
00124 #define VTK_RECTILINEAR_GRID                3
00125 #define VTK_UNSTRUCTURED_GRID               4
00126 #define VTK_PIECEWISE_FUNCTION              5
00127 #define VTK_IMAGE_DATA                      6
00128 #define VTK_DATA_OBJECT                     7
00129 #define VTK_DATA_SET                        8
00130 #define VTK_POINT_SET                       9
00131 #define VTK_UNIFORM_GRID                   10
00132 #define VTK_COMPOSITE_DATA_SET             11
00133 #define VTK_HIERARCHICAL_DATA_SET          12
00134 #define VTK_MULTI_BLOCK_DATA_SET           13
00135 #define VTK_HIERARCHICAL_BOX_DATA_SET      14
00136 
00137 // These types define error codes for vtk functions
00138 #define VTK_OK                 1
00139 #define VTK_ERROR              2
00140 
00141 // These types define different text properties
00142 #define VTK_ARIAL     0
00143 #define VTK_COURIER   1
00144 #define VTK_TIMES     2
00145 
00146 #define VTK_TEXT_LEFT     0
00147 #define VTK_TEXT_CENTERED 1
00148 #define VTK_TEXT_RIGHT    2
00149 
00150 #define VTK_TEXT_BOTTOM 0
00151 #define VTK_TEXT_TOP    2
00152 
00153 #define VTK_TEXT_GLOBAL_ANTIALIASING_SOME 0
00154 #define VTK_TEXT_GLOBAL_ANTIALIASING_NONE 1
00155 #define VTK_TEXT_GLOBAL_ANTIALIASING_ALL 2
00156 
00157 #define VTK_LUMINANCE       1
00158 #define VTK_LUMINANCE_ALPHA 2
00159 #define VTK_RGB             3
00160 #define VTK_RGBA            4
00161 
00162 #define VTK_COLOR_MODE_DEFAULT 0
00163 #define VTK_COLOR_MODE_MAP_SCALARS 1
00164 
00165 // Constants for InterpolationType
00166 #define VTK_NEAREST_INTERPOLATION       0
00167 #define VTK_LINEAR_INTERPOLATION        1
00168 
00169 // For volume rendering
00170 #define VTK_MAX_VRCOMP                  4
00171 
00172 // For multithreading
00173 
00174 // The maximum number of threads allowed
00175 #ifdef VTK_USE_SPROC
00176 #define VTK_MAX_THREADS              32
00177 #endif
00178 
00179 #ifdef VTK_USE_PTHREADS
00180 #define VTK_MAX_THREADS              32
00181 #endif
00182 
00183 #ifdef VTK_USE_WIN32_THREADS
00184 #define VTK_MAX_THREADS              8
00185 #endif
00186 
00187 #ifndef VTK_USE_WIN32_THREADS
00188 #ifndef VTK_USE_SPROC
00189 #ifndef VTK_USE_PTHREADS
00190 #define VTK_MAX_THREADS              1
00191 #endif
00192 #endif
00193 #endif
00194 
00195 // If VTK_USE_PTHREADS is defined, then the multithreaded
00196 // function is of type void *, and returns NULL
00197 // Otherwise the type is void which is correct for WIN32
00198 // and SPROC
00199 #ifdef VTK_USE_PTHREADS
00200 #define VTK_THREAD_RETURN_VALUE  NULL
00201 #define VTK_THREAD_RETURN_TYPE   void *
00202 #endif
00203 
00204 #ifdef VTK_USE_WIN32_THREADS
00205 #define VTK_THREAD_RETURN_VALUE 0
00206 #define VTK_THREAD_RETURN_TYPE DWORD __stdcall
00207 #endif
00208 
00209 #if !defined(VTK_USE_PTHREADS) && !defined(VTK_USE_WIN32_THREADS)
00210 #define VTK_THREAD_RETURN_VALUE
00211 #define VTK_THREAD_RETURN_TYPE void
00212 #endif
00213 
00214 // For encoding
00215 
00216 #define VTK_ENCODING_NONE         0 // to specify that no encoding should occur
00217 #define VTK_ENCODING_US_ASCII     1
00218 #define VTK_ENCODING_UNICODE      2
00219 #define VTK_ENCODING_UTF_8        3
00220 #define VTK_ENCODING_ISO_8859_1   4
00221 #define VTK_ENCODING_ISO_8859_2   5
00222 #define VTK_ENCODING_ISO_8859_3   6
00223 #define VTK_ENCODING_ISO_8859_4   7
00224 #define VTK_ENCODING_ISO_8859_5   8
00225 #define VTK_ENCODING_ISO_8859_6   9
00226 #define VTK_ENCODING_ISO_8859_7   10
00227 #define VTK_ENCODING_ISO_8859_8   11
00228 #define VTK_ENCODING_ISO_8859_9   12
00229 #define VTK_ENCODING_ISO_8859_10  13
00230 #define VTK_ENCODING_ISO_8859_11  14
00231 #define VTK_ENCODING_ISO_8859_12  15
00232 #define VTK_ENCODING_ISO_8859_13  16
00233 #define VTK_ENCODING_ISO_8859_14  17
00234 #define VTK_ENCODING_ISO_8859_15  18
00235 #define VTK_ENCODING_ISO_8859_16  19
00236 #define VTK_ENCODING_UNKNOWN      20  // leave this one at the end
00237 
00238 #endif