VTK
vtkVoxelGrid.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVoxelGrid.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 =========================================================================*/
47 #ifndef vtkVoxelGrid_h
48 #define vtkVoxelGrid_h
49 
50 #include "vtkFiltersPointsModule.h" // For export macro
51 #include "vtkPolyDataAlgorithm.h"
52 
55 
56 
57 class VTKFILTERSPOINTS_EXPORT vtkVoxelGrid : public vtkPolyDataAlgorithm
58 {
59 public:
61 
65  static vtkVoxelGrid *New();
67  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
73  enum Style
74  {
75  MANUAL=0,
76  SPECIFY_LEAF_SIZE=1,
77  AUTOMATIC=2
78  };
79 
81 
89  vtkSetMacro(ConfigurationStyle,int);
90  vtkGetMacro(ConfigurationStyle,int);
92  { this->SetConfigurationStyle(MANUAL); }
94  { this->SetConfigurationStyle(SPECIFY_LEAF_SIZE); }
96  { this->SetConfigurationStyle(AUTOMATIC); }
98 
100 
106  vtkSetVector3Macro(Divisions,int);
107  vtkGetVectorMacro(Divisions,int,3);
109 
111 
117  vtkSetVector3Macro(LeafSize,double);
118  vtkGetVectorMacro(LeafSize,double,3);
120 
122 
128  vtkSetClampMacro(NumberOfPointsPerBin,int,1,VTK_INT_MAX);
129  vtkGetMacro(NumberOfPointsPerBin,int);
131 
133 
138  void SetKernel(vtkInterpolationKernel *kernel);
139  vtkGetObjectMacro(Kernel,vtkInterpolationKernel);
141 
142 protected:
143  vtkVoxelGrid();
144  ~vtkVoxelGrid() override;
145 
148 
149  int Divisions[3];
150  double LeafSize[3];
153 
155  vtkInformationVector *) override;
156  int FillInputPortInformation(int port, vtkInformation *info) override;
157 
158 private:
159  vtkVoxelGrid(const vtkVoxelGrid&) = delete;
160  void operator=(const vtkVoxelGrid&) = delete;
161 
162 };
163 
164 #endif
void SetConfigurationStyleToManual()
Configure how the filter is to operate.
Definition: vtkVoxelGrid.h:91
base class for interpolation kernels
void SetConfigurationStyleToAutomatic()
Configure how the filter is to operate.
Definition: vtkVoxelGrid.h:95
int NumberOfPointsPerBin
Definition: vtkVoxelGrid.h:151
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:157
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
Style
This enum is used to configure the operation of the filter.
Definition: vtkVoxelGrid.h:73
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkInterpolationKernel * Kernel
Definition: vtkVoxelGrid.h:152
quickly locate points in 3-space
subsample points using uniform binning
Definition: vtkVoxelGrid.h:57
vtkStaticPointLocator * Locator
Definition: vtkVoxelGrid.h:146
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.
void SetConfigurationStyleToLeafSize()
Configure how the filter is to operate.
Definition: vtkVoxelGrid.h:93
int ConfigurationStyle
Definition: vtkVoxelGrid.h:147