VTK  9.7.20261205
vtkCellGridToUnstructuredGrid::Query Class Reference

#include <vtkCellGridToUnstructuredGrid.h>

Detailed Description

A query corresponding to this algorithm.

This query gets run on the input cell-grid.

Definition at line 69 of file 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 , GenerateSamples , GenerateConnectivity , GeneratePointData = 3 }
 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 CellSelection = std::unordered_map<vtkStringToken, vtkSmartPointer<vtkIdTypeArray>>
 The IDs of the cells to transcribe of each cell type.
using ConnectivityCountType = std::vector<std::atomic<int>>
 How many samples were merged into each output point.
using ConnectivityWeightType = std::vector<float>
 The reciprocal of the number of samples merged into each output point.
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 IsAborted ()
 Return true if the user has asked the filter to stop.
vtkIdType GetSubdivisionCount () const
 Return the number of subdivisions along each parametric axis.
bool IsAnotherPassRequired () override
 Force one pass per PassType 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).
vtkDoubleArray * GetSampleCoordinates ()
 Return the array holding one candidate output point per sample.
vtkIdTypeArray * GetSampleToPoint ()
 Map a sample index to the output point the sample was merged into.
ConnectivityWeightType & GetConnectivityWeights ()
virtual void SetSubdivisionLevel (int)
virtual int GetSubdivisionLevel ()
virtual void SetPointMergeTolerance (double)
virtual double GetPointMergeTolerance ()
virtual void SetMergePoints (bool)
virtual bool GetMergePoints ()
virtual void SetGenerateInputCellArrays (bool)
virtual bool GetGenerateInputCellArrays ()
void SetCellsToTranscribe (vtkStringToken cellType, vtkIdTypeArray *cellIds)
void ClearCellsToTranscribe ()
bool HasCellSelection () const
const CellSelection & GetCellSelection () const
vtkIdTypeArray * GetSampleCellIds ()
vtkDoubleArray * GetSampleParameters ()
Public Member Functions inherited from vtkCellGridQuery
vtkCellGridQuery * NewInstance () const
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
virtual int GetPass ()
 Return the current pass (the number of times each responder has been evaluated so far).
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 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
void MergeSamplesIntoPoints ()
 Merge coincident samples and allocate the output points they became.
void WriteInputCells (const std::vector< vtkIdType > &mergeMap)
 Write where each output point was sampled: the source of the sample it was merged into, given by mergeMap (see GenerateInputCellArrays).
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 &)

Protected Attributes

vtkCellGrid * Input { nullptr }
vtkUnstructuredGrid * Output { nullptr }
int SubdivisionLevel { 0 }
 How many times each cell is halved per axis (see SetSubdivisionLevel()).
double PointMergeTolerance { 1e-12 }
 The relative distance within which samples merge (see SetPointMergeTolerance()).
bool MergePoints { true }
 Whether coincident samples merge (see SetMergePoints()).
bool GenerateInputCellArrays { false }
 Whether each point reports where it was sampled (see SetGenerateInputCellArrays()).
CellSelection Selection
 The cells to transcribe of each cell type (see SetCellsToTranscribe()).
vtkCellGridToUnstructuredGrid * Algorithm { nullptr }
 The algorithm running this query, used only to poll for an abort.
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< vtkDoubleArray > SampleCoordinates
 One candidate output point per sample, before coincident ones merge.
vtkNew< vtkIdTypeArray > SampleToPoint
 The output point each sample was merged into.
vtkNew< vtkIdTypeArray > SampleCellIds
 The cell and parametric coordinates of each sample, when GenerateInputCellArrays is on.
vtkNew< vtkDoubleArray > SampleParameters
vtkSmartPointer< vtkTypeUInt32Array > InputCellTypes
 The output arrays saying where each point was sampled (see SetGenerateInputCellArrays()).
vtkSmartPointer< vtkTypeUInt64Array > InputCellIds
vtkSmartPointer< vtkDoubleArray > InputParameters
ConnectivityCountType ConnectivityCount
 The number of samples merged into each output point.
ConnectivityWeightType ConnectivityWeights
 The reciprocal of every entry in ConnectivityCount.
vtkIdType TotalCells { 0 }
 Totals over every cell type, accumulated with the offsets below.
vtkIdType TotalConnectivityIds { 0 }
vtkNew< vtkIdTypeArray > CellArrayOffsets
 Storage handed to the output vtkCellArray, written by index.
vtkNew< vtkIdTypeArray > CellArrayConnectivity
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 ()

Member Typedef Documentation

◆ Superclass

◆ OutputAllocations

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

