VTK  9.6.20260614
vtkAppendFilter.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
95
96#ifndef vtkAppendFilter_h
97#define vtkAppendFilter_h
98
99#include "vtkFiltersCoreModule.h" // For export macro
101#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
102
103#include <vector> // For std::vector
104
105VTK_ABI_NAMESPACE_BEGIN
108
110{
111public:
114 void PrintSelf(ostream& os, vtkIndent indent) override;
115
117
121 vtkDataSet* GetInput() { return this->GetInput(0); }
123
125
131 vtkGetMacro(UseImplicitArray, bool);
132 vtkSetMacro(UseImplicitArray, bool);
133 vtkBooleanMacro(UseImplicitArray, bool);
135
137
144 vtkBooleanMacro(MergePoints, vtkTypeBool);
146
148
155 vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
156 vtkGetMacro(Tolerance, double);
158
160
165 vtkSetMacro(ToleranceIsAbsolute, bool);
166 vtkGetMacro(ToleranceIsAbsolute, bool);
167 vtkBooleanMacro(ToleranceIsAbsolute, bool);
169
174
180
182
188 vtkGetMacro(OutputPointsPrecision, int);
190
199 static void AppendArrays(const std::vector<vtkDataSet*>& datasets, int attributesType,
200 vtkDataSet* output, vtkIdType totalNumberOfElements, bool useImplicit);
201
202protected:
205
206 // Usual data generation method
209 int FillInputPortInformation(int port, vtkInformation* info) override;
210
211 // list of data sets to append together.
212 // Here as a convenience. It is a copy of the input array.
214
215 // If true we will attempt to merge points. Must also not have
216 // ghost cells defined.
218
220 double Tolerance;
221
222 // If true, tolerance is used as is. If false, tolerance is multiplied by
223 // the diagonal of the bounding box of the input.
225
226private:
227 vtkAppendFilter(const vtkAppendFilter&) = delete;
228 void operator=(const vtkAppendFilter&) = delete;
229
230 // Get all input data sets that have points, cells, or both.
231 static std::vector<vtkDataSet*> GetNonEmptyInputs(vtkInformationVector** inputVector);
232
233 bool UseImplicitArray = false;
234};
235
236VTK_ABI_NAMESPACE_END
237#endif
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkDataSetCollection * InputList
void RemoveInputData(vtkDataSet *in)
Remove a dataset from the list of data to append.
vtkDataSet * GetInput()
Get any input of this filter.
vtkTypeBool MergePoints
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkAppendFilter() override
static void AppendArrays(const std::vector< vtkDataSet * > &datasets, int attributesType, vtkDataSet *output, vtkIdType totalNumberOfElements, bool useImplicit)
Find the arrays that exist in each input dataset, and concatenate them in the output.
static vtkAppendFilter * New()
vtkDataSetCollection * GetInputList()
Returns a copy of the input array.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataSet * GetInput(int idx)
Get any input of this filter.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
represent and manipulate attribute data in a dataset
maintain an unordered list of dataset objects
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition vtkABI.h:64
int vtkIdType
Definition vtkType.h:363
#define VTK_DOUBLE_MAX
Definition vtkType.h:202
#define VTK_MARSHALAUTO