VTK  9.3.20240418
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 
136 
143 
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:
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 
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
~vtkHierarchicalBinningFilter() override
static vtkHierarchicalBinningFilter * New()
Standard methods for instantiating, obtaining type information, and printing information.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void GetLocalBinBounds(int level, int localBin, double bounds[6])
Convenience methods for extracting useful information about a bin tree.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiating, obtaining type information, and printing information.
vtkIdType GetLocalBinOffset(int level, int localBin, vtkIdType &npts)
Convenience methods for extracting useful information about this bin tree.
void GetBinBounds(int globalBin, double bounds[6])
Convenience methods for extracting useful information about a bin tree.
vtkIdType GetLevelOffset(int level, vtkIdType &npts)
Convenience methods for extracting useful information about this bin tree.
int GetNumberOfBins(int level)
Convenience methods for extracting useful information about this bin tree.
vtkIdType GetBinOffset(int globalBin, vtkIdType &npts)
Convenience methods for extracting useful information about this bin tree.
int GetNumberOfGlobalBins()
Convenience methods for extracting useful information about this bin tree.
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
@ info
Definition: vtkX3D.h:376
@ level
Definition: vtkX3D.h:395
@ port
Definition: vtkX3D.h:447
#define VTK_MAX_LEVEL
int vtkIdType
Definition: vtkType.h:315