VTK
vtkHierarchicalBinningFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHierarchicalBinningFilter.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See LICENSE file for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
70 #ifndef vtkHierarchicalBinningFilter_h
71 #define vtkHierarchicalBinningFilter_h
72 
73 #include "vtkFiltersPointsModule.h" // For export macro
74 #include "vtkPolyDataAlgorithm.h"
75 
76 #define VTK_MAX_LEVEL 12
77 
78 struct vtkBinTree;
79 
80 class VTKFILTERSPOINTS_EXPORT vtkHierarchicalBinningFilter : public vtkPolyDataAlgorithm
81 {
82 public:
84 
90  void PrintSelf(ostream& os, vtkIndent indent) override;
92 
94 
98  vtkSetClampMacro(NumberOfLevels,int,1,VTK_MAX_LEVEL);
99  vtkGetMacro(NumberOfLevels,int);
101 
103 
109  vtkSetMacro(Automatic,bool);
110  vtkGetMacro(Automatic,bool);
111  vtkBooleanMacro(Automatic,bool);
113 
115 
121  vtkSetVector3Macro(Divisions,int);
122  vtkGetVectorMacro(Divisions,int,3);
124 
126 
133  vtkSetVector6Macro(Bounds,double);
134  vtkGetVectorMacro(Bounds,double,6);
136 
143  int GetNumberOfGlobalBins();
144 
150  int GetNumberOfBins(int level);
151 
157  vtkIdType GetLevelOffset(int level, vtkIdType& npts);
158 
165  vtkIdType GetBinOffset(int globalBin, vtkIdType& npts);
166 
173  vtkIdType GetLocalBinOffset(int level, int localBin, vtkIdType& npts);
174 
180  void GetBinBounds(int globalBin, double bounds[6]);
181 
188  void GetLocalBinBounds(int level, int localBin, double bounds[6]);
189 
190 protected:
192  ~vtkHierarchicalBinningFilter() override;
193 
194  // IVars
196  bool Automatic;
197  int Divisions[3];
198  double Bounds[6];
199 
200  // Handle to the underlying implementation. The representation is maintained so
201  // that the convenience functions can be invoked on the bin tree.
202  vtkBinTree *Tree;
203 
205  vtkInformationVector *) override;
206  int FillInputPortInformation(int port, vtkInformation *info) override;
207 
208 private:
210  void operator=(const vtkHierarchicalBinningFilter&) = delete;
211 
212 };
213 
214 #endif
vtkHierarchicalBinningFilter::NumberOfLevels
int NumberOfLevels
Definition: vtkHierarchicalBinningFilter.h:195
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
vtkX3D::level
Definition: vtkX3D.h:395
vtkX3D::port
Definition: vtkX3D.h:447
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkHierarchicalBinningFilter::Automatic
bool Automatic
Definition: vtkHierarchicalBinningFilter.h:196
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkHierarchicalBinningFilter
uniform binning of points into a hierarchical structure
Definition: vtkHierarchicalBinningFilter.h:80
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkX3D::info
Definition: vtkX3D.h:376
vtkHierarchicalBinningFilter::Tree
vtkBinTree * Tree
Definition: vtkHierarchicalBinningFilter.h:202
VTK_MAX_LEVEL
#define VTK_MAX_LEVEL
Definition: vtkHierarchicalBinningFilter.h:76
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41