VTK  9.4.20241221
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkCellGridToUnstructuredGrid::Query Class Reference

A query corresponding to this algorithm. More...

#include <vtkCellGridToUnstructuredGrid.h>

Inheritance diagram for vtkCellGridToUnstructuredGrid::Query:
[legend]
Collaboration diagram for vtkCellGridToUnstructuredGrid::Query:
[legend]

Classes

struct  OutputAllocation
 A placeholder for space to be occupied in a vtkCellArray. More...
 

Public Types

enum  PassType : int { CountOutputs = 0 , GenerateConnectivity , GeneratePointData = 2 }
 Passes performed by the query. More...
 
typedef vtkCellGridQuery Superclass
 
using OutputAllocations = std::unordered_map< vtkStringToken, OutputAllocation >
 A map used to allocate space for the unstructured-grid's vtkCellArray.
 
using ConnectivityTransformType = std::unordered_map< vtkIdType, vtkIdType >
 Return a map of per-cell-type point IDs to unstructured-grid point IDs.
 
using ConnectivityCountType = std::map< vtkIdType, int >
 This map is used to count the number of references to output points.
 
using ConnectivityWeightType = std::vector< float >
 The reciprocal of this->GetConnectivityCount().
 
- 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.
 
vtkCellGridToUnstructuredGrid::QueryNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
bool Initialize () override
 Override this if your query-result state requires initialization.
 
void StartPass () override
 Mark the start of a pass through each cell type.
 
bool Finalize () override
 Override this if your query-result state requires finalization.
 
bool IsAnotherPassRequired () override
 Force three passes through this query.
 
vtkUnstructuredGridGetOutput () const
 Get the request's output cell-grid.
 
vtkCellGridGetInput () const
 Get the request's input cell-grid.
 
OutputAllocationsGetOutputAllocations ()
 Return the data structure used in the CountOutputs pass.
 
const OutputAllocationsGetOutputAllocations () const
 
vtkDataArrayGetOutputArray (vtkCellAttribute *inputAttribute)
 Return an output attribute (or null).
 
vtkIncrementalOctreePointLocatorGetLocator ()
 Return the point-locator.
 
ConnectivityTransformTypeGetConnectivityTransform (vtkStringToken cellType)
 
ConnectivityCountTypeGetConnectivityCount ()
 
ConnectivityWeightTypeGetConnectivityWeights ()
 
