VTK
|
general representation of visualization data More...
#include <vtkDataObject.h>
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkDataObject * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
unsigned long int | GetMTime () |
virtual void | Initialize () |
void | ReleaseData () |
virtual int | GetDataObjectType () |
unsigned long | GetUpdateTime () |
virtual unsigned long | GetActualMemorySize () |
void | DataHasBeenGenerated () |
virtual void | PrepareForNewData () |
virtual int | GetExtentType () |
virtual void | Crop (const int *updateExtent) |
virtual vtkDataSetAttributes * | GetAttributes (int type) |
virtual vtkFieldData * | GetAttributesAsFieldData (int type) |
virtual int | GetAttributeTypeForArray (vtkAbstractArray *arr) |
virtual vtkIdType | GetNumberOfElements (int type) |
virtual vtkInformation * | GetInformation () |
virtual void | SetInformation (vtkInformation *) |
virtual int | GetDataReleased () |
virtual void | SetFieldData (vtkFieldData *) |
virtual vtkFieldData * | GetFieldData () |
virtual void | CopyInformationFromPipeline (vtkInformation *vtkNotUsed(info)) |
virtual void | ShallowCopy (vtkDataObject *src) |
virtual void | DeepCopy (vtkDataObject *src) |
Static Public Member Functions | |
static vtkDataObject * | New () |
static int | IsTypeOf (const char *type) |
static vtkDataObject * | SafeDownCast (vtkObjectBase *o) |
static const char * | GetAssociationTypeAsString (int associationType) |
static int | GetAssociationTypeFromString (const char *associationType) |
static vtkInformationStringKey * | DATA_TYPE_NAME () |
static vtkInformationDataObjectKey * | DATA_OBJECT () |
static vtkInformationIntegerKey * | DATA_EXTENT_TYPE () |
static vtkInformationIntegerPointerKey * | DATA_EXTENT () |
static vtkInformationIntegerKey * | DATA_PIECE_NUMBER () |
static vtkInformationIntegerKey * | DATA_NUMBER_OF_PIECES () |
static vtkInformationIntegerKey * | DATA_NUMBER_OF_GHOST_LEVELS () |
static vtkInformationDoubleKey * | DATA_RESOLUTION () |
static vtkInformationDoubleKey * | DATA_TIME_STEP () |
static vtkInformationInformationVectorKey * | POINT_DATA_VECTOR () |
static vtkInformationInformationVectorKey * | CELL_DATA_VECTOR () |
static vtkInformationInformationVectorKey * | VERTEX_DATA_VECTOR () |
static vtkInformationInformationVectorKey * | EDGE_DATA_VECTOR () |
static vtkInformationIntegerKey * | FIELD_ARRAY_TYPE () |
static vtkInformationIntegerKey * | FIELD_ASSOCIATION () |
static vtkInformationIntegerKey * | FIELD_ATTRIBUTE_TYPE () |
static vtkInformationIntegerKey * | FIELD_ACTIVE_ATTRIBUTE () |
static vtkInformationIntegerKey * | FIELD_NUMBER_OF_COMPONENTS () |
static vtkInformationIntegerKey * | FIELD_NUMBER_OF_TUPLES () |
static vtkInformationIntegerKey * | FIELD_OPERATION () |
static vtkInformationDoubleVectorKey * | FIELD_RANGE () |
static vtkInformationDoubleVectorKey * | PIECE_FIELD_RANGE () |
static vtkInformationStringKey * | FIELD_ARRAY_NAME () |
static vtkInformationIntegerVectorKey * | PIECE_EXTENT () |
static vtkInformationStringKey * | FIELD_NAME () |
static vtkInformationDoubleVectorKey * | ORIGIN () |
static vtkInformationDoubleVectorKey * | SPACING () |
static vtkInformationIntegerKey * | DATA_GEOMETRY_UNMODIFIED () |
static vtkInformationDoubleVectorKey * | BOUNDING_BOX () |
static vtkInformationDataObjectKey * | SIL () |
static vtkInformation * | GetActiveFieldInformation (vtkInformation *info, int fieldAssociation, int attributeType) |
static vtkInformation * | GetNamedFieldInformation (vtkInformation *info, int fieldAssociation, const char *name) |
static void | RemoveNamedFieldInformation (vtkInformation *info, int fieldAssociation, const char *name) |
static vtkInformation * | SetActiveAttribute (vtkInformation *info, int fieldAssociation, const char *attributeName, int attributeType) |
static void | SetActiveAttributeInfo (vtkInformation *info, int fieldAssociation, int attributeType, const char *name, int arrayType, int numComponents, int numTuples) |
static void | SetPointDataActiveScalarInfo (vtkInformation *info, int arrayType, int numComponents) |
static vtkDataObject * | GetData (vtkInformation *info) |
static vtkDataObject * | GetData (vtkInformationVector *v, int i=0) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkDataObject () | |
~vtkDataObject () | |
Protected Attributes | |
vtkFieldData * | FieldData |
int | DataReleased |
vtkTimeStamp | UpdateTime |
vtkInformation * | Information |
static void | SetGlobalReleaseDataFlag (int val) |
static int | GetGlobalReleaseDataFlag () |
void | GlobalReleaseDataFlagOn () |
void | GlobalReleaseDataFlagOff () |
general representation of visualization data
helper class to get VTK data object types as string and instantiate them
vtkDataObject is an general representation of visualization data. It serves to encapsulate instance variables and methods for visualization network execution, as well as representing data consisting of a field (i.e., just an unstructured pile of data). This is to be compared with a vtkDataSet, which is data with geometric and/or topological structure.
vtkDataObjects are used to represent arbitrary repositories of data via the vtkFieldData instance variable. These data must be eventually mapped into a concrete subclass of vtkDataSet before they can actually be displayed.
vtkDataObjectTypes is a helper class that supports conversion between integer types defined in vtkType.h and string names as well as creation of data objects from either integer or string types. This class has to be updated every time a new data type is added to VTK.
Definition at line 64 of file vtkDataObject.h.
typedef vtkObject vtkDataObject::Superclass |
Definition at line 69 of file vtkDataObject.h.
Possible values for the FIELD_ASSOCIATION information entry.
Definition at line 224 of file vtkDataObject.h.
Possible attribute types. POINT_THEN_CELL is provided for consistency with FieldAssociations.
Enumerator | |
---|---|
POINT | |
CELL | |
FIELD | |
POINT_THEN_CELL | |
VERTEX | |
EDGE | |
ROW | |
NUMBER_OF_ATTRIBUTE_TYPES |
Definition at line 242 of file vtkDataObject.h.
Possible values for the FIELD_OPERATION information entry.
Enumerator | |
---|---|
FIELD_OPERATION_PRESERVED | |
FIELD_OPERATION_REINTERPOLATED | |
FIELD_OPERATION_MODIFIED | |
FIELD_OPERATION_REMOVED |
Definition at line 284 of file vtkDataObject.h.
|
protected |
|
protected |
|
static |
|
static |
|
virtual |
Reimplemented in vtkGraph, vtkReebGraph, vtkTable, vtkDirectedAcyclicGraph, vtkUndirectedGraph, vtkArrayData, vtkMultiBlockDataSet, vtkMutableDirectedGraph, vtkOverlappingAMR, vtkCompositeDataSet, vtkDirectedGraph, vtkMutableUndirectedGraph, vtkDataObjectTree, vtkSelection, vtkMultiPieceDataSet, vtkAnnotationLayers, vtkHierarchicalBoxDataSet, vtkImageStencilData, vtkNonOverlappingAMR, and vtkUniformGridAMR.
|
static |
|
protectedvirtual |
Reimplemented in vtkGraph, vtkReebGraph, vtkTable, vtkDirectedAcyclicGraph, vtkUndirectedGraph, vtkArrayData, vtkMultiBlockDataSet, vtkMutableDirectedGraph, vtkOverlappingAMR, vtkCompositeDataSet, vtkDirectedGraph, vtkMutableUndirectedGraph, vtkDataObjectTree, vtkSelection, vtkMultiPieceDataSet, vtkAnnotationLayers, vtkHierarchicalBoxDataSet, vtkImageStencilData, vtkNonOverlappingAMR, and vtkUniformGridAMR.
vtkDataObject* vtkDataObject::NewInstance | ( | ) | const |
void vtkDataObject::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
|
virtual |
Set/Get the information object associated with this data object.
|
virtual |
Set/Get the information object associated with this data object.
unsigned long int vtkDataObject::GetMTime | ( | ) |
Data objects are composite objects and need to check each part for MTime. The information object also needs to be considered.
|
virtual |
Restore data object to initial state,
Reimplemented in vtkGraph, vtkTable, vtkDataObjectTree, vtkCompositeDataSet, vtkAnnotationLayers, vtkSelection, vtkUniformGridAMR, and vtkImageStencilData.
void vtkDataObject::ReleaseData | ( | ) |
Release data back to system to conserve memory resource. Used during visualization network execution. Releasing this data does not make down-stream data invalid, so it does not modify the MTime of this data object.
|
virtual |
Get the flag indicating the data has been released.
|
static |
Turn on/off flag to control whether every object releases its data after being used by a filter.
|
inline |
Turn on/off flag to control whether every object releases its data after being used by a filter.
Definition at line 101 of file vtkDataObject.h.
|
inline |
Turn on/off flag to control whether every object releases its data after being used by a filter.
Definition at line 102 of file vtkDataObject.h.
|
static |
Turn on/off flag to control whether every object releases its data after being used by a filter.
|
virtual |
Assign or retrieve a general field data to this data object.
|
virtual |
Assign or retrieve a general field data to this data object.
|
inlinevirtual |
Return class name of data type. This is one of VTK_STRUCTURED_GRID, VTK_STRUCTURED_POINTS, VTK_UNSTRUCTURED_GRID, VTK_POLY_DATA, or VTK_RECTILINEAR_GRID (see vtkSetGet.h for definitions). THIS METHOD IS THREAD SAFE
Reimplemented in vtkGraph, vtkReebGraph, vtkTable, vtkArrayData, vtkDirectedAcyclicGraph, vtkUndirectedGraph, vtkCompositeDataSet, vtkMultiBlockDataSet, vtkSelection, vtkDirectedGraph, vtkOverlappingAMR, vtkMultiPieceDataSet, vtkImageStencilData, vtkHierarchicalBoxDataSet, vtkUniformGridAMR, and vtkNonOverlappingAMR.
Definition at line 116 of file vtkDataObject.h.
unsigned long vtkDataObject::GetUpdateTime | ( | ) |
Used by Threaded ports to determine if they should initiate an asynchronous update (still in development).
|
virtual |
Return the actual size of the data in kilobytes. This number is valid only after the pipeline has updated. The memory size returned is guaranteed to be greater than or equal to the memory required to represent the data (e.g., extra space in arrays, etc. are not included in the return value).
Reimplemented in vtkDataObjectTree, vtkTable, and vtkCompositeDataSet.
|
inlinevirtual |
Copy information about this data object from the pipeline information to its own Information. Called right before the main execution pass..
Definition at line 133 of file vtkDataObject.h.
|
static |
Return the information object within the input information object's field data corresponding to the specified association (FIELD_ASSOCIATION_POINTS or FIELD_ASSOCIATION_CELLS) and attribute (SCALARS, VECTORS, NORMALS, TCOORDS, or TENSORS)
|
static |
Return the information object within the input information object's field data corresponding to the specified association (FIELD_ASSOCIATION_POINTS or FIELD_ASSOCIATION_CELLS) and name.
|
static |
Remove the info associated with an array
|
static |
Set the named array to be the active field for the specified type (SCALARS, VECTORS, NORMALS, TCOORDS, or TENSORS) and association (FIELD_ASSOCIATION_POINTS or FIELD_ASSOCIATION_CELLS). Returns the active field information object and creates on entry if one not found.
|
static |
Set the name, array type, number of components, and number of tuples within the passed information object for the active attribute of type attributeType (in specified association, FIELD_ASSOCIATION_POINTS or FIELD_ASSOCIATION_CELLS). If there is not an active attribute of the specified type, an entry in the information object is created. If arrayType, numComponents, or numTuples equal to -1, or name=NULL the value is not changed.
|
static |
Convenience version of previous method for use (primarily) by the Imaging filters. If arrayType or numComponents == -1, the value is not changed.
void vtkDataObject::DataHasBeenGenerated | ( | ) |
This method is called by the source when it executes to generate data. It is sort of the opposite of ReleaseData. It sets the DataReleased flag to 0, and sets a new UpdateTime.
|
inlinevirtual |
make the output data ready for new data to be inserted. For most objects we just call Initialize. But for vtkImageData we leave the old data in case the memory can be reused.
Definition at line 200 of file vtkDataObject.h.
|
virtual |
Shallow and Deep copy. These copy the data, but not any of the pipeline connections.
Reimplemented in vtkGraph, vtkTable, vtkUniformGridAMR, vtkDataObjectTree, vtkCompositeDataSet, vtkSelection, vtkArrayData, vtkAnnotationLayers, and vtkImageStencilData.
|
virtual |
Shallow and Deep copy. These copy the data, but not any of the pipeline connections.
Reimplemented in vtkGraph, vtkReebGraph, vtkTable, vtkUniformGridAMR, vtkDataObjectTree, vtkCompositeDataSet, vtkAnnotationLayers, vtkArrayData, vtkSelection, and vtkImageStencilData.
|
inlinevirtual |
The ExtentType will be left as VTK_PIECES_EXTENT for data objects such as vtkPolyData and vtkUnstructuredGrid. The ExtentType will be changed to VTK_3D_EXTENT for data objects with 3D structure such as vtkImageData (and its subclass vtkStructuredPoints), vtkRectilinearGrid, and vtkStructuredGrid. The default is the have an extent in pieces, with only one piece (no streaming possible).
Reimplemented in vtkImageStencilData.
Definition at line 215 of file vtkDataObject.h.
|
virtual |
This method crops the data object (if necessary) so that the extent matches the update extent.
|
virtual |
Returns the attributes of the data object of the specified attribute type. The type may be:
The other attribute type, FIELD, will return NULL since field data is stored as a vtkFieldData instance, not a vtkDataSetAttributes instance. To retrieve field data, use GetAttributesAsFieldData.
|
virtual |
Returns the attributes of the data object as a vtkFieldData. This returns non-null values in all the same cases as GetAttributes, in addition to the case of FIELD, which will return the field data for any vtkDataObject subclass.
|
virtual |
Retrieves the attribute type that an array came from. This is useful for obtaining which attribute type a input array to an algorithm came from (retrieved from GetInputAbstractArrayToProcesss).
|
virtual |
|
static |
Given an integer association type, this static method returns a string type for the attribute (i.e. type = 0: returns "Points").
|
static |
Given an integer association type, this static method returns a string type for the attribute (i.e. type = 0: returns "Points").
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Retrieve an instance of this class from an information object.
|
static |
Retrieve an instance of this class from an information object.
|
protected |
Definition at line 349 of file vtkDataObject.h.
|
protected |
Definition at line 352 of file vtkDataObject.h.
|
protected |
Definition at line 355 of file vtkDataObject.h.
|
protected |
Definition at line 358 of file vtkDataObject.h.