|
virtual vtkTypeBool | IsA (const char *type) |
| Return 1 if this class is the same type of (or a subclass of) the named class.
|
|
vtkCellGridCopyQuery * | NewInstance () const |
|
void | PrintSelf (ostream &os, vtkIndent indent) override |
| Methods invoked by print to print information about the object including superclasses.
|
|
|
This clears the ArrayMap ivar before the algorithm starts.
|
bool | Initialize () override |
| This clears the ArrayMap ivar after the algorithm completes (to save space).
|
|
bool | Finalize () override |
| This clears the ArrayMap ivar after the algorithm completes (to save space).
|
|
|
virtual void | SetSource (vtkCellGrid *source) |
| Set/get the source cell-grid to copy into the cell-grid on which this query is run.
|
|
virtual vtkCellGrid * | GetSource () |
| Set/get the source cell-grid to copy into the cell-grid on which this query is run.
|
|
virtual void | SetTarget (vtkCellGrid *target) |
| Set/get the target cell-grid into which the source should be copied.
|
|
virtual vtkCellGrid * | GetTarget () |
| Set/get the source cell-grid to copy into the cell-grid on which this query is run.
|
|
|
virtual int | GetCopyCellTypes () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | SetCopyCellTypes (int) |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | CopyCellTypesOn () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | CopyCellTypesOff () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual int | GetCopyCells () |
| Set/get whether to copy cell topology or leave each output instance of cell metadata uninitialized.
|
|
virtual void | SetCopyCells (int) |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | CopyCellsOn () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | CopyCellsOff () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual int | GetCopyOnlyShape () |
| Set/get whether only the shape attribute should be copied.
|
|
virtual void | SetCopyOnlyShape (int) |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | CopyOnlyShapeOn () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | CopyOnlyShapeOff () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual int | GetCopyArrays () |
| Set/get whether data arrays should be copied or omitted.
|
|
virtual void | SetCopyArrays (int) |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | CopyArraysOn () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | CopyArraysOff () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual int | GetCopyArrayValues () |
| Set/get whether values in data arrays should be copied or not.
|
|
virtual void | SetCopyArrayValues (int) |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | CopyArrayValuesOn () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | CopyArrayValuesOff () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual int | GetDeepCopyArrays () |
| Set/get whether data arrays should be copied by value (deep) or by reference (shallow).
|
|
virtual void | SetDeepCopyArrays (int) |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | DeepCopyArraysOn () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | DeepCopyArraysOff () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual int | GetCopySchema () |
| Set/get whether the source cell-grid's schema information should be copied.
|
|
virtual void | SetCopySchema (int) |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | CopySchemaOn () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
virtual void | CopySchemaOff () |
| Set/get whether to copy cell metadata instances or leave target grid void of all cell types.
|
|
|
Note that even when GetCellAttributeIds() returns an empty set, the shape attribute may be copied.
(Having a geometric shape is a mandatory part of a cell-grid.)
|
virtual bool | AddSourceCellAttributeId (int attributeId) |
|
virtual bool | RemoveSourceCellAttributeId (int attributeId) |
| Remove attributeId from the list of cell-attributes to be copied from the source.
|
|
virtual bool | AddAllSourceCellAttributeIds () |
| Add all of the source cell-grid's attributes to the list of IDs to be copied.
|
|
const std::set< int > & | GetCellAttributeIds () const |
| Return the set of attribute IDs scheduled to be copied when the query is run.
|
|
void | GetCellAttributeIds (vtkIdList *ids) const |
| Populate ids with the attribute IDs scheduled to be copied when the query is run.
|
|
virtual void | ResetCellAttributeIds () |
| Reset the query so that no cell-attributes will be copied from the source.
|
|
|
const std::map< vtkAbstractArray *, vtkAbstractArray * > & | GetArrayMap () const |
| Return the map from source to target arrays.
|
|
std::map< vtkAbstractArray *, vtkAbstractArray * > & | GetArrayMap () |
| Return the map from source to target arrays.
|
|
const std::map< vtkCellAttribute *, vtkCellAttribute * > & | GetAttributeMap () const |
| Return the map from source to target cell-attributes.
|
|
std::map< vtkCellAttribute *, vtkCellAttribute * > & | GetAttributeMap () |
| Return the map from source to target arrays.
|
|
|
Responder Helpers.
These methods are available for query-responders to use inside their implementations of Query().
|
void | CopyAttributeArrays (vtkCellAttribute *srcAtt, vtkStringToken cellType) |
| Copy the arrays for a single attribute from the source to the target.
|
|
vtkCellAttribute * | CopyOrUpdateAttributeRecord (vtkCellAttribute *srcAtt, vtkStringToken cellType) |
| Copy a cell-attribute (srcAtt) from the source into the target.
|
|
virtual vtkTypeBool | IsA (const char *type) |
| Return 1 if this class is the same type of (or a subclass of) the named class.
|
|
vtkCellGridQuery * | NewInstance () const |
|
void | PrintSelf (ostream &os, vtkIndent indent) override |
| Methods invoked by print to print information about the object including superclasses.
|
|
virtual bool | Initialize () |
| Override this if your query-result state requires initialization.
|
|
virtual void | StartPass () |
| Mark the start of a pass through each cell type.
|
|
virtual int | GetPass () |
| Return the current pass (the number of times each responder has been evaluated so far).
|
|
virtual bool | IsAnotherPassRequired () |
| Override this if your query allows responders to execute in multiple phases.
|
|
virtual bool | Finalize () |
| Override this if your query-result state requires finalization.
|
|
| vtkBaseTypeMacro (vtkObject, vtkObjectBase) |
|
virtual void | DebugOn () |
| Turn debugging output on.
|
|
virtual void | DebugOff () |
| Turn debugging output off.
|
|
bool | GetDebug () |
| Get the value of the debug flag.
|
|
void | SetDebug (bool debugFlag) |
| Set the value of the debug flag.
|
|
virtual void | Modified () |
| Update the modification time for this object.
|
|
virtual vtkMTimeType | GetMTime () |
| Return this object's modified time.
|
|
void | PrintSelf (ostream &os, vtkIndent indent) override |
| Methods invoked by print to print information about the object including superclasses.
|
|
void | RemoveObserver (unsigned long tag) |
|
void | RemoveObservers (unsigned long event) |
|
void | RemoveObservers (const char *event) |
|
void | RemoveAllObservers () |
|
vtkTypeBool | HasObserver (unsigned long event) |
|
vtkTypeBool | HasObserver (const char *event) |
|
vtkTypeBool | InvokeEvent (unsigned long event) |
|
vtkTypeBool | InvokeEvent (const char *event) |
|
std::string | GetObjectDescription () const override |
| The object description printed in messages and PrintSelf output.
|
|
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object.
|
|
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object.
|
|
vtkCommand * | GetCommand (unsigned long tag) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object.
|
|
void | RemoveObserver (vtkCommand *) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object.
|
|
void | RemoveObservers (unsigned long event, vtkCommand *) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object.
|
|
void | RemoveObservers (const char *event, vtkCommand *) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object.
|
|
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object.
|
|
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object.
|
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
| Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
|
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
| Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
|
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
| Allow user to set the AbortFlagOn() with the return value of the callback method.
|
|
vtkTypeBool | InvokeEvent (unsigned long event, void *callData) |
| This method invokes an event and return whether the event was aborted or not.
|
|
vtkTypeBool | InvokeEvent (const char *event, void *callData) |
| This method invokes an event and return whether the event was aborted or not.
|
|
virtual void | SetObjectName (const std::string &objectName) |
| Set/get the name of this object for reporting purposes.
|
|
virtual std::string | GetObjectName () const |
| Set/get the name of this object for reporting purposes.
|
|
const char * | GetClassName () const |
| Return the class name as a string.
|
|
virtual std::string | GetObjectDescription () const |
| The object description printed in messages and PrintSelf output.
|
|
virtual vtkTypeBool | IsA (const char *name) |
| Return 1 if this class is the same type of (or a subclass of) the named class.
|
|
virtual vtkIdType | GetNumberOfGenerationsFromBase (const char *name) |
| Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
|
|
virtual void | Delete () |
| Delete a VTK object.
|
|
virtual void | FastDelete () |
| Delete a reference to this object.
|
|
void | InitializeObjectBase () |
|
void | Print (ostream &os) |
| Print an object to an ostream.
|
|
void | Register (vtkObjectBase *o) |
| Increase the reference count (mark as used by another object).
|
|
virtual void | UnRegister (vtkObjectBase *o) |
| Decrease the reference count (release by another object).
|
|
int | GetReferenceCount () |
| Return the current reference count of this object.
|
|
void | SetReferenceCount (int) |
| Sets the reference count.
|
|
bool | GetIsInMemkind () const |
| A local state flag that remembers whether this object lives in the normal or extended memory space.
|
|
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
| Methods invoked by print to print information about the object including superclasses.
|
|
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
| Methods invoked by print to print information about the object including superclasses.
|
|
virtual bool | UsesGarbageCollector () const |
| Indicate whether the class uses vtkGarbageCollector or not.
|
|
Copy the cell metadata and attribute(s) of one cell-grid into another.
Note that this query is run by vtkCellGrid::ShallowCopy(), vtkCellGrid::DeepCOpy(), and vtkCellGrid::CopyStructure().
In general, there are five types of information in cell grids that may be transferred from the source cell-grid to the target. Here are the types of information and the options which control how that information is copied. Exactly how these flags on the query are used is up to each responder.
- Cell metadata records. These records are always copied. In the future, there may be an option to omit cells of specific types.
- Individual cells. If subclasses of vtkCellMetadata contain further information, you may use SetCopyCells() to control whether that is copied or whether the new vtkCellMetadata instance is left uninitialized. When GetCopyCells() is enabled, the cell topology should be copied (though not necessarily the shape attribute's arrays); CopyCells overrides the copying of topological arrays even if CopyArrays is turned off. This way, if CopyCells is on, you should expect the source and target to report the same number of cells.
- Cell attributes. You may request that only the shape attribute is copied from the source to the target with CopyOnlyShapeOn() or control which attributes are copied by calling AddSourceCellAttributeId() with the ID of each source attribute you wish copied.
- Cell-attribute arrays. For each cell-attribute that is copied, zero or more arrays may be associated the attribute. You can control how the arrays are copied like so:
- SetCopyArrays() controls whether arrays should be created or not. How the arrays are copied depends on whether CopyArrayValues and DeepCopyArrays are enabled. Note that this setting should be ignored when copying cell topology (as opposed to attribute) arrays as CopyCells should control whether cells are present in the output. If cell-topology arrays are referenced by a cell attribute, be aware that disabling CopyArrays may still produce some entries for topology arrays.
- SetCopyArrayValues() controls whether arrays should be (a) created but left empty or (b) created and populated with the source-array's values. This is useful for creating an empty copy that has all the necessary arrays prepared but no tuples so that further processing can insert new cells and attribute data.
- SetDeepCopyArrays() controls whether to create deep copies of arrays or shallow copies, but only when GetCopyArrayValues() returns true.
- Schema and content version. A cell-grid may advertise that its data adheres to a formal specification (which is indicated by a name and version number). If you wish to copy this information, ensure CopySchemaOn() has been called. If GetCopySchema() is true and the source has a content version number, the target cell-grid will have its content version incremented past the source's content version. Incrementing the content version even when the grids are otherwise identical improves track-ability, since the version number informs which grid preceded the other.
For Callers
You must execute this query on the source cell-grid, not the target. Only the source is guaranteed to have cells of the proper types present; the query iterates over each cell-type, so they must be present.
Executing this query will overwrite the target cell-grid with the source, erasing all of its cell metadata. In the future, this class may offer more control over which types of cells to copy from the source to the target.
For Responders
Responders to this query may call the helper methods provided to copy a cell-attribute's arrays and create/update a cell-attribute. These calls update maps from source to target arrays and attributes, which you can inspect by calling GetArrayMap() and GetAttributeMap(), respectively. The latter is important since distinct attributes may have identical names (though this is not advised).
- Tests:
- vtkCellGridCopyQuery (Tests)
Definition at line 109 of file vtkCellGridCopyQuery.h.