VTK  9.5.20251215
vtkCellGridSampleQuery Class Reference

Output a table of samples at zero or more points inside each cell. More...

#include <vtkCellGridSampleQuery.h>

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

Public Types

enum  PassType : int { CountOutputs = 0 , GenerateOutputs = 1 }
 Passes used during processing of this query. More...
 
typedef vtkCellGridQuery Superclass
 
using OutputAllocations = std::unordered_map<vtkStringToken, vtkIdType>
 A map used to allocate output table rows for various input cell types.
 
- 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.
 
vtkCellGridSampleQueryNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
bool Initialize () override
 Overridden.
 
void StartPass () override
 Mark the start of a pass through each cell type.
 
bool IsAnotherPassRequired () override
 Force two passes through this query.
 
void AddOutputSamples (vtkStringToken inputCellType, vtkIdType numberOfOutputs)
 Responders should call this method during the CountOutputs pass to allocate space in an output cell type.
 
vtkIdType GetSampleOffset (vtkStringToken inputCellType)
 Responders should call this method during the GenerateOutputs pass to obtain the starting row of the table where they can write their samples.
 
vtkDataArrayGetOutputAttributeColumn (vtkCellAttribute *inputAttribute)
 Return an output table column (or null) given an input cell attribute.
 
vtkIdTypeArrayGetSourceCellIdColumn ()
 Return the data array holding the input cell ID of each sample (if requested).
 
vtkDataArrayGetSourceCellSiteColumn ()
 Return the data array holding the parametric coordinates (if applicable) of each sample in the output table.
 
OutputAllocationsGetOutputAllocations ()
 Return the data structure that AddOutputSamples() modifies in the PassType::CountOutputs pass.
 
const OutputAllocationsGetOutputAllocations () const
 
virtual void SetIncludeSourceCellInfo (bool)
 Set/get whether the sample table should include cell type and cell ID columns.
 
virtual bool GetIncludeSourceCellInfo ()
 Set/get whether the sample table should include cell type and cell ID columns.
 
virtual void IncludeSourceCellInfoOn ()
 Set/get whether the sample table should include cell type and cell ID columns.
 
virtual void IncludeSourceCellInfoOff ()
 Set/get whether the sample table should include cell type and cell ID columns.
 
virtual void SetIncludeSourceCellSite (bool)
 Set/get whether the sample table should include a column for parametric coordinates.
 
virtual bool GetIncludeSourceCellSite ()
 Set/get whether the sample table should include a column for parametric coordinates.
 
virtual void IncludeSourceCellSiteOn ()
 Set/get whether the sample table should include a column for parametric coordinates.
 
virtual void IncludeSourceCellSiteOff ()
 Set/get whether the sample table should include a column for parametric coordinates.
 
virtual void SetInput (vtkCellGrid *)
 Get/set the request's input cell-grid.
 
virtual vtkCellGridGetInput ()
 Get/set the request's input cell-grid.
 
virtual void SetOutput (vtkTable *)
 Set/get the request's output table.
 
virtual vtkTableGetOutput ()
 Set/get the request's output table.
 
virtual void SetMaximumParametricDimension (int)
 Set/get the largest parametric dimension across all cells.
 
virtual int GetMaximumParametricDimension ()
 Set/get the largest parametric dimension across all cells.
 
- Public Member Functions inherited from vtkCellGridQuery
vtkCellGridQueryNewInstance () const
 
