3#ifndef vtkCellGridFindCriticalPoints_h
4#define vtkCellGridFindCriticalPoints_h
9#include "vtkFiltersCellGridModule.h"
15#include <unordered_map>
18VTK_ABI_NAMESPACE_BEGIN
121 std::vector<std::vector<vtk::basis::bezier::CriticalPoint>> criticalPointsByCell);
134 vtkStringToken cellTypeName, std::vector<std::vector<int>> typesByCell);
169 std::unordered_map<vtkStringToken, std::vector<std::vector<vtk::basis::bezier::CriticalPoint>>>
172 std::unordered_map<vtkStringToken, std::vector<std::vector<int>>>
Types;
184 void operator=(
const Query&) =
delete;
A function defined over the physical domain of a vtkCellGrid.
A cell-grid query for locating a cell-attribute's critical points.
vtkIdType GetCellOffset(vtkIdType cellTypeOffset, vtkIdType cellId) const
Return the output index Allocate() assigned to the critical points of cell cellId (local to its type)...
vtkMTimeType GetMTime() override
Return the MTime also considering the cell-attribute.
void SetCriticalPointTypes(vtkStringToken cellTypeName, std::vector< std::vector< int > > typesByCell)
Called by a responder during the CountOutputs pass to cache each critical point's classification (the...
PassType
The passes a responder is run through: first solve every cell of its type (caching the results,...
virtual void SetCellAttribute(vtkCellAttribute *)
vtkCellGrid * GetInput() const
Get the request's input cell-grid.
vtkPolyData * GetOutput() const
Get the request's output point set.
vtkIdType GetCellTypeOffset(vtkStringToken cellTypeName) const
Return cellTypeName's own base index into GetCellOffset()'s dense numbering.
void SetCriticalPoints(vtkStringToken cellTypeName, std::vector< std::vector< vtk::basis::bezier::CriticalPoint > > criticalPointsByCell)
Called by a responder during the CountOutputs pass to cache the critical points found for every cell ...
friend class vtkCellGridFindCriticalPoints
std::unordered_map< vtkStringToken, vtkIdType > CellIndexBase
Each cell type's own base index into CellOffsets' dense, flattened (type, local cell ID) numbering.
bool Initialize() override
Override this if your query-result state requires initialization.
void Allocate()
Size the output's points and point-data arrays, assign each cell type a contiguous slice of them (Get...
vtkSmartPointer< vtkIdTypeArray > CellOffsets
Per-cell (dense, every type, including cells with none) prefix sum of critical-point counts,...
std::unordered_map< vtkStringToken, std::vector< std::vector< vtk::basis::bezier::CriticalPoint > > > CriticalPoints
std::unordered_map< vtkStringToken, std::vector< std::vector< int > > > Types
Parallel to CriticalPoints - same keys, same per-cell indexing.
const std::vector< std::vector< vtk::basis::bezier::CriticalPoint > > & GetCriticalPoints(vtkStringToken cellTypeName) const
Return the critical points SetCriticalPoints() cached for cellTypeName, or an empty vector if that ce...
bool IsAnotherPassRequired() override
Force three passes through this query.
const std::vector< std::vector< int > > & GetCriticalPointTypes(vtkStringToken cellTypeName) const
Return the classifications SetCriticalPointTypes() cached for cellTypeName, or an empty vector if tha...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCellAttribute * CellAttribute
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
This is called by the superclass.
static vtkCellGridFindCriticalPoints * New()
vtkMTimeType GetMTime() override
Return the MTime also considering the query.
vtkCellGridFindCriticalPoints()
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetCellAttribute(vtkCellAttribute *attribute)
Set/get the cell-attribute whose critical points should be located.
~vtkCellGridFindCriticalPoints() override=default
vtkCellGridQuery()=default
Visualization data composed of cells of arbitrary type.
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Allocate and hold a VTK object.
concrete dataset represents vertices, lines, polygons, and triangle strips
Hold a reference to a vtkObjectBase instance.
Represent a string by its integer hash.
vtkTypeUInt32 vtkMTimeType