VTK  9.4.20241010
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
66
67#define VTK_MAX_LEVEL 12
68
69VTK_ABI_NAMESPACE_BEGIN
70struct vtkBinTree;
71
72class VTKFILTERSPOINTS_EXPORT vtkHierarchicalBinningFilter : public vtkPolyDataAlgorithm
73{
74public:
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
142 int GetNumberOfBins(int level);
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
182protected:
185
186 // IVars
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
199private:
201 void operator=(const vtkHierarchicalBinningFilter&) = delete;
202};
203
204VTK_ABI_NAMESPACE_END
205#endif
uniform binning of points into a hierarchical structure
~vtkHierarchicalBinningFilter() override
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.
static vtkHierarchicalBinningFilter * New()
Standard methods for instantiating, obtaining type information, and printing information.
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.
#define VTK_MAX_LEVEL
int vtkIdType
Definition vtkType.h:315