VTK  9.3.20240329
vtkAppendPolyData.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
139 #ifndef vtkAppendPolyData_h
140 #define vtkAppendPolyData_h
141 
142 #include "vtkFiltersCoreModule.h" // For export macro
143 #include "vtkPolyDataAlgorithm.h"
144 
145 VTK_ABI_NAMESPACE_BEGIN
146 class vtkCellArray;
147 class vtkDataArray;
148 class vtkPoints;
149 class vtkPolyData;
150 
151 class VTKFILTERSCORE_EXPORT vtkAppendPolyData : public vtkPolyDataAlgorithm
152 {
153 public:
155 
157  void PrintSelf(ostream& os, vtkIndent indent) override;
158 
160 
166  vtkSetMacro(UserManagedInputs, vtkTypeBool);
167  vtkGetMacro(UserManagedInputs, vtkTypeBool);
168  vtkBooleanMacro(UserManagedInputs, vtkTypeBool);
170 
176 
182 
184 
188  vtkPolyData* GetInput() { return this->GetInput(0); }
190 
195  void SetNumberOfInputs(int num);
196 
197  // Set Nth input, should only be used when UserManagedInputs is true.
199  void SetInputDataByNumber(int num, vtkPolyData* ds);
200 
202 
212  vtkSetMacro(ParallelStreaming, vtkTypeBool);
213  vtkGetMacro(ParallelStreaming, vtkTypeBool);
214  vtkBooleanMacro(ParallelStreaming, vtkTypeBool);
216 
218 
223  vtkSetMacro(OutputPointsPrecision, int);
224  vtkGetMacro(OutputPointsPrecision, int);
226 
227  int ExecuteAppend(vtkPolyData* output, vtkPolyData* inputs[], int numInputs)
228  VTK_SIZEHINT(inputs, numInputs);
229 
230 protected:
232  ~vtkAppendPolyData() override;
233 
234  // Flag for selecting parallel streaming behavior
237 
238  // Usual data generation method
242 
243  // An efficient templated way to append data.
245 
246  // An efficient way to append cells.
248 
249 private:
250  // hide the superclass' AddInput() from the user and the compiler
252  {
253  vtkErrorMacro(<< "AddInput() must be called with a vtkPolyData not a vtkDataObject.");
254  }
255 
256  vtkTypeBool UserManagedInputs;
257 
258  vtkAppendPolyData(const vtkAppendPolyData&) = delete;
259  void operator=(const vtkAppendPolyData&) = delete;
260 };
261 
262 VTK_ABI_NAMESPACE_END
263 #endif
Proxy object to connect input/output ports.
appends one or more polygonal datasets together
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void AddInputData(vtkPolyData *)
Add a dataset to the list of data to append.
void RemoveInputData(vtkPolyData *)
Remove a dataset from the list of data to append.
vtkPolyData * GetInput(int idx)
Get any input of this filter.
~vtkAppendPolyData() override
vtkTypeBool ParallelStreaming
int ExecuteAppend(vtkPolyData *output, vtkPolyData *inputs[], int numInputs)
static vtkAppendPolyData * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void AppendCells(vtkCellArray *dst, vtkCellArray *src, vtkIdType offset)
void AppendData(vtkDataArray *dest, vtkDataArray *src, vtkIdType offset)
vtkPolyData * GetInput()
Get any input of this filter.
void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input)
void SetNumberOfInputs(int num)
Directly set(allocate) number of inputs, should only be used when UserManagedInputs is true.
void SetInputDataByNumber(int num, vtkPolyData *ds)
object to represent cell connectivity
Definition: vtkCellArray.h:286
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:155
general representation of visualization data
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:139
Superclass for algorithms that produce only polydata as output.
void AddInputData(vtkDataObject *)
Assign a data object as input.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:181
@ offset
Definition: vtkX3D.h:438
int vtkTypeBool
Definition: vtkABI.h:64
int vtkIdType
Definition: vtkType.h:315
#define VTK_SIZEHINT(...)