- 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 QueryNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkCellGridToUnstructuredGrid::QuerySafeDownCast (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
 
 Query ()=default
 
 ~Query () override=default
 
- 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

vtkCellGridInput { nullptr }
 
vtkUnstructuredGridOutput { nullptr }
 
OutputAllocations OutputOffsets
 Map output cell-typename to input cell-typename to count (offset after the AllocateOutputs pass has run).
 
std::unordered_map< vtkCellAttribute *, vtkDataArray * > AttributeMap
 
vtkNew< vtkIncrementalOctreePointLocatorLocator
 A locator used to insert cell-grid points into a vtkPoints instance.
 
std::unordered_map< vtkStringToken, ConnectivityTransformTypeConnectivityTransforms
 Connectivity transforms per input cell type.
 
ConnectivityCountType ConnectivityCount
 Number of cells referencing a given output point.
 
ConnectivityWeightType ConnectivityWeights
 The reciprocal of every entry in ConnectivityCount.
 
- 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
 

Friends

class vtkCellGridToUnstructuredGrid
 

Additional Inherited Members

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

Detailed Description

A query corresponding to this algorithm.

This query gets run on the input cell-grid.

Definition at line 48 of file vtkCellGridToUnstructuredGrid.h.

Member Typedef Documentation

◆ Superclass

Definition at line 52 of file vtkCellGridToUnstructuredGrid.h.

◆ OutputAllocations

A map used to allocate space for the unstructured-grid's vtkCellArray.

This maps input cell typenames to OutputAllocation structures.

Definition at line 68 of file vtkCellGridToUnstructuredGrid.h.

◆ ConnectivityTransformType

Return a map of per-cell-type point IDs to unstructured-grid point IDs.

Responders should insert values as they use the incremental point-locator to transform connectivity. These maps can be tested to avoid incremental point insertion when possible.

Definition at line 117 of file vtkCellGridToUnstructuredGrid.h.

◆ ConnectivityCountType

This map is used to count the number of references to output points.

During the GenerateConnectivity pass, responders should increment values so each entry corresponds to the number of cells that reference the point ID which serves as the key.

Definition at line 128 of file vtkCellGridToUnstructuredGrid.h.

◆ ConnectivityWeightType

The reciprocal of this->GetConnectivityCount().

This vector is only valid during the GeneratePointData pass.

Definition at line 134 of file vtkCellGridToUnstructuredGrid.h.

Member Enumeration Documentation

◆ PassType

Passes performed by the query.

In between CountOutputs and GenerateConnectivity, the query class will allocate vtkCellArray storage.

In between GenerateConnectivity and GeneratePointData, the query class will allocate array storage for all arrays in the output vtkPointData.

Enumerator
CountOutputs 

Responders should insert into GetOutputAllocations().

GenerateConnectivity 

Responders should insert points into the locator, point-count map, and connectivity.

GeneratePointData 

Responders should populate point-data.

Definition at line 77 of file vtkCellGridToUnstructuredGrid.h.

Constructor & Destructor Documentation

◆ Query()

vtkCellGridToUnstructuredGrid::Query::Query ( )
protecteddefault

◆ ~Query()

vtkCellGridToUnstructuredGrid::Query::~Query ( )
overrideprotecteddefault

Member Function Documentation

◆ New()

static Query * vtkCellGridToUnstructuredGrid::Query::New ( )
static

◆ IsTypeOf()

static vtkTypeBool vtkCellGridToUnstructuredGrid::Query::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool vtkCellGridToUnstructuredGrid::Query::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 vtkCellGridToUnstructuredGrid::Query * vtkCellGridToUnstructuredGrid::Query::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkCellGridToUnstructuredGrid::Query::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkCellGridQuery.

◆ NewInstance()

vtkCellGridToUnstructuredGrid::Query * vtkCellGridToUnstructuredGrid::Query::NewInstance ( ) const

◆ PrintSelf()

void vtkCellGridToUnstructuredGrid::Query::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 vtkCellGridToUnstructuredGrid::Query::Initialize ( )
overridevirtual

Override this if your query-result state requires initialization.

You may override this method to do additional work, but you must be careful to call the base method from your override.

Returning false will abort processing of the query. No error message will be printed.

Reimplemented from vtkCellGridQuery.

◆ StartPass()

void vtkCellGridToUnstructuredGrid::Query::StartPass ( )
overridevirtual

Mark the start of a pass through each cell type.

This increments the Pass ivar which responders can access.

You may override this method to do additional work, but you must be careful to call the base method from your override.

Reimplemented from vtkCellGridQuery.

◆ Finalize()

bool vtkCellGridToUnstructuredGrid::Query::Finalize ( )
overridevirtual

Override this if your query-result state requires finalization.

Reimplemented from vtkCellGridQuery.

◆ IsAnotherPassRequired()

bool vtkCellGridToUnstructuredGrid::Query::IsAnotherPassRequired ( )
inlineoverridevirtual

Force three passes through this query.

Reimplemented from vtkCellGridQuery.

Definition at line 90 of file vtkCellGridToUnstructuredGrid.h.

◆ GetOutput()

vtkUnstructuredGrid * vtkCellGridToUnstructuredGrid::Query::GetOutput ( ) const
inline

Get the request's output cell-grid.

Definition at line 93 of file vtkCellGridToUnstructuredGrid.h.

◆ GetInput()

vtkCellGrid * vtkCellGridToUnstructuredGrid::Query::GetInput ( ) const
inline

Get the request's input cell-grid.

Definition at line 95 of file vtkCellGridToUnstructuredGrid.h.

◆ GetOutputAllocations() [1/2]

OutputAllocations & vtkCellGridToUnstructuredGrid::Query::GetOutputAllocations ( )
inline

Return the data structure used in the CountOutputs pass.

Definition at line 98 of file vtkCellGridToUnstructuredGrid.h.

◆ GetOutputAllocations() [2/2]

const OutputAllocations & vtkCellGridToUnstructuredGrid::Query::GetOutputAllocations ( ) const
inline

Definition at line 99 of file vtkCellGridToUnstructuredGrid.h.

◆ GetOutputArray()

vtkDataArray * vtkCellGridToUnstructuredGrid::Query::GetOutputArray ( vtkCellAttribute inputAttribute)

Return an output attribute (or null).

◆ GetLocator()

vtkIncrementalOctreePointLocator * vtkCellGridToUnstructuredGrid::Query::GetLocator ( )
inline

Return the point-locator.

Responders should use this to transform any input connectivity they have to connectivity entries referencing the output points using this locator. Insert points in the CountOutputs pass and fetch point IDs in the GenerateOuputs pass.

Definition at line 110 of file vtkCellGridToUnstructuredGrid.h.

◆ GetConnectivityTransform()

ConnectivityTransformType & vtkCellGridToUnstructuredGrid::Query::GetConnectivityTransform ( vtkStringToken  cellType)
inline

Definition at line 118 of file vtkCellGridToUnstructuredGrid.h.

◆ GetConnectivityCount()

ConnectivityCountType & vtkCellGridToUnstructuredGrid::Query::GetConnectivityCount ( )
inline

Definition at line 129 of file vtkCellGridToUnstructuredGrid.h.

◆ GetConnectivityWeights()

ConnectivityWeightType & vtkCellGridToUnstructuredGrid::Query::GetConnectivityWeights ( )
inline

Definition at line 135 of file vtkCellGridToUnstructuredGrid.h.

Friends And Related Symbol Documentation

◆ vtkCellGridToUnstructuredGrid

friend class vtkCellGridToUnstructuredGrid
friend

Definition at line 138 of file vtkCellGridToUnstructuredGrid.h.

Member Data Documentation

◆ Input

vtkCellGrid* vtkCellGridToUnstructuredGrid::Query::Input { nullptr }
protected

Definition at line 142 of file vtkCellGridToUnstructuredGrid.h.

◆ Output

vtkUnstructuredGrid* vtkCellGridToUnstructuredGrid::Query::Output { nullptr }
protected

Definition at line 143 of file vtkCellGridToUnstructuredGrid.h.

◆ OutputOffsets

OutputAllocations vtkCellGridToUnstructuredGrid::Query::OutputOffsets
protected

Map output cell-typename to input cell-typename to count (offset after the AllocateOutputs pass has run).

Definition at line 147 of file vtkCellGridToUnstructuredGrid.h.

◆ AttributeMap

std::unordered_map<vtkCellAttribute*, vtkDataArray*> vtkCellGridToUnstructuredGrid::Query::AttributeMap
protected

Definition at line 149 of file vtkCellGridToUnstructuredGrid.h.

◆ Locator

vtkNew<vtkIncrementalOctreePointLocator> vtkCellGridToUnstructuredGrid::Query::Locator
protected

A locator used to insert cell-grid points into a vtkPoints instance.

Definition at line 151 of file vtkCellGridToUnstructuredGrid.h.

◆ ConnectivityTransforms

std::unordered_map<vtkStringToken, ConnectivityTransformType> vtkCellGridToUnstructuredGrid::Query::ConnectivityTransforms
protected

Connectivity transforms per input cell type.

Definition at line 153 of file vtkCellGridToUnstructuredGrid.h.

◆ ConnectivityCount

ConnectivityCountType vtkCellGridToUnstructuredGrid::Query::ConnectivityCount
protected

Number of cells referencing a given output point.

Definition at line 155 of file vtkCellGridToUnstructuredGrid.h.

◆ ConnectivityWeights

ConnectivityWeightType vtkCellGridToUnstructuredGrid::Query::ConnectivityWeights
protected

The reciprocal of every entry in ConnectivityCount.

Definition at line 157 of file vtkCellGridToUnstructuredGrid.h.


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