VTK  9.4.20241113
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkCellGridCopyQuery Class Reference

Copy the cell metadata and attribute(s) of one cell-grid into another. More...

#include <vtkCellGridCopyQuery.h>

Inheritance diagram for vtkCellGridCopyQuery:
[legend]
Collaboration diagram for vtkCellGridCopyQuery:
[legend]

Public Types

typedef vtkCellGridQuery Superclass
 
- Public Types inherited from vtkCellGridQuery
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkCellGridCopyQueryNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
QueryExecution Query Execution.

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).
 
SourceAndTarget Source and Target Cell-Grids.
virtual void SetSource (vtkCellGrid *source)
 Set/get the source cell-grid to copy into the cell-grid on which this query is run.
 
virtual vtkCellGridGetSource ()
 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 vtkCellGridGetTarget ()
 Set/get the source cell-grid to copy into the cell-grid on which this query is run.
 
CopySetup Copy Style Setup.
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.
 
AttCopySetup Attribute Copying Setup.

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.
 
AttCopyState Attribute Copying State.
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.
 
ResponderHelpers

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.
 
vtkCellAttributeCopyOrUpdateAttributeRecord (vtkCellAttribute *srcAtt, vtkStringToken cellType)
 Copy a cell-attribute (srcAtt) from the source into the target.
 
- Public Member Functions inherited from vtkCellGridQuery
virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkCellGridQueryNewInstance () 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.
 
- Public Member Functions inherited from vtkObject
 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.
 
vtkCommandGetCommand (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.
 
- Public Member Functions inherited from vtkObjectBase
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.
 

Static Public Member Functions

static vtkCellGridCopyQueryNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkCellGridCopyQuerySafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkCellGridQuery
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkCellGridQuerySafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes.
 
static void SetGlobalWarningDisplay (vtkTypeBool val)
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static vtkTypeBool GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class.
 
static vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a 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).
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within.
 
static bool GetUsingMemkind ()
 A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space.
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkCellGridCopyQuery ()=default
 
 ~vtkCellGridCopyQuery () override
 
- Protected Member Functions inherited from vtkCellGridQuery
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkCellGridQuery ()=default
 
 ~vtkCellGridQuery () override=default
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events.
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events.
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void RegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
virtual void ObjectFinalize ()
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkCellGridSource { nullptr }
 
vtkCellGridTarget { nullptr }
 
std::set< int > CellAttributeIds
 
std::map< vtkAbstractArray *, vtkAbstractArray * > ArrayMap
 
std::map< vtkCellAttribute *, vtkCellAttribute * > AttributeMap
 
int CopyCellTypes { 1 }
 
int CopyCells { 1 }
 
int CopyOnlyShape { 1 }
 
int CopyArrays { 1 }
 
int CopyArrayValues { 1 }
 
int DeepCopyArrays { 0 }
 
int CopySchema { 1 }
 
- Protected Attributes inherited from vtkCellGridQuery
int Pass { -1 }
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
std::string ObjectName
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 

Detailed Description

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.

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.

Member Typedef Documentation

◆ Superclass

Definition at line 113 of file vtkCellGridCopyQuery.h.

Constructor & Destructor Documentation

◆ vtkCellGridCopyQuery()

vtkCellGridCopyQuery::vtkCellGridCopyQuery ( )
protecteddefault

◆ ~vtkCellGridCopyQuery()

vtkCellGridCopyQuery::~vtkCellGridCopyQuery ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkCellGridCopyQuery * vtkCellGridCopyQuery::New ( )
static

◆ IsTypeOf()

static vtkTypeBool vtkCellGridCopyQuery::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool vtkCellGridCopyQuery::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class.

Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkCellGridQuery.

◆ SafeDownCast()

static vtkCellGridCopyQuery * vtkCellGridCopyQuery::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkCellGridCopyQuery::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkCellGridQuery.

◆ NewInstance()

vtkCellGridCopyQuery * vtkCellGridCopyQuery::NewInstance ( ) const

◆ PrintSelf()

void vtkCellGridCopyQuery::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Methods invoked by print to print information about the object including superclasses.

Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObjectBase.

◆ Initialize()

