Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# DATA TYPES
class VtkDataType:
def __init__(self, size, name):
self.size = size
self.name = name
def __str__(self):
return "Type: %s Size: %d \n" % (self.name, self.size)
VtkInt8 = VtkDataType(1, "Int8")
VtkUInt8 = VtkDataType(1, "UInt8")
VtkInt16 = VtkDataType(2, "Int16")
VtkUInt16 = VtkDataType(2, "UInt16")
VtkInt32 = VtkDataType(4, "Int32")
VtkUInt32 = VtkDataType(4, "UInt32")
VtkInt64 = VtkDataType(8, "Int64")
VtkUInt64 = VtkDataType(8, "UInt64")
VtkFloat32 = VtkDataType(4, "Float32")
VtkFloat64 = VtkDataType(8, "Float64")
# Map numpy to VTK data types
np_to_vtk = {'int8': VtkInt8,
'uint8': VtkUInt8,
'int16': VtkInt16,
'uint16': VtkUInt16,
'int32': VtkInt32,
'uint32': VtkUInt32,
'int64': VtkInt64,
'uint64': VtkUInt64,
class VtkDataType:
def __init__(self, size, name):
self.size = size
self.name = name
def __str__(self):
return "Type: %s Size: %d \n" % (self.name, self.size)
VtkInt8 = VtkDataType(1, "Int8")
VtkUInt8 = VtkDataType(1, "UInt8")
VtkInt16 = VtkDataType(2, "Int16")
VtkUInt16 = VtkDataType(2, "UInt16")
VtkInt32 = VtkDataType(4, "Int32")
VtkUInt32 = VtkDataType(4, "UInt32")
VtkInt64 = VtkDataType(8, "Int64")
VtkUInt64 = VtkDataType(8, "UInt64")
VtkFloat32 = VtkDataType(4, "Float32")
VtkFloat64 = VtkDataType(8, "Float64")
# Map numpy to VTK data types
np_to_vtk = {'int8': VtkInt8,
'uint8': VtkUInt8,
'int16': VtkInt16,
'uint16': VtkUInt16,
'int32': VtkInt32,
'uint32': VtkUInt32,
'int64': VtkInt64,
'uint64': VtkUInt64,
'float32': VtkFloat32,
'float64': VtkFloat64}
VtkUnstructuredGrid = VtkFileType("UnstructuredGrid", ".vtu")
# DATA TYPES
class VtkDataType:
def __init__(self, size, name):
self.size = size
self.name = name
def __str__(self):
return "Type: %s Size: %d \n" % (self.name, self.size)
VtkInt8 = VtkDataType(1, "Int8")
VtkUInt8 = VtkDataType(1, "UInt8")
VtkInt16 = VtkDataType(2, "Int16")
VtkUInt16 = VtkDataType(2, "UInt16")
VtkInt32 = VtkDataType(4, "Int32")
VtkUInt32 = VtkDataType(4, "UInt32")
VtkInt64 = VtkDataType(8, "Int64")
VtkUInt64 = VtkDataType(8, "UInt64")
VtkFloat32 = VtkDataType(4, "Float32")
VtkFloat64 = VtkDataType(8, "Float64")
# Map numpy to VTK data types
np_to_vtk = {'int8': VtkInt8,
'uint8': VtkUInt8,
'int16': VtkInt16,
'uint16': VtkUInt16,
'int32': VtkInt32,
'uint32': VtkUInt32,
VtkStructuredGrid = VtkFileType("StructuredGrid", ".vts")
VtkUnstructuredGrid = VtkFileType("UnstructuredGrid", ".vtu")
# DATA TYPES
class VtkDataType:
def __init__(self, size, name):
self.size = size
self.name = name
def __str__(self):
return "Type: %s Size: %d \n" % (self.name, self.size)
VtkInt8 = VtkDataType(1, "Int8")
VtkUInt8 = VtkDataType(1, "UInt8")
VtkInt16 = VtkDataType(2, "Int16")
VtkUInt16 = VtkDataType(2, "UInt16")
VtkInt32 = VtkDataType(4, "Int32")
VtkUInt32 = VtkDataType(4, "UInt32")
VtkInt64 = VtkDataType(8, "Int64")
VtkUInt64 = VtkDataType(8, "UInt64")
VtkFloat32 = VtkDataType(4, "Float32")
VtkFloat64 = VtkDataType(8, "Float64")
# Map numpy to VTK data types
np_to_vtk = {'int8': VtkInt8,
'uint8': VtkUInt8,
'int16': VtkInt16,
'uint16': VtkUInt16,
'int32': VtkInt32,
def __init__(self, size, name):
self.size = size
self.name = name
def __str__(self):
return "Type: %s Size: %d \n" % (self.name, self.size)
VtkInt8 = VtkDataType(1, "Int8")
VtkUInt8 = VtkDataType(1, "UInt8")
VtkInt16 = VtkDataType(2, "Int16")
VtkUInt16 = VtkDataType(2, "UInt16")
VtkInt32 = VtkDataType(4, "Int32")
VtkUInt32 = VtkDataType(4, "UInt32")
VtkInt64 = VtkDataType(8, "Int64")
VtkUInt64 = VtkDataType(8, "UInt64")
VtkFloat32 = VtkDataType(4, "Float32")
VtkFloat64 = VtkDataType(8, "Float64")
# Map numpy to VTK data types
np_to_vtk = {'int8': VtkInt8,
'uint8': VtkUInt8,
'int16': VtkInt16,
'uint16': VtkUInt16,
'int32': VtkInt32,
'uint32': VtkUInt32,
'int64': VtkInt64,
'uint64': VtkUInt64,
'float32': VtkFloat32,
'float64': VtkFloat64}
# CELL TYPES
class VtkDataType:
def __init__(self, size, name):
self.size = size
self.name = name
def __str__(self):
return "Type: %s Size: %d \n" % (self.name, self.size)
VtkInt8 = VtkDataType(1, "Int8")
VtkUInt8 = VtkDataType(1, "UInt8")
VtkInt16 = VtkDataType(2, "Int16")
VtkUInt16 = VtkDataType(2, "UInt16")
VtkInt32 = VtkDataType(4, "Int32")
VtkUInt32 = VtkDataType(4, "UInt32")
VtkInt64 = VtkDataType(8, "Int64")
VtkUInt64 = VtkDataType(8, "UInt64")
VtkFloat32 = VtkDataType(4, "Float32")
VtkFloat64 = VtkDataType(8, "Float64")
# Map numpy to VTK data types
np_to_vtk = {'int8': VtkInt8,
'uint8': VtkUInt8,
'int16': VtkInt16,
'uint16': VtkUInt16,
'int32': VtkInt32,
'uint32': VtkUInt32,
'int64': VtkInt64,
'uint64': VtkUInt64,
'float32': VtkFloat32,
class VtkDataType:
def __init__(self, size, name):
self.size = size
self.name = name
def __str__(self):
return "Type: %s Size: %d \n" % (self.name, self.size)
VtkInt8 = VtkDataType(1, "Int8")
VtkUInt8 = VtkDataType(1, "UInt8")
VtkInt16 = VtkDataType(2, "Int16")
VtkUInt16 = VtkDataType(2, "UInt16")
VtkInt32 = VtkDataType(4, "Int32")
VtkUInt32 = VtkDataType(4, "UInt32")
VtkInt64 = VtkDataType(8, "Int64")
VtkUInt64 = VtkDataType(8, "UInt64")
VtkFloat32 = VtkDataType(4, "Float32")
VtkFloat64 = VtkDataType(8, "Float64")
# Map numpy to VTK data types
np_to_vtk = {'int8': VtkInt8,
'uint8': VtkUInt8,
'int16': VtkInt16,
'uint16': VtkUInt16,
'int32': VtkInt32,
'uint32': VtkUInt32,
'int64': VtkInt64,
'uint64': VtkUInt64,
'float32': VtkFloat32,
'float64': VtkFloat64}
def __init__(self, size, name):
self.size = size
self.name = name
def __str__(self):
return "Type: %s Size: %d \n" % (self.name, self.size)
VtkInt8 = VtkDataType(1, "Int8")
VtkUInt8 = VtkDataType(1, "UInt8")
VtkInt16 = VtkDataType(2, "Int16")
VtkUInt16 = VtkDataType(2, "UInt16")
VtkInt32 = VtkDataType(4, "Int32")
VtkUInt32 = VtkDataType(4, "UInt32")
VtkInt64 = VtkDataType(8, "Int64")
VtkUInt64 = VtkDataType(8, "UInt64")
VtkFloat32 = VtkDataType(4, "Float32")
VtkFloat64 = VtkDataType(8, "Float64")
# Map numpy to VTK data types
np_to_vtk = {'int8': VtkInt8,
'uint8': VtkUInt8,
'int16': VtkInt16,
'uint16': VtkUInt16,
'int32': VtkInt32,
'uint32': VtkUInt32,
'int64': VtkInt64,
'uint64': VtkUInt64,
'float32': VtkFloat32,
'float64': VtkFloat64}
# CELL TYPES
# DATA TYPES
class VtkDataType:
def __init__(self, size, name):
self.size = size
self.name = name
def __str__(self):
return "Type: %s Size: %d \n" % (self.name, self.size)
VtkInt8 = VtkDataType(1, "Int8")
VtkUInt8 = VtkDataType(1, "UInt8")
VtkInt16 = VtkDataType(2, "Int16")
VtkUInt16 = VtkDataType(2, "UInt16")
VtkInt32 = VtkDataType(4, "Int32")
VtkUInt32 = VtkDataType(4, "UInt32")
VtkInt64 = VtkDataType(8, "Int64")
VtkUInt64 = VtkDataType(8, "UInt64")
VtkFloat32 = VtkDataType(4, "Float32")
VtkFloat64 = VtkDataType(8, "Float64")
# Map numpy to VTK data types
np_to_vtk = {'int8': VtkInt8,
'uint8': VtkUInt8,
'int16': VtkInt16,
'uint16': VtkUInt16,
'int32': VtkInt32,
'uint32': VtkUInt32,
'int64': VtkInt64,
self.size = size
self.name = name
def __str__(self):
return "Type: %s Size: %d \n" % (self.name, self.size)
VtkInt8 = VtkDataType(1, "Int8")
VtkUInt8 = VtkDataType(1, "UInt8")
VtkInt16 = VtkDataType(2, "Int16")
VtkUInt16 = VtkDataType(2, "UInt16")
VtkInt32 = VtkDataType(4, "Int32")
VtkUInt32 = VtkDataType(4, "UInt32")
VtkInt64 = VtkDataType(8, "Int64")
VtkUInt64 = VtkDataType(8, "UInt64")
VtkFloat32 = VtkDataType(4, "Float32")
VtkFloat64 = VtkDataType(8, "Float64")
# Map numpy to VTK data types
np_to_vtk = {'int8': VtkInt8,
'uint8': VtkUInt8,
'int16': VtkInt16,
'uint16': VtkUInt16,
'int32': VtkInt32,
'uint32': VtkUInt32,
'int64': VtkInt64,
'uint64': VtkUInt64,
'float32': VtkFloat32,
'float64': VtkFloat64}
# CELL TYPES