VTK  9.7.1
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 
28 VTK_ABI_NAMESPACE_BEGIN
29 
30 class vtkDoubleArray;
32 
33 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridCellSizeStrategy
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
45  void Initialize(vtkHyperTreeGrid* inputHTG) override;
46 
56 
62 
63 private:
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 
89 VTK_ABI_NAMESPACE_END
90 #endif // vtkHyperTreeGridCellSizeStrategy_h
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
int vtkIdType
Definition: vtkType.h:363
virtual vtkDataArray * GetAndFinalizeArray()=0
Reimplement to build the output array from internally stored values.
Define the CellSize field used in vtkHyperTreeGridGenerateFields.
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
Abstract class for field definition used by vtkHyperTreeGridGenerateFields.
dynamic, self-adjusting array of unsigned char
virtual void Initialize([[maybe_unused]] vtkHyperTreeGrid *inputHTG)
Reimplement to initialize internal structures based on the given input HTG.
virtual void Compute(vtkHyperTreeGridNonOrientedGeometryCursor *)
Reimplement to compute the data for the current cell.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...