bool vtkCellGridCopyQuery::Initialize ( )
overridevirtual

This clears the ArrayMap ivar after the algorithm completes (to save space).

Reimplemented from vtkCellGridQuery.

◆ Finalize()

bool vtkCellGridCopyQuery::Finalize ( )
overridevirtual

This clears the ArrayMap ivar after the algorithm completes (to save space).

Reimplemented from vtkCellGridQuery.

◆ SetSource()

virtual void vtkCellGridCopyQuery::SetSource ( vtkCellGrid source)
virtual

Set/get the source cell-grid to copy into the cell-grid on which this query is run.

◆ GetSource()

virtual vtkCellGrid * vtkCellGridCopyQuery::GetSource ( )
virtual

Set/get the source cell-grid to copy into the cell-grid on which this query is run.

◆ SetTarget()

virtual void vtkCellGridCopyQuery::SetTarget ( vtkCellGrid target)
virtual

Set/get the target cell-grid into which the source should be copied.

◆ GetTarget()

virtual vtkCellGrid * vtkCellGridCopyQuery::GetTarget ( )
virtual

Set/get the source cell-grid to copy into the cell-grid on which this query is run.

◆ GetCopyCellTypes()

virtual int vtkCellGridCopyQuery::GetCopyCellTypes ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ SetCopyCellTypes()

virtual void vtkCellGridCopyQuery::SetCopyCellTypes ( int  )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ CopyCellTypesOn()

virtual void vtkCellGridCopyQuery::CopyCellTypesOn ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ CopyCellTypesOff()

virtual void vtkCellGridCopyQuery::CopyCellTypesOff ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ GetCopyCells()

virtual int vtkCellGridCopyQuery::GetCopyCells ( )
virtual

Set/get whether to copy cell topology or leave each output instance of cell metadata uninitialized.

The default (true) is to copy cells.

◆ SetCopyCells()

virtual void vtkCellGridCopyQuery::SetCopyCells ( int  )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ CopyCellsOn()

virtual void vtkCellGridCopyQuery::CopyCellsOn ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ CopyCellsOff()

virtual void vtkCellGridCopyQuery::CopyCellsOff ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ GetCopyOnlyShape()

virtual int vtkCellGridCopyQuery::GetCopyOnlyShape ( )
virtual

Set/get whether only the shape attribute should be copied.

This option is provided so vtkCellGridCopyQuery can behave similar to vtkDataSet::CopyStructure().

If true (the default), no vtkCellAttribute instances other than vtkCellGrid::GetShapeAttribute() will be copied from the source to the target, regardless of the values returned by vtkCellGridCopyQuery::GetCellAttributeIds().

If false, then you must explicitly add the source's shape attribute to the schedule of attributes to be copied by calling vtkCellGridCopyQuery::AddSourceCellAttributeId() or the target will have no geometric shape (which is disallowed). (The intential omission of the shape attribute when CopyOnlyShape is false allows you to omit the shape during copying if you will be synthesizing a new shape for the same output cell topology.)

◆ SetCopyOnlyShape()

virtual void vtkCellGridCopyQuery::SetCopyOnlyShape ( int  )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ CopyOnlyShapeOn()

virtual void vtkCellGridCopyQuery::CopyOnlyShapeOn ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ CopyOnlyShapeOff()

virtual void vtkCellGridCopyQuery::CopyOnlyShapeOff ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ GetCopyArrays()

virtual int vtkCellGridCopyQuery::GetCopyArrays ( )
virtual

Set/get whether data arrays should be copied or omitted.

The default (true) is for arrays associated with each cell-attribute to be copied. If false, then the requested cell-attribute(s) will be copied but will have no arrays set for any cell type.

◆ SetCopyArrays()

virtual void vtkCellGridCopyQuery::SetCopyArrays ( int  )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ CopyArraysOn()

virtual void vtkCellGridCopyQuery::CopyArraysOn ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ CopyArraysOff()

virtual void vtkCellGridCopyQuery::CopyArraysOff ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ GetCopyArrayValues()

virtual int vtkCellGridCopyQuery::GetCopyArrayValues ( )
virtual

Set/get whether values in data arrays should be copied or not.

