VTK  9.4.20250221
vtkHyperTreeGridCellSizeStrategy.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
18#ifndef vtkHyperTreeGridCellSizeStrategy_h
19#define vtkHyperTreeGridCellSizeStrategy_h
20
21#include "vtkFiltersHyperTreeModule.h" // For export macro
23#include "vtkIndexedArray.h"
24#include "vtkNew.h"
25
26#include <unordered_map>
27
28VTK_ABI_NAMESPACE_BEGIN
29
30class vtkDoubleArray;
32
33class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridCellSizeStrategy
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
45 void Initialize(vtkHyperTreeGrid* inputHTG) override;
46
56
62
63private:
66
72 bool InsertSize(double cellSize, vtkIdType currentIndex);
73
78 void ConvertSizes();
79
80 bool UseIndexedVolume = true;
81 std::unordered_map<double, unsigned char> VolumeLookup;
82 vtkNew<vtkUnsignedCharArray> SizeIndirectionTable;
83 vtkNew<vtkDoubleArray> SizeDiscreteValues;
84 vtkNew<vtkDoubleArray> SizeFullValues;
85
86 vtkNew<vtkIndexedArray<double>> OutputSizeArray;
87};
88
89VTK_ABI_NAMESPACE_END
90#endif // vtkHyperTreeGridCellSizeStrategy_h
abstract superclass for arrays of numeric data
dynamic, self-adjusting array of double
Define the CellSize field used in vtkHyperTreeGridGenerateFields.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkHyperTreeGridCellSizeStrategy * New()
vtkDataArray * GetAndFinalizeArray() override
If UseIndexedVolume is true, build and return the output as an implicit indexed array.
void Initialize(vtkHyperTreeGrid *inputHTG) override
Init internal variables from inputHTG.
void Compute(vtkHyperTreeGridNonOrientedGeometryCursor *cursor) override
Record the depth of the cell pointed by the cursor in an internal structure.
Abstract class for field definition used by vtkHyperTreeGridGenerateFields.
virtual void Compute(vtkHyperTreeGridNonOrientedGeometryCursor *)
Reimplement to compute the data for the current cell.
virtual void Initialize(vtkHyperTreeGrid *vtkMaybeUnused(inputHTG))
Reimplement to initialize internal structures based on the given input HTG.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:167
dynamic, self-adjusting array of unsigned char
int vtkIdType
Definition vtkType.h:315