This maps input cell typenames to OutputAllocation structures.

Definition at line 107 of file vtkCellGridToUnstructuredGrid.h.

◆ CellSelection

The IDs of the cells to transcribe of each cell type.

Definition at line 189 of file vtkCellGridToUnstructuredGrid.h.

◆ ConnectivityCountType

using vtkCellGridToUnstructuredGrid::Query::ConnectivityCountType = std::vector<std::atomic<int>>

How many samples were merged into each output point.

This is counted once the samples have been merged and inverted into the weights below when the GeneratePointData pass begins.

Definition at line 282 of file vtkCellGridToUnstructuredGrid.h.

◆ ConnectivityWeightType

The reciprocal of the number of samples merged into each output point.

This vector is only valid during the GeneratePointData pass.

Definition at line 287 of file vtkCellGridToUnstructuredGrid.h.

Member Enumeration Documentation

◆ PassType

Passes performed by the query.

In between CountOutputs and GenerateSamples, the query class accumulates the counts responders reported into the offsets each one writes at, and allocates room for every sample.

In between GenerateSamples and GenerateConnectivity, the query class merges coincident samples into output points, allocates vtkCellArray storage, and computes the point weights.

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().

GenerateSamples 

Responders should write sample coordinates and their source cell + parameters.

GenerateConnectivity 

Responders should write output point-ids, connectivity, and cell types.

GeneratePointData 

Responders should populate point-data.

Definition at line 121 of file vtkCellGridToUnstructuredGrid.h.

Constructor & Destructor Documentation

◆ Query()

vtkCellGridToUnstructuredGrid::Query::Query ( )
protecteddefault

◆ ~Query()

vtkCellGridToUnstructuredGrid::Query::~Query ( )
overrideprotecteddefault

Member Function Documentation

◆ New()

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

◆ IsTypeOf()

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()

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.

◆ SetSubdivisionLevel()

virtual void vtkCellGridToUnstructuredGrid::Query::SetSubdivisionLevel ( int )
virtual

Set/get how many times each input cell is halved along every parametric axis.

A level of 0 (the default) subdivides each input cell into a single linear output cell. Each increment doubles the number of subdivisions along every parametric axis of the input cell (see GetSubdivisionCount()). Negative levels are treated as 0; there is no upper limit beyond what the output can represent and what memory allows.

◆ GetSubdivisionLevel()

virtual int vtkCellGridToUnstructuredGrid::Query::GetSubdivisionLevel ( )
virtual

Set/get how many times each input cell is halved along every parametric axis.

A level of 0 (the default) subdivides each input cell into a single linear output cell. Each increment doubles the number of subdivisions along every parametric axis of the input cell (see GetSubdivisionCount()). Negative levels are treated as 0; there is no upper limit beyond what the output can represent and what memory allows.

◆ SetPointMergeTolerance()

virtual void vtkCellGridToUnstructuredGrid::Query::SetPointMergeTolerance ( double )
virtual

Set/get how close two samples must be before they are merged into one output point, as a fraction of the input's bounding-box diagonal.

Samples that neighboring cells make of a shared face have to merge, or the output falls apart into disconnected cells. Samples of a single cell must not, or that cell collapses. The gap between a cell's own samples halves with every level, so this has to stay well below it.

◆ GetPointMergeTolerance()

virtual double vtkCellGridToUnstructuredGrid::Query::GetPointMergeTolerance ( )
virtual

Set/get how close two samples must be before they are merged into one output point, as a fraction of the input's bounding-box diagonal.

Samples that neighboring cells make of a shared face have to merge, or the output falls apart into disconnected cells. Samples of a single cell must not, or that cell collapses. The gap between a cell's own samples halves with every level, so this has to stay well below it.

◆ SetMergePoints()

virtual void vtkCellGridToUnstructuredGrid::Query::SetMergePoints ( bool )
virtual

Set/get whether samples that coincide are merged into one output point (see SetPointMergeTolerance()). On by default.

When it is off, every sample is an output point of its own: the cells that one input cell is subdivided into share their points, but the cells of different input cells share none, and each point takes the values of the attributes in its own cell only (there is no averaging).

◆ GetMergePoints()

virtual bool vtkCellGridToUnstructuredGrid::Query::GetMergePoints ( )
virtual

Set/get whether samples that coincide are merged into one output point (see SetPointMergeTolerance()). On by default.

When it is off, every sample is an output point of its own: the cells that one input cell is subdivided into share their points, but the cells of different input cells share none, and each point takes the values of the attributes in its own cell only (there is no averaging).

◆ SetGenerateInputCellArrays()

