41#ifndef vtkCellGridToUnstructuredGrid_h
42#define vtkCellGridToUnstructuredGrid_h
46#include "vtkFiltersCellGridModule.h"
51#include <unordered_map>
53VTK_ABI_NAMESPACE_BEGIN
148 constexpr int maxShift = 8 *
static_cast<int>(
sizeof(
vtkIdType)) - 2;
149 unsigned shift =
static_cast<unsigned>(
151 return static_cast<vtkIdType>(1) << shift;
220 void operator=(
const Query&) =
delete;
A function defined over the physical domain of a vtkCellGrid.
vtkCellGridQuery()=default
A query corresponding to this algorithm.
std::unordered_map< vtkCellAttribute *, vtkDataArray * > AttributeMap
ConnectivityWeightType ConnectivityWeights
The reciprocal of every entry in ConnectivityCount.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkNew< vtkIncrementalOctreePointLocator > Locator
A locator used to insert cell-grid points into a vtkPoints instance.
std::unordered_map< vtkStringToken, OutputAllocation > OutputAllocations
A map used to allocate space for the unstructured-grid's vtkCellArray.
const OutputAllocations & GetOutputAllocations() const
vtkCellGrid * GetInput() const
Get the request's input cell-grid.
vtkIdType GetSubdivisionCount() const
Return the number of subdivisions along each parametric axis.
bool IsAborted()
Return true if the user has asked the filter to stop.
~Query() override=default
ConnectivityCountType ConnectivityCount
Number of cells referencing a given output point.
bool IsAnotherPassRequired() override
Force three passes through this query.
vtkUnstructuredGrid * Output
OutputAllocations & GetOutputAllocations()
Return the data structure used in the CountOutputs pass.
vtkIncrementalOctreePointLocator * GetLocator()
Return the point-locator.
double PointMergeTolerance
The relative distance within which samples merge (see SetPointMergeTolerance()).
friend class vtkCellGridToUnstructuredGrid
OutputAllocations OutputOffsets
Map output cell-typename to input cell-typename to count (offset after the AllocateOutputs pass has r...
vtkDataArray * GetOutputArray(vtkCellAttribute *inputAttribute)
Return an output attribute (or null).
std::vector< float > ConnectivityWeightType
The reciprocal of this->GetConnectivityCount().
ConnectivityCountType & GetConnectivityCount()
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.
vtkUnstructuredGrid * GetOutput() const
Get the request's output cell-grid.
vtkCellGridToUnstructuredGrid * Algorithm
The algorithm running this query, used only to poll for an abort.
PassType
Passes performed by the query.
@ CountOutputs
Responders should insert into GetOutputAllocations().
@ GeneratePointData
Responders should populate point-data.
@ GenerateConnectivity
Responders should insert points into the locator, point-count map, and connectivity.
bool Initialize() override
Override this if your query-result state requires initialization.
std::map< vtkIdType, int > ConnectivityCountType
This map is used to count the number of references to output points.
ConnectivityWeightType & GetConnectivityWeights()
int SubdivisionLevel
How many times each cell is halved per axis (see SetSubdivisionLevel()).
virtual void SetSubdivisionLevel(int level)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual double GetPointMergeTolerance() const
virtual int GetSubdivisionLevel() const
virtual void SetPointMergeTolerance(double tolerance)
static vtkCellGridToUnstructuredGrid * New()
~vtkCellGridToUnstructuredGrid() override=default
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
int RequestData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *ouInfo) override
This is called by the superclass.
vtkCellGridToUnstructuredGrid()=default
Visualization data composed of cells of arbitrary type.
Incremental octree in support of both point location and point insertion.
a simple class to control print indentation
Allocate and hold a VTK object.
vtkUnstructuredGridAlgorithm()
dataset represents arbitrary combinations of all possible cell types
A placeholder for space to be occupied in a vtkCellArray.
vtkIdType NumberOfConnectivityEntries
int CellType
A cell type representative of the output.