VTK  9.3.1
vtkHierarchicalBinningFilter.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
61 #ifndef vtkHierarchicalBinningFilter_h
62 #define vtkHierarchicalBinningFilter_h
63 
64 #include "vtkFiltersPointsModule.h" // For export macro
65 #include "vtkPolyDataAlgorithm.h"
66 
67 #define VTK_MAX_LEVEL 12
68 
69 VTK_ABI_NAMESPACE_BEGIN
70 struct vtkBinTree;
71 
72 class VTKFILTERSPOINTS_EXPORT vtkHierarchicalBinningFilter : public vtkPolyDataAlgorithm
73 {
74 public:
76 
82  void PrintSelf(ostream& os, vtkIndent indent) override;
84 
86 
90  vtkSetClampMacro(NumberOfLevels, int, 1, VTK_MAX_LEVEL);
91  vtkGetMacro(NumberOfLevels, int);
93 
95 
101  vtkSetMacro(Automatic, bool);
102  vtkGetMacro(Automatic, bool);
103  vtkBooleanMacro(Automatic, bool);
105 
107 
113  vtkSetVector3Macro(Divisions, int);
114  vtkGetVectorMacro(Divisions, int, 3);
116 
118 
125  vtkSetVector6Macro(Bounds, double);
126  vtkGetVectorMacro(Bounds, double, 6);
128 
135  int GetNumberOfGlobalBins();
136 
142  int GetNumberOfBins(int level);
143 
149  vtkIdType GetLevelOffset(int level, vtkIdType& npts);
150 
157  vtkIdType GetBinOffset(int globalBin, vtkIdType& npts);
158 
165  vtkIdType GetLocalBinOffset(int level, int localBin, vtkIdType& npts);
166 
172  void GetBinBounds(int globalBin, double bounds[6]);
173 
180  void GetLocalBinBounds(int level, int localBin, double bounds[6]);
181 
182 protected:
184  ~vtkHierarchicalBinningFilter() override;
185 
186  // IVars
188  bool Automatic;
189  int Divisions[3];
190  double Bounds[6];
191 
192  // Handle to the underlying implementation. The representation is maintained so
193  // that the convenience functions can be invoked on the bin tree.
194  vtkBinTree* Tree;
195 
197  int FillInputPortInformation(int port, vtkInformation* info) override;
198 
199 private:
201  void operator=(const vtkHierarchicalBinningFilter&) = delete;
202 };
203 
204 VTK_ABI_NAMESPACE_END
205 #endif
uniform binning of points into a hierarchical structure
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
int vtkIdType
Definition: vtkType.h:315
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
#define VTK_MAX_LEVEL
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.