VTK  9.1.0
vtkAppendFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAppendFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
105 #ifndef vtkAppendFilter_h
106 #define vtkAppendFilter_h
107 
108 #include "vtkFiltersCoreModule.h" // For export macro
110 
113 
114 class VTKFILTERSCORE_EXPORT vtkAppendFilter : public vtkUnstructuredGridAlgorithm
115 {
116 public:
117  static vtkAppendFilter* New();
119  void PrintSelf(ostream& os, vtkIndent indent) override;
120 
122 
125  vtkDataSet* GetInput(int idx);
126  vtkDataSet* GetInput() { return this->GetInput(0); }
128 
130 
135  vtkGetMacro(MergePoints, vtkTypeBool);
136  vtkSetMacro(MergePoints, vtkTypeBool);
137  vtkBooleanMacro(MergePoints, vtkTypeBool);
139 
141 
148  vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
149  vtkGetMacro(Tolerance, double);
151 
153 
158  vtkSetMacro(ToleranceIsAbsolute, bool);
159  vtkGetMacro(ToleranceIsAbsolute, bool);
160  vtkBooleanMacro(ToleranceIsAbsolute, bool);
162 
167 
173 
175 
180  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
181  vtkGetMacro(OutputPointsPrecision, int);
183 
184 protected:
186  ~vtkAppendFilter() override;
187 
188  // Usual data generation method
192 
193  // list of data sets to append together.
194  // Here as a convenience. It is a copy of the input array.
196 
197  // If true we will attempt to merge points. Must also not have
198  // ghost cells defined.
200 
202  double Tolerance;
203 
204  // If true, tolerance is used as is. If false, tolerance is multiplied by
205  // the diagonal of the bounding box of the input.
207 
208 private:
209  vtkAppendFilter(const vtkAppendFilter&) = delete;
210  void operator=(const vtkAppendFilter&) = delete;
211 
212  // Get all input data sets that have points, cells, or both.
213  // Caller must delete the returned vtkDataSetCollection.
214  vtkDataSetCollection* GetNonEmptyInputs(vtkInformationVector** inputVector);
215 
216  void AppendArrays(int attributesType, vtkInformationVector** inputVector, vtkIdType* globalIds,
217  vtkUnstructuredGrid* output, vtkIdType totalNumberOfElements);
218 };
219 
220 #endif
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:170
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkAppendFilter::MergePoints
vtkTypeBool MergePoints
Definition: vtkAppendFilter.h:199
vtkAppendFilter::GetInput
vtkDataSet * GetInput()
Get any input of this filter.
Definition: vtkAppendFilter.h:126
vtkAppendFilter::vtkAppendFilter
vtkAppendFilter()
vtkAppendFilter::GetInputList
vtkDataSetCollection * GetInputList()
Returns a copy of the input array.
vtkAppendFilter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkAppendFilter::New
static vtkAppendFilter * New()
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkAppendFilter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkAppendFilter::GetInput
vtkDataSet * GetInput(int idx)
Get any input of this filter.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkAppendFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAppendFilter::InputList
vtkDataSetCollection * InputList
Definition: vtkAppendFilter.h:195
vtkAppendFilter::~vtkAppendFilter
~vtkAppendFilter() override
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkAppendFilter
appends one or more datasets together into a single unstructured grid
Definition: vtkAppendFilter.h:115
vtkAppendFilter::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkUnstructuredGridAlgorithm.h
vtkDataSetCollection
maintain an unordered list of dataset objects
Definition: vtkDataSetCollection.h:61
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:41
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:204
vtkAppendFilter::RemoveInputData
void RemoveInputData(vtkDataSet *in)
Remove a dataset from the list of data to append.
vtkAppendFilter::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkAppendFilter.h:201
vtkAppendFilter::Tolerance
double Tolerance
Definition: vtkAppendFilter.h:202
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkAppendFilter::ToleranceIsAbsolute
bool ToleranceIsAbsolute
Definition: vtkAppendFilter.h:206