VTK
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 =========================================================================*/
30 #ifndef vtkAppendFilter_h
31 #define vtkAppendFilter_h
32 
33 #include "vtkFiltersCoreModule.h" // For export macro
35 
38 
39 class VTKFILTERSCORE_EXPORT vtkAppendFilter : public vtkUnstructuredGridAlgorithm
40 {
41 public:
42  static vtkAppendFilter* New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
50  vtkDataSet* GetInput(int idx);
51  vtkDataSet* GetInput() { return this->GetInput(0); }
53 
55 
60  vtkGetMacro(MergePoints, vtkTypeBool);
61  vtkSetMacro(MergePoints, vtkTypeBool);
62  vtkBooleanMacro(MergePoints, vtkTypeBool);
64 
66 
73  vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
74  vtkGetMacro(Tolerance, double);
76 
78 
83  vtkSetMacro(ToleranceIsAbsolute, bool);
84  vtkGetMacro(ToleranceIsAbsolute, bool);
85  vtkBooleanMacro(ToleranceIsAbsolute, bool);
87 
91  void RemoveInputData(vtkDataSet* in);
92 
97  vtkDataSetCollection* GetInputList();
98 
100 
105  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
106  vtkGetMacro(OutputPointsPrecision, int);
108 
109 protected:
110  vtkAppendFilter();
111  ~vtkAppendFilter() override;
112 
113  // Usual data generation method
116  int FillInputPortInformation(int port, vtkInformation* info) override;
117 
118  // list of data sets to append together.
119  // Here as a convenience. It is a copy of the input array.
121 
122  // If true we will attempt to merge points. Must also not have
123  // ghost cells defined.
125 
127  double Tolerance;
128 
129  // If true, tolerance is used as is. If false, tolerance is multiplied by
130  // the diagonal of the bounding box of the input.
132 
133 private:
134  vtkAppendFilter(const vtkAppendFilter&) = delete;
135  void operator=(const vtkAppendFilter&) = delete;
136 
137  // Get all input data sets that have points, cells, or both.
138  // Caller must delete the returned vtkDataSetCollection.
139  vtkDataSetCollection* GetNonEmptyInputs(vtkInformationVector** inputVector);
140 
141  void AppendArrays(int attributesType, vtkInformationVector** inputVector, vtkIdType* globalIds,
142  vtkUnstructuredGrid* output, vtkIdType totalNumberOfElements);
143 };
144 
145 #endif
vtkIdType
int vtkIdType
Definition: vtkType.h:349
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:53
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkAppendFilter::MergePoints
vtkTypeBool MergePoints
Definition: vtkAppendFilter.h:124
vtkUnstructuredGridAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkAppendFilter::GetInput
vtkDataSet * GetInput()
Definition: vtkAppendFilter.h:51
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:120
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:64
vtkX3D::info
Definition: vtkX3D.h:382
vtkAppendFilter
appends one or more datasets together into a single unstructured grid
Definition: vtkAppendFilter.h:39
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:86
vtkAppendFilter::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkAppendFilter.h:126
vtkAppendFilter::Tolerance
double Tolerance
Definition: vtkAppendFilter.h:127
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:171
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkAppendFilter::ToleranceIsAbsolute
bool ToleranceIsAbsolute
Definition: vtkAppendFilter.h:131