VTK  9.3.0
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
39 #ifndef vtkAppendPolyData_h
40 #define vtkAppendPolyData_h
41 
42 #include "vtkFiltersCoreModule.h" // For export macro
43 #include "vtkPolyDataAlgorithm.h"
44 
45 VTK_ABI_NAMESPACE_BEGIN
46 class vtkCellArray;
47 class vtkDataArray;
48 class vtkPoints;
49 class vtkPolyData;
50 
51 class VTKFILTERSCORE_EXPORT vtkAppendPolyData : public vtkPolyDataAlgorithm
52 {
53 public:
55 
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
66  vtkSetMacro(UserManagedInputs, vtkTypeBool);
67  vtkGetMacro(UserManagedInputs, vtkTypeBool);
68  vtkBooleanMacro(UserManagedInputs, vtkTypeBool);
70 
76 
82 
84 
87  vtkPolyData* GetInput(int idx);
88  vtkPolyData* GetInput() { return this->GetInput(0); }
90 
95  void SetNumberOfInputs(int num);
96 
97  // Set Nth input, should only be used when UserManagedInputs is true.
99  void SetInputDataByNumber(int num, vtkPolyData* ds);
100 
102 
112  vtkSetMacro(ParallelStreaming, vtkTypeBool);
113  vtkGetMacro(ParallelStreaming, vtkTypeBool);
114  vtkBooleanMacro(ParallelStreaming, vtkTypeBool);
116 
118 
123  vtkSetMacro(OutputPointsPrecision, int);
124  vtkGetMacro(OutputPointsPrecision, int);
126 
127  int ExecuteAppend(vtkPolyData* output, vtkPolyData* inputs[], int numInputs)
128  VTK_SIZEHINT(inputs, numInputs);
129 
130 protected:
132  ~vtkAppendPolyData() override;
133 
134  // Flag for selecting parallel streaming behavior
137 
138  // Usual data generation method
142 
143  // An efficient templated way to append data.
145 
146  // An efficient way to append cells.
148 
149 private:
150  // hide the superclass' AddInput() from the user and the compiler
152  {
153  vtkErrorMacro(<< "AddInput() must be called with a vtkPolyData not a vtkDataObject.");
154  }
155 
156  vtkTypeBool UserManagedInputs;
157 
158  vtkAppendPolyData(const vtkAppendPolyData&) = delete;
159  void operator=(const vtkAppendPolyData&) = delete;
160 };
161 
162 VTK_ABI_NAMESPACE_END
163 #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:185
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
general representation of visualization data
Definition: vtkDataObject.h:64
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:38
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:89
@ offset
Definition: vtkX3D.h:438
int vtkTypeBool
Definition: vtkABI.h:64
int vtkIdType
Definition: vtkType.h:315
#define VTK_SIZEHINT(...)