VTK  9.7.20260805
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
26
27#ifndef vtkAppendFilter_h
28#define vtkAppendFilter_h
29
30#include "vtkFiltersCoreModule.h" // For export macro
32#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
33
34#include <vector> // For std::vector
35
36VTK_ABI_NAMESPACE_BEGIN
39
41{
42public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
52 vtkDataSet* GetInput() { return this->GetInput(0); }
54
56
62 vtkGetMacro(UseImplicitArray, bool);
63 vtkSetMacro(UseImplicitArray, bool);
64 vtkBooleanMacro(UseImplicitArray, bool);
66
68
73 vtkGetMacro(MergePoints, vtkTypeBool);
74 vtkSetMacro(MergePoints, vtkTypeBool);
75 vtkBooleanMacro(MergePoints, vtkTypeBool);
77
79
86 vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
87 vtkGetMacro(Tolerance, double);
89
91
96 vtkSetMacro(ToleranceIsAbsolute, bool);
97 vtkGetMacro(ToleranceIsAbsolute, bool);
98 vtkBooleanMacro(ToleranceIsAbsolute, bool);
100
105
111
113
119 vtkGetMacro(OutputPointsPrecision, int);
121
130 static void AppendArrays(const std::vector<vtkDataSet*>& datasets, int attributesType,
131 vtkDataSet* output, vtkIdType totalNumberOfElements, bool useImplicit);
132
133protected:
136
137 // Usual data generation method
140 int FillInputPortInformation(int port, vtkInformation* info) override;
141
142 // list of data sets to append together.
143 // Here as a convenience. It is a copy of the input array.
145
146 // If true we will attempt to merge points. Must also not have
147 // ghost cells defined.
149
151 double Tolerance;
152
153 // If true, tolerance is used as is. If false, tolerance is multiplied by
154 // the diagonal of the bounding box of the input.
156
157private:
158 vtkAppendFilter(const vtkAppendFilter&) = delete;
159 void operator=(const vtkAppendFilter&) = delete;
160
161 // Get all input data sets that have points, cells, or both.
162 static std::vector<vtkDataSet*> GetNonEmptyInputs(vtkInformationVector** inputVector);
163
164 bool UseImplicitArray = false;
165};
166
167VTK_ABI_NAMESPACE_END
168#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:56
a simple class to control print indentation
Definition vtkIndent.h:29
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