VTK  9.2.6
vtkAppendPolyData.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAppendPolyData.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 vtkAppendPolyData_h
43 #define vtkAppendPolyData_h
44 
45 #include "vtkFiltersCoreModule.h" // For export macro
46 #include "vtkPolyDataAlgorithm.h"
47 
48 class vtkCellArray;
49 class vtkDataArray;
50 class vtkPoints;
51 class vtkPolyData;
52 
53 class VTKFILTERSCORE_EXPORT vtkAppendPolyData : public vtkPolyDataAlgorithm
54 {
55 public:
56  static vtkAppendPolyData* New();
57 
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
62 
68  vtkSetMacro(UserManagedInputs, vtkTypeBool);
69  vtkGetMacro(UserManagedInputs, vtkTypeBool);
70  vtkBooleanMacro(UserManagedInputs, vtkTypeBool);
72 
78 
83  void RemoveInputData(vtkPolyData*);
84 
86 
89  vtkPolyData* GetInput(int idx);
90  vtkPolyData* GetInput() { return this->GetInput(0); }
92 
97  void SetNumberOfInputs(int num);
98 
99  // Set Nth input, should only be used when UserManagedInputs is true.
100  void SetInputConnectionByNumber(int num, vtkAlgorithmOutput* input);
101  void SetInputDataByNumber(int num, vtkPolyData* ds);
102 
104 
114  vtkSetMacro(ParallelStreaming, vtkTypeBool);
115  vtkGetMacro(ParallelStreaming, vtkTypeBool);
116  vtkBooleanMacro(ParallelStreaming, vtkTypeBool);
118 
120 
125  vtkSetMacro(OutputPointsPrecision, int);
126  vtkGetMacro(OutputPointsPrecision, int);
128 
129  int ExecuteAppend(vtkPolyData* output, vtkPolyData* inputs[], int numInputs)
130  VTK_SIZEHINT(inputs, numInputs);
131 
132 protected:
134  ~vtkAppendPolyData() override;
135 
136  // Flag for selecting parallel streaming behavior
139 
140  // Usual data generation method
143  int FillInputPortInformation(int, vtkInformation*) override;
144 
145  // An efficient templated way to append data.
146  void AppendData(vtkDataArray* dest, vtkDataArray* src, vtkIdType offset);
147 
148  // An efficient way to append cells.
149  void AppendCells(vtkCellArray* dst, vtkCellArray* src, vtkIdType offset);
150 
151 private:
152  // hide the superclass' AddInput() from the user and the compiler
154  {
155  vtkErrorMacro(<< "AddInput() must be called with a vtkPolyData not a vtkDataObject.");
156  }
157 
158  vtkTypeBool UserManagedInputs;
159 
160 private:
161  vtkAppendPolyData(const vtkAppendPolyData&) = delete;
162  void operator=(const vtkAppendPolyData&) = delete;
163 };
164 
165 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkTypeBool ParallelStreaming
void AddInputData(vtkDataObject *)
Assign a data object as input.
int vtkIdType
Definition: vtkType.h:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
Proxy object to connect input/output ports.
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Superclass for algorithms that produce only polydata as output.
vtkPolyData * GetInput()
Get any input of this filter.
a simple class to control print indentation
Definition: vtkIndent.h:39
appends one or more polygonal datasets together
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
#define VTK_SIZEHINT(...)
vtkDataObject * GetInput()
object to represent cell connectivity
Definition: vtkCellArray.h:186
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:65
represent and manipulate 3D points
Definition: vtkPoints.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.