VTK  9.5.20251207
vtkBinnedDecimation.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
79
80#ifndef vtkBinnedDecimation_h
81#define vtkBinnedDecimation_h
82
83#include "vtkFiltersCoreModule.h" // For export macro
85#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
86
87VTK_ABI_NAMESPACE_BEGIN
88class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkBinnedDecimation : public vtkPolyDataAlgorithm
89{
90public:
92
97 void PrintSelf(ostream& os, vtkIndent indent) override;
99
101
115 vtkGetMacro(NumberOfXDivisions, int);
116 vtkGetMacro(NumberOfYDivisions, int);
117 vtkGetMacro(NumberOfZDivisions, int);
118 void SetNumberOfDivisions(int div[3]) { this->SetNumberOfDivisions(div[0], div[1], div[2]); }
119 void SetNumberOfDivisions(int div0, int div1, int div2);
121 void GetNumberOfDivisions(int div[3]);
123
125
130 vtkSetMacro(AutoAdjustNumberOfDivisions, bool);
131 vtkGetMacro(AutoAdjustNumberOfDivisions, bool);
132 vtkBooleanMacro(AutoAdjustNumberOfDivisions, bool);
134
136
142 void SetDivisionOrigin(double x, double y, double z);
143 void SetDivisionOrigin(double o[3]) { this->SetDivisionOrigin(o[0], o[1], o[2]); }
144 vtkGetVector3Macro(DivisionOrigin, double);
145 void SetDivisionSpacing(double x, double y, double z);
146 void SetDivisionSpacing(double s[3]) { this->SetDivisionSpacing(s[0], s[1], s[2]); }
147 vtkGetVector3Macro(DivisionSpacing, double);
149
151
170 enum
171 {
176 };
178 vtkGetMacro(PointGenerationMode, int);
184
186
196 vtkSetMacro(ProducePointData, bool);
197 vtkGetMacro(ProducePointData, bool);
198 vtkBooleanMacro(ProducePointData, bool);
200
202
206 vtkSetMacro(ProduceCellData, bool);
207 vtkGetMacro(ProduceCellData, bool);
208 vtkBooleanMacro(ProduceCellData, bool);
209
211
217 bool GetLargeIds() { return this->LargeIds; }
218
219protected:
222
225
230
231 // Since there are two ways of specifying the grid, we the the flag below
232 // to indicate which the user has set. When this flag is on, the bin sizes
233 // are computed from the DivisionOrigin and DivisionSpacing.
235
237 double DivisionOrigin[3];
239 double Bounds[6];
240
245
246 // Helper function
248
249private:
251 void operator=(const vtkBinnedDecimation&) = delete;
252};
253
254VTK_ABI_NAMESPACE_END
255#endif
void SetDivisionSpacing(double x, double y, double z)
This is an alternative way to set up the bins.
void SetPointGenerationModeToBinCenters()
Four options exist for generating output points.
void ConfigureBinning(vtkPolyData *input, vtkIdType numPts)
void SetNumberOfYDivisions(int num)
Set/Get the number of divisions along each axis for the spatial bins.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard instantiation, type and print methods.
~vtkBinnedDecimation() override
void SetNumberOfZDivisions(int num)
Set/Get the number of divisions along each axis for the spatial bins.
void SetDivisionOrigin(double o[3])
This is an alternative way to set up the bins.
void SetDivisionOrigin(double x, double y, double z)
This is an alternative way to set up the bins.
bool GetLargeIds()
Return a flag indicating whether large ids were used during execution.
void SetPointGenerationModeToBinAverages()
Four options exist for generating output points.
void SetNumberOfXDivisions(int num)
Set/Get the number of divisions along each axis for the spatial bins.
virtual void SetPointGenerationMode(int)
Four options exist for generating output points.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetNumberOfDivisions(int div[3])
Set/Get the number of divisions along each axis for the spatial bins.
int * GetNumberOfDivisions()
Set/Get the number of divisions along each axis for the spatial bins.
void SetPointGenerationModeToBinPoints()
Four options exist for generating output points.
void SetPointGenerationModeToUseInputPoints()
Four options exist for generating output points.
void SetDivisionSpacing(double s[3])
This is an alternative way to set up the bins.
static vtkBinnedDecimation * New()
Standard instantiation, type and print methods.
void SetNumberOfDivisions(int div0, int div1, int div2)
Set/Get the number of divisions along each axis for the spatial bins.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
concrete dataset represents vertices, lines, polygons, and triangle strips
int vtkIdType
Definition vtkType.h:367
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO