VTK  9.2.6
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 class VTKFILTERSPOINTS_EXPORT vtkVoxelGrid : public vtkPolyDataAlgorithm
60 {
61 public:
63 
67  static vtkVoxelGrid* New();
69  void PrintSelf(ostream& os, vtkIndent indent) override;
71 
75  enum Style
76  {
77  MANUAL = 0,
78  SPECIFY_LEAF_SIZE = 1,
79  AUTOMATIC = 2
80  };
81 
83 
91  vtkSetMacro(ConfigurationStyle, int);
92  vtkGetMacro(ConfigurationStyle, int);
93  void SetConfigurationStyleToManual() { this->SetConfigurationStyle(MANUAL); }
94  void SetConfigurationStyleToLeafSize() { this->SetConfigurationStyle(SPECIFY_LEAF_SIZE); }
95  void SetConfigurationStyleToAutomatic() { this->SetConfigurationStyle(AUTOMATIC); }
97 
99 
105  vtkSetVector3Macro(Divisions, int);
106  vtkGetVectorMacro(Divisions, int, 3);
108 
110 
116  vtkSetVector3Macro(LeafSize, double);
117  vtkGetVectorMacro(LeafSize, double, 3);
119 
121 
127  vtkSetClampMacro(NumberOfPointsPerBin, int, 1, VTK_INT_MAX);
128  vtkGetMacro(NumberOfPointsPerBin, int);
130 
132 
138  vtkGetObjectMacro(Kernel, vtkInterpolationKernel);
140 
141 protected:
143  ~vtkVoxelGrid() override;
144 
147 
148  int Divisions[3];
149  double LeafSize[3];
152 
155 
156 private:
157  vtkVoxelGrid(const vtkVoxelGrid&) = delete;
158  void operator=(const vtkVoxelGrid&) = delete;
159 };
160 
161 #endif
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
base class for interpolation kernels
Superclass for algorithms that produce only polydata as output.
quickly locate points in 3-space
subsample points using uniform binning
Definition: vtkVoxelGrid.h:60
static vtkVoxelGrid * New()
Standard methods for instantiating, obtaining type information, and printing information.
void SetConfigurationStyleToLeafSize()
Configure how the filter is to operate.
Definition: vtkVoxelGrid.h:94
Style
This enum is used to configure the operation of the filter.
Definition: vtkVoxelGrid.h:76
vtkInterpolationKernel * Kernel
Definition: vtkVoxelGrid.h:151
void SetConfigurationStyleToManual()
Configure how the filter is to operate.
Definition: vtkVoxelGrid.h:93
~vtkVoxelGrid() override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetKernel(vtkInterpolationKernel *kernel)
Specify an interpolation kernel to combine the point attributes.
int NumberOfPointsPerBin
Definition: vtkVoxelGrid.h:150
void SetConfigurationStyleToAutomatic()
Configure how the filter is to operate.
Definition: vtkVoxelGrid.h:95
int ConfigurationStyle
Definition: vtkVoxelGrid.h:146
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiating, obtaining type information, and printing information.
vtkStaticPointLocator * Locator
Definition: vtkVoxelGrid.h:145
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
#define VTK_INT_MAX
Definition: vtkType.h:155