VTK  9.7.1
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
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 
36 VTK_ABI_NAMESPACE_BEGIN
39 
40 class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkAppendFilter : public vtkUnstructuredGridAlgorithm
41 {
42 public:
43  static vtkAppendFilter* New();
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
48 
51  vtkDataSet* GetInput(int idx);
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 
104  void RemoveInputData(vtkDataSet* in);
105 
110  vtkDataSetCollection* GetInputList();
111 
113 
118  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
119  vtkGetMacro(OutputPointsPrecision, int);
121 
130  static void AppendArrays(const std::vector<vtkDataSet*>& datasets, int attributesType,
131  vtkDataSet* output, vtkIdType totalNumberOfElements, bool useImplicit);
132 
133 protected:
134  vtkAppendFilter();
135  ~vtkAppendFilter() override;
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 
157 private:
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 
167 VTK_ABI_NAMESPACE_END
168 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
maintain an unordered list of dataset objects
#define VTK_DOUBLE_MAX
Definition: vtkType.h:202
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
static vtkUnstructuredGridAlgorithm * New()
vtkDataSet * GetInput()
Get any input of this filter.
int vtkIdType
Definition: vtkType.h:363
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
int vtkTypeBool
Definition: vtkABI.h:64
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkDataSetCollection * InputList
represent and manipulate attribute data in a dataset
Superclass for algorithms that produce only unstructured grid as output.
appends one or more datasets together into a single unstructured grid
vtkTypeBool MergePoints
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.