MCPcopy Create free account
hub / github.com/Kitware/VTK / DataObject

Class DataObject

Wrapping/Python/vtkmodules/numpy_interface/dataset_adapter.py:1192–1212  ·  view source on GitHub ↗

A wrapper for vtkDataObject that makes it easier to access FielData arrays as VTKArrays

Source from the content-addressed store, hash-verified

1190 return self.__next__()
1191
1192class DataObject(VTKObjectWrapper):
1193 """A wrapper for vtkDataObject that makes it easier to access FielData
1194 arrays as VTKArrays
1195 """
1196
1197 def GetAttributes(self, type):
1198 """Returns the attributes specified by the type as a DataSetAttributes
1199 instance."""
1200 if type == ArrayAssociation.FIELD:
1201 return self.GetFieldData()
1202 return DataSetAttributes(self.VTKObject.GetAttributesAsFieldData(type), self, type)
1203
1204 def HasAttributes(self, type):
1205 "Returns if current object support this attributes type"
1206 return type == ArrayAssociation.FIELD
1207
1208 def GetFieldData(self):
1209 "Returns the field data as a DataSetAttributes instance."
1210 return DataSetAttributes(self.VTKObject.GetFieldData(), self, ArrayAssociation.FIELD)
1211
1212 FieldData = property(GetFieldData, None, None, "This property returns the field data of a data object.")
1213
1214class Table(DataObject):
1215 """A wrapper for vtkTable that makes it easier to access RowData array as

Callers 1

WrapDataObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected