VTK  9.3.20240423
vtkVoxelGrid.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-CLAUSE
38#ifndef vtkVoxelGrid_h
39#define vtkVoxelGrid_h
40
41#include "vtkFiltersPointsModule.h" // For export macro
43
44VTK_ABI_NAMESPACE_BEGIN
47
48class VTKFILTERSPOINTS_EXPORT vtkVoxelGrid : public vtkPolyDataAlgorithm
49{
50public:
52
56 static vtkVoxelGrid* New();
58 void PrintSelf(ostream& os, vtkIndent indent) override;
60
64 enum Style
65 {
66 MANUAL = 0,
67 SPECIFY_LEAF_SIZE = 1,
68 AUTOMATIC = 2
69 };
70
72
80 vtkSetMacro(ConfigurationStyle, int);
81 vtkGetMacro(ConfigurationStyle, int);
82 void SetConfigurationStyleToManual() { this->SetConfigurationStyle(MANUAL); }
83 void SetConfigurationStyleToLeafSize() { this->SetConfigurationStyle(SPECIFY_LEAF_SIZE); }
84 void SetConfigurationStyleToAutomatic() { this->SetConfigurationStyle(AUTOMATIC); }
86
88
94 vtkSetVector3Macro(Divisions, int);
95 vtkGetVectorMacro(Divisions, int, 3);
97
99
105 vtkSetVector3Macro(LeafSize, double);
106 vtkGetVectorMacro(LeafSize, double, 3);
108
110
116 vtkSetClampMacro(NumberOfPointsPerBin, int, 1, VTK_INT_MAX);
117 vtkGetMacro(NumberOfPointsPerBin, int);
119
121
127 vtkGetObjectMacro(Kernel, vtkInterpolationKernel);
129
130protected:
132 ~vtkVoxelGrid() override;
133
136
137 int Divisions[3];
138 double LeafSize[3];
141
143 int FillInputPortInformation(int port, vtkInformation* info) override;
144
145private:
146 vtkVoxelGrid(const vtkVoxelGrid&) = delete;
147 void operator=(const vtkVoxelGrid&) = delete;
148};
149
150VTK_ABI_NAMESPACE_END
151#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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
void SetConfigurationStyleToLeafSize()
Configure how the filter is to operate.
Style
This enum is used to configure the operation of the filter.
vtkInterpolationKernel * Kernel
void SetConfigurationStyleToManual()
Configure how the filter is to operate.
~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
void SetConfigurationStyleToAutomatic()
Configure how the filter is to operate.
static vtkVoxelGrid * New()
Standard methods for instantiating, obtaining type information, and printing information.
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
#define VTK_INT_MAX
Definition vtkType.h:144