VTK
9.4.20241221
|
A query corresponding to this algorithm. More...
#include <vtkCellGridToUnstructuredGrid.h>
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::Query * | NewInstance () 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. | |
vtkUnstructuredGrid * | GetOutput () const |
Get the request's output cell-grid. | |
vtkCellGrid * | GetInput () const |
Get the request's input cell-grid. | |
OutputAllocations & | GetOutputAllocations () |
Return the data structure used in the CountOutputs pass. | |
const OutputAllocations & | GetOutputAllocations () const |
vtkDataArray * | GetOutputArray (vtkCellAttribute *inputAttribute) |
Return an output attribute (or null). | |
vtkIncrementalOctreePointLocator * | GetLocator () |
Return the point-locator. | |
ConnectivityTransformType & | GetConnectivityTransform (vtkStringToken cellType) |
ConnectivityCountType & | GetConnectivityCount () |
ConnectivityWeightType & | GetConnectivityWeights () |
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. | |
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. | |
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. | |
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. | |
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 Query * | New () |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkCellGridToUnstructuredGrid::Query * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkCellGridQuery | |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkCellGridQuery * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
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 vtkObjectBase * | New () |
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 vtkObjectBase * | NewInstanceInternal () const |
Query ()=default | |
~Query () override=default | |
Protected Member Functions inherited from vtkCellGridQuery | |
virtual vtkObjectBase * | NewInstanceInternal () 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 | |
vtkCellGrid * | Input { nullptr } |
vtkUnstructuredGrid * | Output { 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< vtkIncrementalOctreePointLocator > | Locator |
A locator used to insert cell-grid points into a vtkPoints instance. | |
std::unordered_map< vtkStringToken, ConnectivityTransformType > | ConnectivityTransforms |
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 () |
A query corresponding to this algorithm.
This query gets run on the input cell-grid.
Definition at line 48 of file vtkCellGridToUnstructuredGrid.h.
Definition at line 52 of file vtkCellGridToUnstructuredGrid.h.
using vtkCellGridToUnstructuredGrid::Query::OutputAllocations = std::unordered_map<vtkStringToken, OutputAllocation> |
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.
using vtkCellGridToUnstructuredGrid::Query::ConnectivityTransformType = std::unordered_map<vtkIdType, vtkIdType> |
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.
using vtkCellGridToUnstructuredGrid::Query::ConnectivityCountType = std::map<vtkIdType, int> |
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.
using vtkCellGridToUnstructuredGrid::Query::ConnectivityWeightType = std::vector<float> |
The reciprocal of this->GetConnectivityCount().
This vector is only valid during the GeneratePointData pass.
Definition at line 134 of file vtkCellGridToUnstructuredGrid.h.
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.
|
protecteddefault |
|
overrideprotecteddefault |
|
static |
|
static |
|
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.
|
static |
|
protectedvirtual |
Reimplemented from vtkCellGridQuery.
vtkCellGridToUnstructuredGrid::Query * vtkCellGridToUnstructuredGrid::Query::NewInstance | ( | ) | const |
|
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.
|
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.
|
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.
|
overridevirtual |
Override this if your query-result state requires finalization.
Reimplemented from vtkCellGridQuery.
|
inlineoverridevirtual |
Force three passes through this query.
Reimplemented from vtkCellGridQuery.
Definition at line 90 of file vtkCellGridToUnstructuredGrid.h.
|
inline |
Get the request's output cell-grid.
Definition at line 93 of file vtkCellGridToUnstructuredGrid.h.
|
inline |
Get the request's input cell-grid.
Definition at line 95 of file vtkCellGridToUnstructuredGrid.h.
|
inline |
Return the data structure used in the CountOutputs pass.
Definition at line 98 of file vtkCellGridToUnstructuredGrid.h.
|
inline |
Definition at line 99 of file vtkCellGridToUnstructuredGrid.h.
vtkDataArray * vtkCellGridToUnstructuredGrid::Query::GetOutputArray | ( | vtkCellAttribute * | inputAttribute | ) |
Return an output attribute (or null).
|
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.
|
inline |
Definition at line 118 of file vtkCellGridToUnstructuredGrid.h.
|
inline |
Definition at line 129 of file vtkCellGridToUnstructuredGrid.h.
|
inline |
Definition at line 135 of file vtkCellGridToUnstructuredGrid.h.
|
friend |
Definition at line 138 of file vtkCellGridToUnstructuredGrid.h.
|
protected |
Definition at line 142 of file vtkCellGridToUnstructuredGrid.h.
|
protected |
Definition at line 143 of file vtkCellGridToUnstructuredGrid.h.
|
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.
|
protected |
Definition at line 149 of file vtkCellGridToUnstructuredGrid.h.
|
protected |
A locator used to insert cell-grid points into a vtkPoints instance.
Definition at line 151 of file vtkCellGridToUnstructuredGrid.h.
|
protected |
Connectivity transforms per input cell type.
Definition at line 153 of file vtkCellGridToUnstructuredGrid.h.
|
protected |
Number of cells referencing a given output point.
Definition at line 155 of file vtkCellGridToUnstructuredGrid.h.
|
protected |
The reciprocal of every entry in ConnectivityCount.
Definition at line 157 of file vtkCellGridToUnstructuredGrid.h.