VTK  9.0.1
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 class VTKFILTERSPOINTS_EXPORT vtkVoxelGrid : public vtkPolyDataAlgorithm
57 {
58 public:
60 
64  static vtkVoxelGrid* New();
66  void PrintSelf(ostream& os, vtkIndent indent) override;
68 
72  enum Style
73  {
74  MANUAL = 0,
75  SPECIFY_LEAF_SIZE = 1,
76  AUTOMATIC = 2
77  };
78 
80 
88  vtkSetMacro(ConfigurationStyle, int);
89  vtkGetMacro(ConfigurationStyle, int);
90  void SetConfigurationStyleToManual() { this->SetConfigurationStyle(MANUAL); }
91  void SetConfigurationStyleToLeafSize() { this->SetConfigurationStyle(SPECIFY_LEAF_SIZE); }
92  void SetConfigurationStyleToAutomatic() { this->SetConfigurationStyle(AUTOMATIC); }
94 
96 
102  vtkSetVector3Macro(Divisions, int);
103  vtkGetVectorMacro(Divisions, int, 3);
105 
107 
113  vtkSetVector3Macro(LeafSize, double);
114  vtkGetVectorMacro(LeafSize, double, 3);
116 
118 
124  vtkSetClampMacro(NumberOfPointsPerBin, int, 1, VTK_INT_MAX);
125  vtkGetMacro(NumberOfPointsPerBin, int);
127 
129 
134  void SetKernel(vtkInterpolationKernel* kernel);
135  vtkGetObjectMacro(Kernel, vtkInterpolationKernel);
137 
138 protected:
139  vtkVoxelGrid();
140  ~vtkVoxelGrid() override;
141 
144 
145  int Divisions[3];
146  double LeafSize[3];
149 
151  int FillInputPortInformation(int port, vtkInformation* info) override;
152 
153 private:
154  vtkVoxelGrid(const vtkVoxelGrid&) = delete;
155  void operator=(const vtkVoxelGrid&) = delete;
156 };
157 
158 #endif
void SetConfigurationStyleToManual()
Configure how the filter is to operate.
Definition: vtkVoxelGrid.h:90
base class for interpolation kernels
void SetConfigurationStyleToAutomatic()
Configure how the filter is to operate.
Definition: vtkVoxelGrid.h:92
int NumberOfPointsPerBin
Definition: vtkVoxelGrid.h:147
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:155
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:72
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkInterpolationKernel * Kernel
Definition: vtkVoxelGrid.h:148
quickly locate points in 3-space
subsample points using uniform binning
Definition: vtkVoxelGrid.h:56
vtkStaticPointLocator * Locator
Definition: vtkVoxelGrid.h:142
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:91
int ConfigurationStyle
Definition: vtkVoxelGrid.h:143