virtual void vtkCellGridToUnstructuredGrid::Query::SetGenerateInputCellArrays ( bool )
virtual

Set/get whether the output has point-data arrays saying which cell of the input each output point was sampled in, as vtkCellGridIsocontourPoints and vtkCellGridEvaluator report it. Off by default. The arrays are "CellType" (the hash of the name of the input cell type), "CellId" (the ID of the input cell or, for a sample of a side, of the side, as the attribute calculators take it) and "RST" (the parametric coordinates of the sample in that cell).

A cell-attribute of the input must not have one of these names. A point that samples of several cells were merged into reports one of them; turn MergePoints off for each point to come from a single sample.

◆ GetGenerateInputCellArrays()

virtual bool vtkCellGridToUnstructuredGrid::Query::GetGenerateInputCellArrays ( )
virtual

Set/get whether the output has point-data arrays saying which cell of the input each output point was sampled in, as vtkCellGridIsocontourPoints and vtkCellGridEvaluator report it. Off by default. The arrays are "CellType" (the hash of the name of the input cell type), "CellId" (the ID of the input cell or, for a sample of a side, of the side, as the attribute calculators take it) and "RST" (the parametric coordinates of the sample in that cell).

A cell-attribute of the input must not have one of these names. A point that samples of several cells were merged into reports one of them; turn MergePoints off for each point to come from a single sample.

◆ SetCellsToTranscribe()

void vtkCellGridToUnstructuredGrid::Query::SetCellsToTranscribe ( vtkStringToken cellType,
vtkIdTypeArray * cellIds )

Restrict the transcription of cell type cellType to the cells with the IDs cellIds. The IDs are kept as they are, not copied or checked, so they must be valid and stay unchanged while the query runs.

Once any cell type has a selection, only the cell types with one are transcribed, and only their selected cells (not the sides of the cell type, which have their own IDs); the output holds nothing of the others. Without any selection (the default) every cell is transcribed. The output points are those of the selected cells only.

◆ ClearCellsToTranscribe()

void vtkCellGridToUnstructuredGrid::Query::ClearCellsToTranscribe ( )

Restrict the transcription of cell type cellType to the cells with the IDs cellIds. The IDs are kept as they are, not copied or checked, so they must be valid and stay unchanged while the query runs.

Once any cell type has a selection, only the cell types with one are transcribed, and only their selected cells (not the sides of the cell type, which have their own IDs); the output holds nothing of the others. Without any selection (the default) every cell is transcribed. The output points are those of the selected cells only.

◆ HasCellSelection()

bool vtkCellGridToUnstructuredGrid::Query::HasCellSelection ( ) const
inline

Restrict the transcription of cell type cellType to the cells with the IDs cellIds. The IDs are kept as they are, not copied or checked, so they must be valid and stay unchanged while the query runs.

Once any cell type has a selection, only the cell types with one are transcribed, and only their selected cells (not the sides of the cell type, which have their own IDs); the output holds nothing of the others. Without any selection (the default) every cell is transcribed. The output points are those of the selected cells only.

Definition at line 203 of file vtkCellGridToUnstructuredGrid.h.

◆ GetCellSelection()

const CellSelection & vtkCellGridToUnstructuredGrid::Query::GetCellSelection ( ) const
inline

Restrict the transcription of cell type cellType to the cells with the IDs cellIds. The IDs are kept as they are, not copied or checked, so they must be valid and stay unchanged while the query runs.

Once any cell type has a selection, only the cell types with one are transcribed, and only their selected cells (not the sides of the cell type, which have their own IDs); the output holds nothing of the others. Without any selection (the default) every cell is transcribed. The output points are those of the selected cells only.

Definition at line 204 of file vtkCellGridToUnstructuredGrid.h.

◆ IsAborted()

bool vtkCellGridToUnstructuredGrid::Query::IsAborted ( )
inline

Return true if the user has asked the filter to stop.

A high level can keep a responder busy for a long time, so it needs a way to notice and give up. The query has no notion of aborting on its own, so it borrows the algorithm's.

Definition at line 212 of file vtkCellGridToUnstructuredGrid.h.

◆ GetSubdivisionCount()

vtkIdType vtkCellGridToUnstructuredGrid::Query::GetSubdivisionCount ( ) const
inline

Return the number of subdivisions along each parametric axis.

This is 2^GetSubdivisionLevel(). Responders should use it rather than the level itself when generating output cells. Levels too large to shift by saturate, since no such subdivision could be allocated anyway.

Definition at line 219 of file vtkCellGridToUnstructuredGrid.h.

◆ IsAnotherPassRequired()