virtual int GetPass ()
 Return the current pass (the number of times each responder has been evaluated so far).
 
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 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 vtkCellGridSampleQueryNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkCellGridSampleQuerySafeDownCast (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
 
 vtkCellGridSampleQuery ()=default
 
 ~vtkCellGridSampleQuery () override=default
 
- Protected Member Functions inherited from vtkCellGridQuery
 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 ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 
- 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
 

Detailed Description

Output a table of samples at zero or more points inside each cell.

Attributes common to all input cell-types should be interpolated to each output vertex.

Responders are free to choose the number of samples inside each cell but in general, the samples should be chosen so that if used for quadrature they will accurately estimate integral values over each cell.

Definition at line 34 of file vtkCellGridSampleQuery.h.

Member Typedef Documentation

◆ Superclass

◆ OutputAllocations

A map used to allocate output table rows for various input cell types.

Definition at line 69 of file vtkCellGridSampleQuery.h.

Member Enumeration Documentation

◆ PassType

Passes used during processing of this query.

Enumerator
CountOutputs 

Responders call AddOutputSamples with an output row count.

GenerateOutputs 

Responders insert samples into the output table.

Definition at line 72 of file vtkCellGridSampleQuery.h.

Constructor & Destructor Documentation

◆ vtkCellGridSampleQuery()

vtkCellGridSampleQuery::vtkCellGridSampleQuery ( )
protecteddefault

◆ ~vtkCellGridSampleQuery()

vtkCellGridSampleQuery::~vtkCellGridSampleQuery ( )
overrideprotecteddefault

Member Function Documentation

◆ New()

static vtkCellGridSampleQuery * vtkCellGridSampleQuery::New ( )
static

◆ IsTypeOf()

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

◆ IsA()

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

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkCellGridSampleQuery::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkCellGridQuery.

◆ NewInstance()

vtkCellGridSampleQuery * vtkCellGridSampleQuery::NewInstance ( ) const

◆ PrintSelf()

void vtkCellGridSampleQuery::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 vtkCellGridQuery.

◆ SetIncludeSourceCellInfo()

virtual void vtkCellGridSampleQuery::SetIncludeSourceCellInfo ( bool )
virtual

Set/get whether the sample table should include cell type and cell ID columns.

The default is to omit these columns.

◆ GetIncludeSourceCellInfo()

virtual bool vtkCellGridSampleQuery::GetIncludeSourceCellInfo ( )
virtual

Set/get whether the sample table should include cell type and cell ID columns.

The default is to omit these columns.

◆ IncludeSourceCellInfoOn()

virtual void vtkCellGridSampleQuery::IncludeSourceCellInfoOn ( )
virtual

Set/get whether the sample table should include cell type and cell ID columns.

The default is to omit these columns.

◆ IncludeSourceCellInfoOff()

virtual void vtkCellGridSampleQuery::IncludeSourceCellInfoOff ( )
virtual

Set/get whether the sample table should include cell type and cell ID columns.

The default is to omit these columns.

◆ SetIncludeSourceCellSite()

virtual void vtkCellGridSampleQuery::SetIncludeSourceCellSite ( bool )
virtual

Set/get whether the sample table should include a column for parametric coordinates.

The default is to omit this column. If included, it will be a vtkDataArray with as many components as largested parametric dimension of all input cell types. For example, if a dataset has vertices, lines, and quadrilateral cells, this will have 2 components per tuple. If a dataset has triangular and tetrahedral cells, this will have 3 components per tuple. Note that cells are not required to have parametric coordinates, so values may be meaningless.

◆ GetIncludeSourceCellSite()

virtual bool vtkCellGridSampleQuery::GetIncludeSourceCellSite ( )
virtual

Set/get whether the sample table should include a column for parametric coordinates.

The default is to omit this column. If included, it will be a vtkDataArray with as many components as largested parametric dimension of all input cell types. For example, if a dataset has vertices, lines, and quadrilateral cells, this will have 2 components per tuple. If a dataset has triangular and tetrahedral cells, this will have 3 components per tuple. Note that cells are not required to have parametric coordinates, so values may be meaningless.

◆ IncludeSourceCellSiteOn()

virtual void vtkCellGridSampleQuery::IncludeSourceCellSiteOn ( )
virtual

Set/get whether the sample table should include a column for parametric coordinates.

The default is to omit this column. If included, it will be a vtkDataArray with as many components as largested parametric dimension of all input cell types. For example, if a dataset has vertices, lines, and quadrilateral cells, this will have 2 components per tuple. If a dataset has triangular and tetrahedral cells, this will have 3 components per tuple. Note that cells are not required to have parametric coordinates, so values may be meaningless.

◆ IncludeSourceCellSiteOff()

virtual void vtkCellGridSampleQuery::IncludeSourceCellSiteOff ( )
virtual

Set/get whether the sample table should include a column for parametric coordinates.

The default is to omit this column. If included, it will be a vtkDataArray with as many components as largested parametric dimension of all input cell types. For example, if a dataset has vertices, lines, and quadrilateral cells, this will have 2 components per tuple. If a dataset has triangular and tetrahedral cells, this will have 3 components per tuple. Note that cells are not required to have parametric coordinates, so values may be meaningless.

◆ Initialize()

bool vtkCellGridSampleQuery::Initialize ( )
overridevirtual

Overridden.

Reimplemented from vtkCellGridQuery.

◆ StartPass()

void vtkCellGridSampleQuery::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.

◆ IsAnotherPassRequired()

bool vtkCellGridSampleQuery::IsAnotherPassRequired ( )
inlineoverridevirtual

Force two passes through this query.

Reimplemented from vtkCellGridQuery.

Definition at line 83 of file vtkCellGridSampleQuery.h.

◆ SetInput()

virtual void vtkCellGridSampleQuery::SetInput ( vtkCellGrid * )
virtual

Get/set the request's input cell-grid.

◆ GetInput()

virtual vtkCellGrid * vtkCellGridSampleQuery::GetInput ( )
virtual

Get/set the request's input cell-grid.

◆ SetOutput()

virtual void vtkCellGridSampleQuery::SetOutput ( vtkTable * )
virtual

Set/get the request's output table.

Users of this query must set the table they wish populated with samples.

◆ GetOutput()

virtual vtkTable * vtkCellGridSampleQuery::GetOutput ( )
virtual

Set/get the request's output table.

Users of this query must set the table they wish populated with samples.

◆ AddOutputSamples()

void vtkCellGridSampleQuery::AddOutputSamples ( vtkStringToken inputCellType,
vtkIdType numberOfOutputs )

Responders should call this method during the CountOutputs pass to allocate space in an output cell type.

◆ GetSampleOffset()

vtkIdType vtkCellGridSampleQuery::GetSampleOffset ( vtkStringToken inputCellType)

Responders should call this method during the GenerateOutputs pass to obtain the starting row of the table where they can write their samples.

◆ GetOutputAttributeColumn()

vtkDataArray * vtkCellGridSampleQuery::GetOutputAttributeColumn ( vtkCellAttribute * inputAttribute)

Return an output table column (or null) given an input cell attribute.

Responders may use this method to obtain an output data array to hold sample values of a particular attribute.

◆ GetSourceCellIdColumn()

vtkIdTypeArray * vtkCellGridSampleQuery::GetSourceCellIdColumn ( )
inline

Return the data array holding the input cell ID of each sample (if requested).

Responders are expected to set values in this array for their samples when this array is non-null.

If the input cell ID is not requested by IncludeSourceCellInfo, this will return null.

Definition at line 123 of file vtkCellGridSampleQuery.h.

◆ GetSourceCellSiteColumn()

vtkDataArray * vtkCellGridSampleQuery::GetSourceCellSiteColumn ( )
inline

Return the data array holding the parametric coordinates (if applicable) of each sample in the output table.

Responders are expected to set values in this array for their samples when this array is non-null.

If the parametric coordinates are not requested by IncludeSourceCellSite, this will return null.

Definition at line 133 of file vtkCellGridSampleQuery.h.

◆ GetOutputAllocations() [1/2]

OutputAllocations & vtkCellGridSampleQuery::GetOutputAllocations ( )
inline

Return the data structure that AddOutputSamples() modifies in the PassType::CountOutputs pass.

Definition at line 137 of file vtkCellGridSampleQuery.h.

◆ GetOutputAllocations() [2/2]

const OutputAllocations & vtkCellGridSampleQuery::GetOutputAllocations ( ) const
inline

Definition at line 138 of file vtkCellGridSampleQuery.h.

◆ SetMaximumParametricDimension()

virtual void vtkCellGridSampleQuery::SetMaximumParametricDimension ( int )
virtual

Set/get the largest parametric dimension across all cells.

Responders should call this during the CountOutputs pass if their cells' maximum parametric dimension is larger than its current value.

At the start of the GenerateOutputs pass, this is used to allocate this->SourceCellSites array, if present.

◆ GetMaximumParametricDimension()

virtual int vtkCellGridSampleQuery::GetMaximumParametricDimension ( )
virtual

Set/get the largest parametric dimension across all cells.

Responders should call this during the CountOutputs pass if their cells' maximum parametric dimension is larger than its current value.

At the start of the GenerateOutputs pass, this is used to allocate this->SourceCellSites array, if present.


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