VTK  9.7.1
vtkMergeFilter.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
16 #ifndef vtkMergeFilter_h
17 #define vtkMergeFilter_h
18 
19 #include "vtkDataSetAlgorithm.h"
20 #include "vtkFiltersCoreModule.h" // For export macro
21 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class vtkFieldList;
25 
26 class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkMergeFilter : public vtkDataSetAlgorithm
27 {
28 public:
29  static vtkMergeFilter* New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
34 
40  void SetGeometryInputData(vtkDataSet* input) { this->SetInputData(input); }
41  vtkDataSet* GetGeometry();
43 
48  void SetGeometryConnection(vtkAlgorithmOutput* algOutput) { this->SetInputConnection(algOutput); }
49 
51 
57  void SetScalarsData(vtkDataSet*);
58  vtkDataSet* GetScalars();
60 
66  {
67  this->SetInputConnection(1, algOutput);
68  }
69 
71 
77  void SetVectorsData(vtkDataSet*);
78  vtkDataSet* GetVectors();
80 
86  {
87  this->SetInputConnection(2, algOutput);
88  }
89 
91 
97  void SetNormalsData(vtkDataSet*);
98  vtkDataSet* GetNormals();
100 
106  {
107  this->SetInputConnection(3, algOutput);
108  }
109 
111 
118  void SetTCoordsData(vtkDataSet*);
119  vtkDataSet* GetTCoords();
121 
128  {
129  this->SetInputConnection(4, algOutput);
130  }
131 
133 
139  void SetTensorsData(vtkDataSet*);
140  vtkDataSet* GetTensors();
142 
148  {
149  this->SetInputConnection(5, algOutput);
150  }
151 
157  void AddField(const char* name, vtkDataSet* input);
158 
159 protected:
160  vtkMergeFilter();
161  ~vtkMergeFilter() override;
162 
163  // Usual data generation method
166  int FillInputPortInformation(int port, vtkInformation* info) override;
167 
168  vtkFieldList* FieldList;
170 
171 private:
172  vtkMergeFilter(const vtkMergeFilter&) = delete;
173  void operator=(const vtkMergeFilter&) = delete;
174 };
175 
176 VTK_ABI_NAMESPACE_END
177 #endif
void SetScalarsConnection(vtkAlgorithmOutput *algOutput)
Specify object from which to extract scalar information.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
void SetInputData(vtkDataObject *)
Assign a data object as input.
void SetNormalsConnection(vtkAlgorithmOutput *algOutput)
Set the connection from which to extract normal information.
Proxy object to connect input/output ports.
void SetVectorsConnection(vtkAlgorithmOutput *algOutput)
Set the connection from which to extract vector information.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
extract separate components of data from different datasets
void SetTCoordsConnection(vtkAlgorithmOutput *algOutput)
Set the connection from which to extract texture coordinates information.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
vtkFieldList * FieldList
void SetTensorsConnection(vtkAlgorithmOutput *algOutput)
Set the connection from which to extract tensor data.
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
Superclass for algorithms that produce output of the same type as input.
void SetGeometryConnection(vtkAlgorithmOutput *algOutput)
Specify object from which to extract geometry information.
static vtkDataSetAlgorithm * New()
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetGeometryInputData(vtkDataSet *input)
Specify object from which to extract geometry information.