bool vtkCellGridToUnstructuredGrid::Query::IsAnotherPassRequired ( )
inlineoverridevirtual

Force one pass per PassType through this query.

Reimplemented from vtkCellGridQuery.

Definition at line 228 of file vtkCellGridToUnstructuredGrid.h.

◆ GetOutput()

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

Get the request's output cell-grid.

Definition at line 231 of file vtkCellGridToUnstructuredGrid.h.

◆ GetInput()

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

Get the request's input cell-grid.

Definition at line 233 of file vtkCellGridToUnstructuredGrid.h.

◆ GetOutputAllocations() [1/2]

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

Return the data structure used in the CountOutputs pass.

Definition at line 236 of file vtkCellGridToUnstructuredGrid.h.

◆ GetOutputAllocations() [2/2]

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

Definition at line 237 of file vtkCellGridToUnstructuredGrid.h.

◆ GetOutputArray()

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

Return an output attribute (or null).

◆ GetSampleCoordinates()

vtkDoubleArray * vtkCellGridToUnstructuredGrid::Query::GetSampleCoordinates ( )
inline

Return the array holding one candidate output point per sample.

During the GenerateSamples pass, responders must fill the tuples in [SampleOffset, SampleOffset + NumberOfSamples) of their allocation with the world coordinates of every sample they take. Coincident samples are what stitches neighboring cells together, so responders should not try to avoid emitting them: the query merges them afterwards.

The array is released once the samples have been merged, so it is only valid during the GenerateSamples pass.

Definition at line 252 of file vtkCellGridToUnstructuredGrid.h.

◆ GetSampleCellIds()

vtkIdTypeArray * vtkCellGridToUnstructuredGrid::Query::GetSampleCellIds ( )
inline

Return the arrays holding the cell ID and the parametric coordinates of each sample, indexed like GetSampleCoordinates(), or null when GenerateInputCellArrays is off.

During the GenerateSamples pass, responders must fill them for every sample they take, as they fill the coordinates. The ID is the one the attribute calculators take, so for a sample of a side it is the side's.

Definition at line 262 of file vtkCellGridToUnstructuredGrid.h.

◆ GetSampleParameters()

vtkDoubleArray * vtkCellGridToUnstructuredGrid::Query::GetSampleParameters ( )
inline

Return the arrays holding the cell ID and the parametric coordinates of each sample, indexed like GetSampleCoordinates(), or null when GenerateInputCellArrays is off.

During the GenerateSamples pass, responders must fill them for every sample they take, as they fill the coordinates. The ID is the one the attribute calculators take, so for a sample of a side it is the side's.

Definition at line 266 of file vtkCellGridToUnstructuredGrid.h.

◆ GetSampleToPoint()

vtkIdTypeArray * vtkCellGridToUnstructuredGrid::Query::GetSampleToPoint ( )
inline

Map a sample index to the output point the sample was merged into.

This is only valid from the GenerateConnectivity pass onwards. It is indexed exactly like GetSampleCoordinates() was.

Definition at line 276 of file vtkCellGridToUnstructuredGrid.h.

◆ GetConnectivityWeights()

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

Definition at line 288 of file vtkCellGridToUnstructuredGrid.h.

◆ MergeSamplesIntoPoints()

void vtkCellGridToUnstructuredGrid::Query::MergeSamplesIntoPoints ( )
protected

Merge coincident samples and allocate the output points they became.

◆ WriteInputCells()

void vtkCellGridToUnstructuredGrid::Query::WriteInputCells ( const std::vector< vtkIdType > & mergeMap)
protected

Write where each output point was sampled: the source of the sample it was merged into, given by mergeMap (see GenerateInputCellArrays).

◆ vtkCellGridToUnstructuredGrid

friend class vtkCellGridToUnstructuredGrid
friend

Definition at line 291 of file vtkCellGridToUnstructuredGrid.h.

Member Data Documentation

◆ Input

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

Definition at line 295 of file vtkCellGridToUnstructuredGrid.h.

◆ Output

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

Definition at line 296 of file vtkCellGridToUnstructuredGrid.h.

◆ SubdivisionLevel

int vtkCellGridToUnstructuredGrid::Query::SubdivisionLevel { 0 }
protected

How many times each cell is halved per axis (see SetSubdivisionLevel()).

Definition at line 299 of file vtkCellGridToUnstructuredGrid.h.

◆ PointMergeTolerance

double vtkCellGridToUnstructuredGrid::Query::PointMergeTolerance { 1e-12 }
protected

The relative distance within which samples merge (see SetPointMergeTolerance()).

Definition at line 301 of file vtkCellGridToUnstructuredGrid.h.

◆ MergePoints

bool vtkCellGridToUnstructuredGrid::Query::MergePoints { true }
protected

Whether coincident samples merge (see SetMergePoints()).

Definition at line 303 of file vtkCellGridToUnstructuredGrid.h.

◆ GenerateInputCellArrays

bool vtkCellGridToUnstructuredGrid::Query::GenerateInputCellArrays { false }
protected

Whether each point reports where it was sampled (see SetGenerateInputCellArrays()).

Definition at line 305 of file vtkCellGridToUnstructuredGrid.h.

◆ Selection

CellSelection vtkCellGridToUnstructuredGrid::Query::Selection
protected

The cells to transcribe of each cell type (see SetCellsToTranscribe()).

Definition at line 307 of file vtkCellGridToUnstructuredGrid.h.

◆ Algorithm

vtkCellGridToUnstructuredGrid* vtkCellGridToUnstructuredGrid::Query::Algorithm { nullptr }
protected

The algorithm running this query, used only to poll for an abort.

Definition at line 309 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 313 of file vtkCellGridToUnstructuredGrid.h.

◆ AttributeMap

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

Definition at line 315 of file vtkCellGridToUnstructuredGrid.h.

◆ SampleCoordinates

vtkNew<vtkDoubleArray> vtkCellGridToUnstructuredGrid::Query::SampleCoordinates
protected

One candidate output point per sample, before coincident ones merge.

Definition at line 317 of file vtkCellGridToUnstructuredGrid.h.

◆ SampleToPoint

vtkNew<vtkIdTypeArray> vtkCellGridToUnstructuredGrid::Query::SampleToPoint
protected

The output point each sample was merged into.

Definition at line 319 of file vtkCellGridToUnstructuredGrid.h.

◆ SampleCellIds

vtkNew<vtkIdTypeArray> vtkCellGridToUnstructuredGrid::Query::SampleCellIds
protected

The cell and parametric coordinates of each sample, when GenerateInputCellArrays is on.

Definition at line 321 of file vtkCellGridToUnstructuredGrid.h.

◆ SampleParameters

vtkNew<vtkDoubleArray> vtkCellGridToUnstructuredGrid::Query::SampleParameters
protected

Definition at line 322 of file vtkCellGridToUnstructuredGrid.h.

◆ InputCellTypes

vtkSmartPointer<vtkTypeUInt32Array> vtkCellGridToUnstructuredGrid::Query::InputCellTypes
protected

The output arrays saying where each point was sampled (see SetGenerateInputCellArrays()).

Definition at line 324 of file vtkCellGridToUnstructuredGrid.h.

◆ InputCellIds

vtkSmartPointer<vtkTypeUInt64Array> vtkCellGridToUnstructuredGrid::Query::InputCellIds
protected

Definition at line 325 of file vtkCellGridToUnstructuredGrid.h.

◆ InputParameters

vtkSmartPointer<vtkDoubleArray> vtkCellGridToUnstructuredGrid::Query::InputParameters
protected

Definition at line 326 of file vtkCellGridToUnstructuredGrid.h.

◆ ConnectivityCount

ConnectivityCountType vtkCellGridToUnstructuredGrid::Query::ConnectivityCount
protected

The number of samples merged into each output point.

Definition at line 328 of file vtkCellGridToUnstructuredGrid.h.

◆ ConnectivityWeights

ConnectivityWeightType vtkCellGridToUnstructuredGrid::Query::ConnectivityWeights
protected

The reciprocal of every entry in ConnectivityCount.

Definition at line 330 of file vtkCellGridToUnstructuredGrid.h.

◆ TotalCells

vtkIdType vtkCellGridToUnstructuredGrid::Query::TotalCells { 0 }
protected

Totals over every cell type, accumulated with the offsets below.

Definition at line 332 of file vtkCellGridToUnstructuredGrid.h.

◆ TotalConnectivityIds

vtkIdType vtkCellGridToUnstructuredGrid::Query::TotalConnectivityIds { 0 }
protected

Definition at line 333 of file vtkCellGridToUnstructuredGrid.h.

◆ CellArrayOffsets

vtkNew<vtkIdTypeArray> vtkCellGridToUnstructuredGrid::Query::CellArrayOffsets
protected

Storage handed to the output vtkCellArray, written by index.

Definition at line 335 of file vtkCellGridToUnstructuredGrid.h.

◆ CellArrayConnectivity

vtkNew<vtkIdTypeArray> vtkCellGridToUnstructuredGrid::Query::CellArrayConnectivity
protected

Definition at line 336 of file vtkCellGridToUnstructuredGrid.h.


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