VTK  9.0.3
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 =========================================================================*/
31 #ifndef vtkAppendPolyData_h
32 #define vtkAppendPolyData_h
33 
34 #include "vtkFiltersCoreModule.h" // For export macro
35 #include "vtkPolyDataAlgorithm.h"
36 
37 class vtkCellArray;
38 class vtkDataArray;
39 class vtkPoints;
40 class vtkPolyData;
41 
42 class VTKFILTERSCORE_EXPORT vtkAppendPolyData : public vtkPolyDataAlgorithm
43 {
44 public:
46 
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
57  vtkSetMacro(UserManagedInputs, vtkTypeBool);
58  vtkGetMacro(UserManagedInputs, vtkTypeBool);
59  vtkBooleanMacro(UserManagedInputs, vtkTypeBool);
61 
67 
73 
75 
78  vtkPolyData* GetInput(int idx);
79  vtkPolyData* GetInput() { return this->GetInput(0); }
81 
86  void SetNumberOfInputs(int num);
87 
88  // Set Nth input, should only be used when UserManagedInputs is true.
90  void SetInputDataByNumber(int num, vtkPolyData* ds);
91 
93 
103  vtkSetMacro(ParallelStreaming, vtkTypeBool);
104  vtkGetMacro(ParallelStreaming, vtkTypeBool);
105  vtkBooleanMacro(ParallelStreaming, vtkTypeBool);
107 
109 
114  vtkSetMacro(OutputPointsPrecision, int);
115  vtkGetMacro(OutputPointsPrecision, int);
117 
118  int ExecuteAppend(vtkPolyData* output, vtkPolyData* inputs[], int numInputs)
119  VTK_SIZEHINT(inputs, numInputs);
120 
121 protected:
123  ~vtkAppendPolyData() override;
124 
125  // Flag for selecting parallel streaming behavior
128 
129  // Usual data generation method
133 
134  // An efficient templated way to append data.
136 
137  // An efficient way to append cells.
139 
140 private:
141  // hide the superclass' AddInput() from the user and the compiler
143  {
144  vtkErrorMacro(<< "AddInput() must be called with a vtkPolyData not a vtkDataObject.");
145  }
146 
147  vtkTypeBool UserManagedInputs;
148 
149 private:
150  vtkAppendPolyData(const vtkAppendPolyData&) = delete;
151  void operator=(const vtkAppendPolyData&) = delete;
152 };
153 
154 #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 AppendData(vtkDataArray *dest, vtkDataArray *src, vtkIdType offset)
void AppendCells(vtkCellArray *dest, vtkCellArray *src, vtkIdType offset)
vtkPolyData * GetInput()
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:180
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
general representation of visualization data
Definition: vtkDataObject.h:60
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:34
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:85
@ offset
Definition: vtkX3D.h:444
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:338
#define VTK_SIZEHINT(...)