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 =========================================================================*/
50 #ifndef vtkVoxelGrid_h
51 #define vtkVoxelGrid_h
52 
53 #include "vtkFiltersPointsModule.h" // For export macro
54 #include "vtkPolyDataAlgorithm.h"
55 
58 
59 
60 class VTKFILTERSPOINTS_EXPORT vtkVoxelGrid : public vtkPolyDataAlgorithm
61 {
62 public:
64 
68  static vtkVoxelGrid *New();
70  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
76  enum Style
77  {
78  MANUAL=0,
79  SPECIFY_LEAF_SIZE=1,
80  AUTOMATIC=2
81  };
82 
84 
92  vtkSetMacro(ConfigurationStyle,int);
93  vtkGetMacro(ConfigurationStyle,int);
95  { this->SetConfigurationStyle(MANUAL); }
97  { this->SetConfigurationStyle(SPECIFY_LEAF_SIZE); }
99  { this->SetConfigurationStyle(AUTOMATIC); }
101 
103 
109  vtkSetVector3Macro(Divisions,int);
110  vtkGetVectorMacro(Divisions,int,3);
112 
114 
120  vtkSetVector3Macro(LeafSize,double);
121  vtkGetVectorMacro(LeafSize,double,3);
123 
125 
131  vtkSetClampMacro(NumberOfPointsPerBin,int,1,VTK_INT_MAX);
132  vtkGetMacro(NumberOfPointsPerBin,int);
134 
136 
141  void SetKernel(vtkInterpolationKernel *kernel);
142  vtkGetObjectMacro(Kernel,vtkInterpolationKernel);
144 
145 protected:
146  vtkVoxelGrid();
147  ~vtkVoxelGrid() override;
148 
151 
152  int Divisions[3];
153  double LeafSize[3];
156 
158  vtkInformationVector *) override;
159  int FillInputPortInformation(int port, vtkInformation *info) override;
160 
161 private:
162  vtkVoxelGrid(const vtkVoxelGrid&) = delete;
163  void operator=(const vtkVoxelGrid&) = delete;
164 
165 };
166 
167 #endif
void SetConfigurationStyleToManual()
Configure how the filter is to operate.
Definition: vtkVoxelGrid.h:94
base class for interpolation kernels
void SetConfigurationStyleToAutomatic()
Configure how the filter is to operate.
Definition: vtkVoxelGrid.h:98
int NumberOfPointsPerBin
Definition: vtkVoxelGrid.h:154
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:159
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:76
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkInterpolationKernel * Kernel
Definition: vtkVoxelGrid.h:155
quickly locate points in 3-space
subsample points using uniform binning
Definition: vtkVoxelGrid.h:60
vtkStaticPointLocator * Locator
Definition: vtkVoxelGrid.h:149
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:96
int ConfigurationStyle
Definition: vtkVoxelGrid.h:150