VTK  9.0.20200924
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 =========================================================================*/
38 #ifndef vtkAppendFilter_h
39 #define vtkAppendFilter_h
40 
41 #include "vtkFiltersCoreModule.h" // For export macro
43 
46 
47 class VTKFILTERSCORE_EXPORT vtkAppendFilter : public vtkUnstructuredGridAlgorithm
48 {
49 public:
50  static vtkAppendFilter* New();
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
58  vtkDataSet* GetInput(int idx);
59  vtkDataSet* GetInput() { return this->GetInput(0); }
61 
63 
68  vtkGetMacro(MergePoints, vtkTypeBool);
69  vtkSetMacro(MergePoints, vtkTypeBool);
70  vtkBooleanMacro(MergePoints, vtkTypeBool);
72 
74 
81  vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
82  vtkGetMacro(Tolerance, double);
84 
86 
91  vtkSetMacro(ToleranceIsAbsolute, bool);
92  vtkGetMacro(ToleranceIsAbsolute, bool);
93  vtkBooleanMacro(ToleranceIsAbsolute, bool);
95 
99  void RemoveInputData(vtkDataSet* in);
100 
105  vtkDataSetCollection* GetInputList();
106 
108 
113  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
114  vtkGetMacro(OutputPointsPrecision, int);
116 
117 protected:
118  vtkAppendFilter();
119  ~vtkAppendFilter() override;
120 
121  // Usual data generation method
124  int FillInputPortInformation(int port, vtkInformation* info) override;
125 
126  // list of data sets to append together.
127  // Here as a convenience. It is a copy of the input array.
129 
130  // If true we will attempt to merge points. Must also not have
131  // ghost cells defined.
133 
135  double Tolerance;
136 
137  // If true, tolerance is used as is. If false, tolerance is multiplied by
138  // the diagonal of the bounding box of the input.
140 
141 private:
142  vtkAppendFilter(const vtkAppendFilter&) = delete;
143  void operator=(const vtkAppendFilter&) = delete;
144 
145  // Get all input data sets that have points, cells, or both.
146  // Caller must delete the returned vtkDataSetCollection.
147  vtkDataSetCollection* GetNonEmptyInputs(vtkInformationVector** inputVector);
148 
149  void AppendArrays(int attributesType, vtkInformationVector** inputVector, vtkIdType* globalIds,
150  vtkUnstructuredGrid* output, vtkIdType totalNumberOfElements);
151 };
152 
153 #endif
vtkIdType
int vtkIdType
Definition: vtkType.h:330
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:60
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkAppendFilter::MergePoints
vtkTypeBool MergePoints
Definition: vtkAppendFilter.h:132
vtkUnstructuredGridAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkAppendFilter::GetInput
vtkDataSet * GetInput()
Definition: vtkAppendFilter.h:59
vtkUnstructuredGridAlgorithm::GetInput
vtkDataObject * GetInput()
Definition: vtkUnstructuredGridAlgorithm.h:65
vtkX3D::port
Definition: vtkX3D.h:453
vtkUnstructuredGridAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkAppendFilter::InputList
vtkDataSetCollection * InputList
Definition: vtkAppendFilter.h:128
vtkUnstructuredGridAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
Definition: vtkX3D.h:382
vtkAppendFilter
appends one or more datasets together into a single unstructured grid
Definition: vtkAppendFilter.h:47
vtkUnstructuredGridAlgorithm::New
static vtkUnstructuredGridAlgorithm * New()
vtkUnstructuredGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnstructuredGridAlgorithm.h
vtkDataSetCollection
maintain an unordered list of dataset objects
Definition: vtkDataSetCollection.h:31
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:40
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:93
vtkAppendFilter::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkAppendFilter.h:134
vtkAppendFilter::Tolerance
double Tolerance
Definition: vtkAppendFilter.h:135
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:157
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkAppendFilter::ToleranceIsAbsolute
bool ToleranceIsAbsolute
Definition: vtkAppendFilter.h:139