The default is true (i.e., the source and target array contents should be equal (when DeepCopyArrays is false) or equivalent (when DeepCopyArrays is true)).

◆ SetCopyArrayValues()

virtual void vtkCellGridCopyQuery::SetCopyArrayValues ( int  )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ CopyArrayValuesOn()

virtual void vtkCellGridCopyQuery::CopyArrayValuesOn ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ CopyArrayValuesOff()

virtual void vtkCellGridCopyQuery::CopyArrayValuesOff ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ GetDeepCopyArrays()

virtual int vtkCellGridCopyQuery::GetDeepCopyArrays ( )
virtual

Set/get whether data arrays should be copied by value (deep) or by reference (shallow).

The default is false (i.e., shallow copy).

This setting is ignored when GetCopyArrays() and/or GetCopyArrayValues() are false. If GetCopyArrays() returns false, no arrays will be copied from the source. If GetCopyArrays() returns true but GetCopyArrayValues() returns false, then new, empty arrays of the same type, name, and number of components as the source arrays will be created but no tuples will be inserted in them.

◆ SetDeepCopyArrays()

virtual void vtkCellGridCopyQuery::SetDeepCopyArrays ( int  )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ DeepCopyArraysOn()

virtual void vtkCellGridCopyQuery::DeepCopyArraysOn ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ DeepCopyArraysOff()

virtual void vtkCellGridCopyQuery::DeepCopyArraysOff ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ GetCopySchema()

virtual int vtkCellGridCopyQuery::GetCopySchema ( )
virtual

Set/get whether the source cell-grid's schema information should be copied.

If true (the default), the query's Finalize() method will copy the schema to the target.

◆ SetCopySchema()

virtual void vtkCellGridCopyQuery::SetCopySchema ( int  )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ CopySchemaOn()

virtual void vtkCellGridCopyQuery::CopySchemaOn ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ CopySchemaOff()

virtual void vtkCellGridCopyQuery::CopySchemaOff ( )
virtual

Set/get whether to copy cell metadata instances or leave target grid void of all cell types.

The default (true) is to copy cell types.

◆ AddSourceCellAttributeId()

virtual bool vtkCellGridCopyQuery::AddSourceCellAttributeId ( int  attributeId)
virtual

Add attributeId to the list of cell-attributes to be copied from the source.

◆ RemoveSourceCellAttributeId()

virtual bool vtkCellGridCopyQuery::RemoveSourceCellAttributeId ( int  attributeId)
virtual

Remove attributeId from the list of cell-attributes to be copied from the source.

◆ AddAllSourceCellAttributeIds()

virtual bool vtkCellGridCopyQuery::AddAllSourceCellAttributeIds ( )
virtual

Add all of the source cell-grid's attributes to the list of IDs to be copied.

Obviously, you must have called SetSource() prior to calling this method.

◆ GetCellAttributeIds() [1/2]

const std::set< int > & vtkCellGridCopyQuery::GetCellAttributeIds ( ) const
inline

Return the set of attribute IDs scheduled to be copied when the query is run.

Definition at line 236 of file vtkCellGridCopyQuery.h.

◆ GetCellAttributeIds() [2/2]

void vtkCellGridCopyQuery::GetCellAttributeIds ( vtkIdList ids) const

Populate ids with the attribute IDs scheduled to be copied when the query is run.

◆ ResetCellAttributeIds()

virtual void vtkCellGridCopyQuery::ResetCellAttributeIds ( )
virtual

Reset the query so that no cell-attributes will be copied from the source.

◆ GetArrayMap() [1/2]

const std::map< vtkAbstractArray *, vtkAbstractArray * > & vtkCellGridCopyQuery::GetArrayMap ( ) const
inline

Return the map from source to target arrays.

This map is cleared by both Initialize() and Finalize() to minimize the time it holds data.

Definition at line 254 of file vtkCellGridCopyQuery.h.

◆ GetArrayMap() [2/2]

std::map< vtkAbstractArray *, vtkAbstractArray * > & vtkCellGridCopyQuery::GetArrayMap ( )
inline

Return the map from source to target arrays.

This map is cleared by both Initialize() and Finalize() to minimize the time it holds data.

Definition at line 258 of file vtkCellGridCopyQuery.h.

