vtkConstants.py 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. """
  2. This file is obsolete.
  3. All the constants are part of the base vtk module.
  4. """
  5. # Some constants used throughout code
  6. VTK_FLOAT_MAX = 1.0e+38
  7. VTK_INT_MAX = 2147483647 # 2^31 - 1
  8. # These types are returned by GetDataType to indicate pixel type.
  9. VTK_VOID = 0
  10. VTK_BIT = 1
  11. VTK_CHAR = 2
  12. VTK_SIGNED_CHAR =15
  13. VTK_UNSIGNED_CHAR = 3
  14. VTK_SHORT = 4
  15. VTK_UNSIGNED_SHORT = 5
  16. VTK_INT = 6
  17. VTK_UNSIGNED_INT = 7
  18. VTK_LONG = 8
  19. VTK_UNSIGNED_LONG = 9
  20. VTK_FLOAT =10
  21. VTK_DOUBLE =11
  22. VTK_ID_TYPE =12
  23. # These types are not currently supported by GetDataType, but are
  24. # for completeness.
  25. VTK_STRING =13
  26. VTK_OPAQUE =14
  27. VTK_LONG_LONG =16
  28. VTK_UNSIGNED_LONG_LONG =17
  29. # These types are required by vtkVariant and vtkVariantArray
  30. VTK_VARIANT =20
  31. VTK_OBJECT =21
  32. # Some constant required for correct template performance
  33. VTK_BIT_MIN = 0
  34. VTK_BIT_MAX = 1
  35. VTK_CHAR_MIN = -128
  36. VTK_CHAR_MAX = 127
  37. VTK_UNSIGNED_CHAR_MIN = 0
  38. VTK_UNSIGNED_CHAR_MAX = 255
  39. VTK_SHORT_MIN = -32768
  40. VTK_SHORT_MAX = 32767
  41. VTK_UNSIGNED_SHORT_MIN = 0
  42. VTK_UNSIGNED_SHORT_MAX = 65535
  43. VTK_INT_MIN = (-VTK_INT_MAX-1)
  44. VTK_INT_MAX = VTK_INT_MAX
  45. #VTK_UNSIGNED_INT_MIN = 0
  46. #VTK_UNSIGNED_INT_MAX = 4294967295
  47. VTK_LONG_MIN = (-VTK_INT_MAX-1)
  48. VTK_LONG_MAX = VTK_INT_MAX
  49. #VTK_UNSIGNED_LONG_MIN = 0
  50. #VTK_UNSIGNED_LONG_MAX = 4294967295
  51. VTK_FLOAT_MIN = -VTK_FLOAT_MAX
  52. VTK_FLOAT_MAX = VTK_FLOAT_MAX
  53. VTK_DOUBLE_MIN = -1.0e+99
  54. VTK_DOUBLE_MAX = 1.0e+99
  55. # These types are returned to distinguish dataset types
  56. VTK_POLY_DATA = 0
  57. VTK_STRUCTURED_POINTS = 1
  58. VTK_STRUCTURED_GRID = 2
  59. VTK_RECTILINEAR_GRID = 3
  60. VTK_UNSTRUCTURED_GRID = 4
  61. VTK_PIECEWISE_FUNCTION = 5
  62. VTK_IMAGE_DATA = 6
  63. VTK_DATA_OBJECT = 7
  64. VTK_DATA_SET = 8
  65. VTK_POINT_SET = 9
  66. VTK_UNIFORM_GRID = 10
  67. VTK_COMPOSITE_DATA_SET = 11
  68. VTK_MULTIGROUP_DATA_SET = 12 # OBSOLETE
  69. VTK_MULTIBLOCK_DATA_SET = 13
  70. VTK_HIERARCHICAL_DATA_SET = 14 # OBSOLETE
  71. VTK_HIERARCHICAL_BOX_DATA_SET = 15
  72. VTK_GENERIC_DATA_SET = 16
  73. VTK_HYPER_OCTREE = 17
  74. VTK_TEMPORAL_DATA_SET = 18
  75. VTK_TABLE = 19
  76. VTK_GRAPH = 20
  77. VTK_TREE = 21
  78. VTK_SELECTION = 22
  79. # These types define error codes for vtk functions
  80. VTK_OK = 1
  81. VTK_ERROR = 2
  82. # These types define different text properties
  83. VTK_ARIAL = 0
  84. VTK_COURIER = 1
  85. VTK_TIMES = 2
  86. VTK_UNKNOWN_FONT = 3
  87. VTK_TEXT_LEFT = 0
  88. VTK_TEXT_CENTERED = 1
  89. VTK_TEXT_RIGHT = 2
  90. VTK_TEXT_BOTTOM = 0
  91. VTK_TEXT_TOP = 2
  92. VTK_TEXT_GLOBAL_ANTIALIASING_SOME = 0
  93. VTK_TEXT_GLOBAL_ANTIALIASING_NONE = 1
  94. VTK_TEXT_GLOBAL_ANTIALIASING_ALL = 2
  95. VTK_LUMINANCE = 1
  96. VTK_LUMINANCE_ALPHA = 2
  97. VTK_RGB = 3
  98. VTK_RGBA = 4
  99. VTK_COLOR_MODE_DEFAULT = 0
  100. VTK_COLOR_MODE_MAP_SCALARS = 1
  101. # Constants for InterpolationType
  102. VTK_NEAREST_INTERPOLATION = 0
  103. VTK_LINEAR_INTERPOLATION = 1
  104. # For volume rendering
  105. VTK_MAX_VRCOMP = 4
  106. # These types define the 17 linear VTK Cell Types
  107. # See Filtering/vtkCellType.h
  108. # Linear cells
  109. VTK_EMPTY_CELL = 0
  110. VTK_VERTEX = 1
  111. VTK_POLY_VERTEX = 2
  112. VTK_LINE = 3
  113. VTK_POLY_LINE = 4
  114. VTK_TRIANGLE = 5
  115. VTK_TRIANGLE_STRIP = 6
  116. VTK_POLYGON = 7
  117. VTK_PIXEL = 8
  118. VTK_QUAD = 9
  119. VTK_TETRA = 10
  120. VTK_VOXEL = 11
  121. VTK_HEXAHEDRON = 12
  122. VTK_WEDGE = 13
  123. VTK_PYRAMID = 14
  124. VTK_PENTAGONAL_PRISM = 15
  125. VTK_HEXAGONAL_PRISM = 16
  126. # Quadratic, isoparametric cells
  127. VTK_QUADRATIC_EDGE = 21
  128. VTK_QUADRATIC_TRIANGLE = 22
  129. VTK_QUADRATIC_QUAD = 23
  130. VTK_QUADRATIC_TETRA = 24
  131. VTK_QUADRATIC_HEXAHEDRON = 25
  132. VTK_QUADRATIC_WEDGE = 26
  133. VTK_QUADRATIC_PYRAMID = 27
  134. VTK_BIQUADRATIC_QUAD = 28
  135. VTK_TRIQUADRATIC_HEXAHEDRON = 29
  136. VTK_QUADRATIC_LINEAR_QUAD = 30
  137. VTK_QUADRATIC_LINEAR_WEDGE = 31
  138. VTK_BIQUADRATIC_QUADRATIC_WEDGE = 32
  139. VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON = 33
  140. # Special class of cells formed by convex group of points
  141. VTK_CONVEX_POINT_SET = 41
  142. # Higher order cells in parametric form
  143. VTK_PARAMETRIC_CURVE = 51
  144. VTK_PARAMETRIC_SURFACE = 52
  145. VTK_PARAMETRIC_TRI_SURFACE = 53
  146. VTK_PARAMETRIC_QUAD_SURFACE = 54
  147. VTK_PARAMETRIC_TETRA_REGION = 55
  148. VTK_PARAMETRIC_HEX_REGION = 56
  149. # Higher order cells
  150. VTK_HIGHER_ORDER_EDGE = 60
  151. VTK_HIGHER_ORDER_TRIANGLE = 61
  152. VTK_HIGHER_ORDER_QUAD = 62
  153. VTK_HIGHER_ORDER_POLYGON = 63
  154. VTK_HIGHER_ORDER_TETRAHEDRON = 64
  155. VTK_HIGHER_ORDER_WEDGE = 65
  156. VTK_HIGHER_ORDER_PYRAMID = 66
  157. VTK_HIGHER_ORDER_HEXAHEDRON = 67
  158. # A macro to get the name of a type
  159. __vtkTypeNameDict = {VTK_VOID:"void",
  160. VTK_DOUBLE:"double",
  161. VTK_FLOAT:"float",
  162. VTK_LONG:"long",
  163. VTK_UNSIGNED_LONG:"unsigned long",
  164. VTK_INT:"int",
  165. VTK_UNSIGNED_INT:"unsigned int",
  166. VTK_SHORT:"short",
  167. VTK_UNSIGNED_SHORT:"unsigned short",
  168. VTK_CHAR:"char",
  169. VTK_UNSIGNED_CHAR:"unsigned char",
  170. VTK_SIGNED_CHAR:"signed char",
  171. VTK_LONG_LONG:"long long",
  172. VTK_UNSIGNED_LONG_LONG:"unsigned long long",
  173. VTK_ID_TYPE:"vtkIdType",
  174. VTK_BIT:"bit"}
  175. def vtkImageScalarTypeNameMacro(type):
  176. return __vtkTypeNameDict[type]