VTK: Filters/Core/vtkAppendFilter.h Source File

| VTK 9.3.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
36 #ifndef vtkAppendFilter_h
37 #define vtkAppendFilter_h
38
39 #include "vtkFiltersCoreModule.h" // For export macro
40 #include "vtkUnstructuredGridAlgorithm.h"
41
42 VTK_ABI_NAMESPACE_BEGIN
43 class vtkDataSetAttributes;
44 class vtkDataSetCollection;
45
46 class VTKFILTERSCORE_EXPORT vtkAppendFilter : public vtkUnstructuredGridAlgorithm
47 {
48 public:
49 static vtkAppendFilter* New();
50 vtkTypeMacro(vtkAppendFilter, vtkUnstructuredGridAlgorithm);
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54
57 vtkDataSet* GetInput(int idx);
58 vtkDataSet* GetInput() { return this->GetInput(0); }
60
62
67 vtkGetMacro(MergePoints, vtkTypeBool);
68 vtkSetMacro(MergePoints, vtkTypeBool);
69 vtkBooleanMacro(MergePoints, vtkTypeBool);
71
73
80 vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
81 vtkGetMacro(Tolerance, double);
83
85
90 vtkSetMacro(ToleranceIsAbsolute, bool);
91 vtkGetMacro(ToleranceIsAbsolute, bool);
92 vtkBooleanMacro(ToleranceIsAbsolute, bool);
94
98 void RemoveInputData(vtkDataSet* in);
99
104 vtkDataSetCollection* GetInputList();
105
107
112 vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
113 vtkGetMacro(OutputPointsPrecision, int);
115
116 protected:
117 vtkAppendFilter();
118 ~vtkAppendFilter() override;
119
120 // Usual data generation method
121 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
122 int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
123 int FillInputPortInformation(int port, vtkInformation* info) override;
124
125 // list of data sets to append together.
126 // Here as a convenience. It is a copy of the input array.
127 vtkDataSetCollection* InputList;
128
129 // If true we will attempt to merge points. Must also not have
130 // ghost cells defined.
131 vtkTypeBool MergePoints;
132
133 int OutputPointsPrecision;
134 double Tolerance;
135
136 // If true, tolerance is used as is. If false, tolerance is multiplied by
137 // the diagonal of the bounding box of the input.
138 bool ToleranceIsAbsolute;
139
140 private:
141 vtkAppendFilter(const vtkAppendFilter&) = delete;
142 void operator=(const vtkAppendFilter&) = delete;
143
144 // Get all input data sets that have points, cells, or both.
145 // Caller must delete the returned vtkDataSetCollection.
146 vtkDataSetCollection* GetNonEmptyInputs(vtkInformationVector** inputVector);
147
148 void AppendArrays(int attributesType, vtkInformationVector** inputVector, vtkIdType* globalIds,
149 vtkUnstructuredGrid* output, vtkIdType totalNumberOfElements);
150 };
151
152 VTK_ABI_NAMESPACE_END
153 #endif
vtkAppendFilter
appends one or more datasets together into a single unstructured grid
Definition: vtkAppendFilter.h:47
vtkAppendFilter::vtkAppendFilter
vtkAppendFilter()
vtkAppendFilter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkAppendFilter::GetInput
vtkDataSet * GetInput()
Get any input of this filter.
Definition: vtkAppendFilter.h:58
vtkAppendFilter::GetInputList
vtkDataSetCollection * GetInputList()
Returns a copy of the input array.
vtkAppendFilter::GetInput
vtkDataSet * GetInput(int idx)
Get any input of this filter.
vtkAppendFilter::InputList
vtkDataSetCollection * InputList
Definition: vtkAppendFilter.h:127
vtkAppendFilter::RemoveInputData
void RemoveInputData(vtkDataSet *in)
Remove a dataset from the list of data to append.
vtkAppendFilter::MergePoints
vtkTypeBool MergePoints
Definition: vtkAppendFilter.h:131
vtkAppendFilter::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkAppendFilter::~vtkAppendFilter
~vtkAppendFilter() override
vtkAppendFilter::ToleranceIsAbsolute
bool ToleranceIsAbsolute
Definition: vtkAppendFilter.h:138
vtkAppendFilter::New
static vtkAppendFilter * New()
vtkAppendFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAppendFilter::Tolerance
double Tolerance
Definition: vtkAppendFilter.h:134
vtkAppendFilter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkAppendFilter::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkAppendFilter.h:133
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:65
vtkDataSetCollection
maintain an unordered list of dataset objects
Definition: vtkDataSetCollection.h:30
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:30
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:99
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkIdType
int vtkIdType
Definition: vtkType.h:315
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154
vtkUnstructuredGridAlgorithm.h