VTK  9.0.20210124
vtkAppendDataSets.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAppendDataSets.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 =========================================================================*/
42 #ifndef vtkAppendDataSets_h
43 #define vtkAppendDataSets_h
44 
45 #include "vtkFiltersCoreModule.h" // For export macro
46 #include "vtkPointSetAlgorithm.h"
47 
48 class vtkDataSet;
50 
51 class VTKFILTERSCORE_EXPORT vtkAppendDataSets : public vtkPointSetAlgorithm
52 {
53 public:
54  static vtkAppendDataSets* New();
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
59 
64  vtkGetMacro(MergePoints, bool);
65  vtkSetMacro(MergePoints, bool);
66  vtkBooleanMacro(MergePoints, bool);
68 
70 
77  vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
78  vtkGetMacro(Tolerance, double);
80 
82 
87  vtkSetMacro(ToleranceIsAbsolute, bool);
88  vtkGetMacro(ToleranceIsAbsolute, bool);
89  vtkBooleanMacro(ToleranceIsAbsolute, bool);
91 
93 
102  vtkSetMacro(OutputDataSetType, int);
103  vtkGetMacro(OutputDataSetType, int);
105 
107 
112  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
113  vtkGetMacro(OutputPointsPrecision, int);
115 
121 
122 protected:
124  ~vtkAppendDataSets() override;
125 
126  // Usual data generation method
127  int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
128  vtkInformationVector* outputVector) override;
130  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
131  int FillInputPortInformation(int port, vtkInformation* info) override;
132 
133  // If true we will attempt to merge points. Must also not have
134  // ghost cells defined.
136 
137  // Tolerance used for point merging
138  double Tolerance;
139 
140  // If true, tolerance is used as is. If false, tolerance is multiplied by
141  // the diagonal of the bounding box of the input.
143 
144  // Output data set type.
146 
147  // Precision of output points.
149 
150 private:
151  vtkAppendDataSets(const vtkAppendDataSets&) = delete;
152  void operator=(const vtkAppendDataSets&) = delete;
153 
154  // Get all input data sets that have points, cells, or both.
155  // Caller must delete the returned vtkDataSetCollection.
156  vtkDataSetCollection* GetNonEmptyInputs(vtkInformationVector** inputVector);
157 };
158 
159 #endif
vtkPointSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPointSetAlgorithm.h:43
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPointSetAlgorithm.h
vtkAppendDataSets::OutputDataSetType
int OutputDataSetType
Definition: vtkAppendDataSets.h:145
vtkPointSetAlgorithm::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
vtkAppendDataSets::ToleranceIsAbsolute
bool ToleranceIsAbsolute
Definition: vtkAppendDataSets.h:142
vtkX3D::port
Definition: vtkX3D.h:453
vtkPointSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkPointSetAlgorithm.h:131
vtkAppendDataSets::Tolerance
double Tolerance
Definition: vtkAppendDataSets.h:138
vtkPointSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkPointSetAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkX3D::info
Definition: vtkX3D.h:382
vtkDataSetCollection
maintain an unordered list of dataset objects
Definition: vtkDataSetCollection.h:31
vtkAppendDataSets::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkAppendDataSets.h:148
vtkPointSetAlgorithm::New
static vtkPointSetAlgorithm * New()
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:157
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkAppendDataSets::MergePoints
bool MergePoints
Definition: vtkAppendDataSets.h:135
vtkPointSetAlgorithm::RequestDataObject
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkAppendDataSets
Appends one or more datasets together into a single output vtkPointSet.
Definition: vtkAppendDataSets.h:51