◆ GetAttributeMap() [1/2]

const std::map< vtkCellAttribute *, vtkCellAttribute * > & vtkCellGridCopyQuery::GetAttributeMap ( ) const
inline

Return the map from source to target cell-attributes.

This map is cleared by both Initialize() and Finalize() to minimize the time it holds data.

Definition at line 264 of file vtkCellGridCopyQuery.h.

◆ GetAttributeMap() [2/2]

std::map< vtkCellAttribute *, vtkCellAttribute * > & vtkCellGridCopyQuery::GetAttributeMap ( )
inline

Return the map from source to target arrays.

This map is cleared by both Initialize() and Finalize() to minimize the time it holds data.

Definition at line 268 of file vtkCellGridCopyQuery.h.

◆ CopyAttributeArrays()

void vtkCellGridCopyQuery::CopyAttributeArrays ( vtkCellAttribute srcAtt,
vtkStringToken  cellType 
)

Copy the arrays for a single attribute from the source to the target.

This method does not check CopyOnlyShape and CellAttributeIds to determine whether the attribute should be copied. Your responder must verify the attribute should be copied.

This method does check the CopyArrays, CopyArrays, and CopyArrayValues flags to determine whether to reference source arrays or create (and potentially copy values) into new arrays.

◆ CopyOrUpdateAttributeRecord()

vtkCellAttribute * vtkCellGridCopyQuery::CopyOrUpdateAttributeRecord ( vtkCellAttribute srcAtt,
vtkStringToken  cellType 
)

Copy a cell-attribute (srcAtt) from the source into the target.

This method uses the ArrayMap to set the arrays for each cell type (if arrays are being copied and not being copied by reference).

This calls vtkCellAttribute::DeepCopy() on srcAtt and then copies any cached range data from the source to the target cell-grid.

Your responder must call CopyAttributeArrays() for all the output cell types before calling this method if GetCopyArrays() returns true so that the ArrayMap will be properly populated.

Member Data Documentation

◆ Source

vtkCellGrid* vtkCellGridCopyQuery::Source { nullptr }
protected

Definition at line 309 of file vtkCellGridCopyQuery.h.

◆ Target

vtkCellGrid* vtkCellGridCopyQuery::Target { nullptr }
protected

Definition at line 310 of file vtkCellGridCopyQuery.h.

◆ CellAttributeIds

std::set<int> vtkCellGridCopyQuery::CellAttributeIds
protected

Definition at line 311 of file vtkCellGridCopyQuery.h.

◆ ArrayMap

std::map<vtkAbstractArray*, vtkAbstractArray*> vtkCellGridCopyQuery::ArrayMap
protected

Definition at line 312 of file vtkCellGridCopyQuery.h.

◆ AttributeMap

std::map<vtkCellAttribute*, vtkCellAttribute*> vtkCellGridCopyQuery::AttributeMap
protected

Definition at line 313 of file vtkCellGridCopyQuery.h.

◆ CopyCellTypes

int vtkCellGridCopyQuery::CopyCellTypes { 1 }
protected

Definition at line 314 of file vtkCellGridCopyQuery.h.

◆ CopyCells

int vtkCellGridCopyQuery::CopyCells { 1 }
protected

Definition at line 315 of file vtkCellGridCopyQuery.h.

◆ CopyOnlyShape

int vtkCellGridCopyQuery::CopyOnlyShape { 1 }
protected

Definition at line 316 of file vtkCellGridCopyQuery.h.

◆ CopyArrays

int vtkCellGridCopyQuery::CopyArrays { 1 }
protected

Definition at line 317 of file vtkCellGridCopyQuery.h.

◆ CopyArrayValues

int vtkCellGridCopyQuery::CopyArrayValues { 1 }
protected

Definition at line 318 of file vtkCellGridCopyQuery.h.

◆ DeepCopyArrays

int vtkCellGridCopyQuery::DeepCopyArrays { 0 }
protected

Definition at line 319 of file vtkCellGridCopyQuery.h.

◆ CopySchema

int vtkCellGridCopyQuery::CopySchema { 1 }
protected

Definition at line 320 of file vtkCellGridCopyQuery.h.


The documentation for this class was generated from the following file: