14#ifndef vtkCellGridSampleQuery_h
15#define vtkCellGridSampleQuery_h
19#include "vtkFiltersCellGridModule.h"
25VTK_ABI_NAMESPACE_BEGIN
32class vtkTypeUInt32Array;
47 vtkSetMacro(IncludeSourceCellInfo,
bool);
48 vtkGetMacro(IncludeSourceCellInfo,
bool);
49 vtkBooleanMacro(IncludeSourceCellInfo,
bool);
63 vtkSetMacro(IncludeSourceCellSite,
bool);
64 vtkGetMacro(IncludeSourceCellSite,
bool);
65 vtkBooleanMacro(IncludeSourceCellSite,
bool);
150 vtkSetMacro(MaximumParametricDimension,
int);
151 vtkGetMacro(MaximumParametricDimension,
int);
162 bool IncludeSourceCellInfo{
false };
163 bool IncludeSourceCellSite{
false };
164 int MaximumParametricDimension{ 0 };
167 OutputAllocations OutputOffsets;
169 std::unordered_map<vtkCellAttribute*, vtkDataArray*> AttributeMap;
171 vtkSmartPointer<vtkTypeUInt32Array> SourceCellType;
173 vtkSmartPointer<vtkIdTypeArray> SourceCellId;
175 vtkSmartPointer<vtkDataArray> SourceCellSite;
177 vtkCellGridSampleQuery(
const vtkCellGridSampleQuery&) =
delete;
178 void operator=(
const vtkCellGridSampleQuery&) =
delete;
A function defined over the physical domain of a vtkCellGrid.
vtkCellGridQuery()=default
vtkDataArray * GetOutputAttributeColumn(vtkCellAttribute *inputAttribute)
Return an output table column (or null) given an input cell attribute.
~vtkCellGridSampleQuery() override=default
vtkDataArray * GetSourceCellSiteColumn()
Return the data array holding the parametric coordinates (if applicable) of each sample in the output...
OutputAllocations & GetOutputAllocations()
Return the data structure that AddOutputSamples() modifies in the PassType::CountOutputs pass.
static vtkCellGridSampleQuery * New()
PassType
Passes used during processing of this query.
@ GenerateOutputs
Responders insert samples into the output table.
@ CountOutputs
Responders call AddOutputSamples with an output row count.
void StartPass() override
Mark the start of a pass through each cell type.
vtkIdTypeArray * GetSourceCellIdColumn()
Return the data array holding the input cell ID of each sample (if requested).
vtkIdType GetSampleOffset(vtkStringToken inputCellType)
Responders should call this method during the GenerateOutputs pass to obtain the starting row of the ...
vtkCellGridSampleQuery()=default
bool IsAnotherPassRequired() override
Force two passes through this query.
const OutputAllocations & GetOutputAllocations() const
bool Initialize() override
Overridden.
std::unordered_map< vtkStringToken, vtkIdType > OutputAllocations
A map used to allocate output table rows for various input cell types.
void AddOutputSamples(vtkStringToken inputCellType, vtkIdType numberOfOutputs)
Responders should call this method during the CountOutputs pass to allocate space in an output cell t...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Visualization data composed of cells of arbitrary type.
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Hold a reference to a vtkObjectBase instance.
Represent a string by its integer hash.
A table, which contains similar-typed columns of data.