VTK  9.6.20260614
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
138
139#ifndef vtkAppendPolyData_h
140#define vtkAppendPolyData_h
141
142#include "vtkFiltersCoreModule.h" // For export macro
143#include "vtkPolyDataAlgorithm.h"
144#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
145
146VTK_ABI_NAMESPACE_BEGIN
147class vtkCellArray;
148class vtkDataArray;
149class vtkPoints;
150class vtkPolyData;
151
152class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkAppendPolyData : public vtkPolyDataAlgorithm
153{
154public:
156
158 void PrintSelf(ostream& os, vtkIndent indent) override;
159
161
167 vtkSetMacro(UserManagedInputs, vtkTypeBool);
168 vtkGetMacro(UserManagedInputs, vtkTypeBool);
169 vtkBooleanMacro(UserManagedInputs, vtkTypeBool);
171
173
179 vtkGetMacro(UseImplicitArray, bool);
180 vtkSetMacro(UseImplicitArray, bool);
181 vtkBooleanMacro(UseImplicitArray, bool);
183
189
195
197
201 vtkPolyData* GetInput() { return this->GetInput(0); }
203
208 void SetNumberOfInputs(int num);
209
210 // Set Nth input, should only be used when UserManagedInputs is true.
213
215
229
231
236 vtkSetMacro(OutputPointsPrecision, int);
237 vtkGetMacro(OutputPointsPrecision, int);
239
240 int ExecuteAppend(vtkPolyData* output, vtkPolyData* inputs[], int numInputs)
241 VTK_SIZEHINT(inputs, numInputs);
242
278
279 static void AppendCellData(const PolyDataOffsets& stats, const std::vector<vtkPolyData*>& inputs,
280 vtkPolyData* output, bool useImplicit);
281
282protected:
285
286 // Flag for selecting parallel streaming behavior
289
290 // Usual data generation method
294
295private:
296 // hide the superclass' AddInput() from the user and the compiler
298 {
299 vtkErrorMacro(<< "AddInput() must be called with a vtkPolyData not a vtkDataObject.");
300 }
301
305 void AppendPoints(
306 const PolyDataOffsets& stats, const std::vector<vtkPolyData*>& inputs, vtkPolyData* output);
307
312 void AppendCells(
313 const PolyDataOffsets& stats, const std::vector<vtkPolyData*>& inputs, vtkPolyData* output);
314
315 vtkTypeBool UserManagedInputs;
316
317 bool UseImplicitArray = false;
318
319 vtkAppendPolyData(const vtkAppendPolyData&) = delete;
320 void operator=(const vtkAppendPolyData&) = delete;
321};
322
323VTK_ABI_NAMESPACE_END
324#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.
~vtkAppendPolyData() override
vtkTypeBool ParallelStreaming
int ExecuteAppend(vtkPolyData *output, vtkPolyData *inputs[], int numInputs)
vtkPolyData * GetInput(int idx)
Get any input of this filter.
static void AppendCellData(const PolyDataOffsets &stats, const std::vector< vtkPolyData * > &inputs, vtkPolyData *output, bool useImplicit)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkAppendPolyData * New()
void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input)
vtkPolyData * GetInput()
Get any input of this filter.
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
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:140
concrete dataset represents vertices, lines, polygons, and triangle strips
PolyDataOffsets agregates cell array information from the input polydata list.
std::vector< vtkIdType > StripConnectivityOffsets
std::vector< vtkIdType > LineOffsets
std::vector< vtkIdType > StripOffsets
std::vector< vtkIdType > PointOffsets
std::vector< vtkIdType > VertOffsets
std::vector< vtkIdType > PolyOffsets
PolyDataOffsets(const std::vector< vtkPolyData * > &datasets)
std::vector< vtkIdType > LineConnectivityOffsets
std::vector< vtkIdType > VertConnectivityOffsets
std::vector< vtkIdType > PolyConnectivityOffsets
int vtkTypeBool
Definition vtkABI.h:64
#define vtkDataArray
int vtkIdType
Definition vtkType.h:363
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO