VTK
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:
45  static vtkAppendPolyData *New();
46 
48  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
49 
51 
57  vtkSetMacro(UserManagedInputs,int);
58  vtkGetMacro(UserManagedInputs,int);
59  vtkBooleanMacro(UserManagedInputs,int);
61 
66  void AddInputData(vtkPolyData *);
67 
72  void RemoveInputData(vtkPolyData *);
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.
89  void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input);
90  void SetInputDataByNumber(int num, vtkPolyData *ds);
91 
93 
103  vtkSetMacro(ParallelStreaming, int);
104  vtkGetMacro(ParallelStreaming, int);
105  vtkBooleanMacro(ParallelStreaming, int);
107 
109 
114  vtkSetMacro(OutputPointsPrecision,int);
115  vtkGetMacro(OutputPointsPrecision,int);
117 
118  int ExecuteAppend(vtkPolyData* output,
119  vtkPolyData* inputs[], int numInputs);
120 
121 protected:
123  ~vtkAppendPolyData() VTK_OVERRIDE;
124 
125  // Flag for selecting parallel streaming behavior
126  int ParallelStreaming;
127  int OutputPointsPrecision;
128 
129  // Usual data generation method
130  int RequestData(vtkInformation *,
131  vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
132  int RequestUpdateExtent(vtkInformation *,
133  vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
134  int FillInputPortInformation(int, vtkInformation *) VTK_OVERRIDE;
135 
136  // An efficient templated way to append data.
137  void AppendData(vtkDataArray *dest, vtkDataArray *src, vtkIdType offset);
138 
139 
140  // An efficient way to append cells.
141  vtkIdType *AppendCells(vtkIdType *pDest, vtkCellArray *src,
142  vtkIdType offset);
143 
144  private:
145  // hide the superclass' AddInput() from the user and the compiler
146  void AddInputData(vtkDataObject *)
147  { vtkErrorMacro( << "AddInput() must be called with a vtkPolyData not a vtkDataObject."); };
148 
149  int UserManagedInputs;
150 
151 private:
152  vtkAppendPolyData(const vtkAppendPolyData&) VTK_DELETE_FUNCTION;
153  void operator=(const vtkAppendPolyData&) VTK_DELETE_FUNCTION;
154 };
155 
156 #endif
157 
158 
Store vtkAlgorithm input/output information.
void AddInputData(vtkDataObject *)
Assign a data object as input.
int vtkIdType
Definition: vtkType.h:345
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
Proxy object to connect input/output ports.
static vtkPolyDataAlgorithm * New()
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:33
appends one or more polygonal datasets together
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkDataObject * GetInput()
object to represent cell connectivity
Definition: vtkCellArray.h:44
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:58
represent and manipulate 3D points
Definition: vtkPoints.h:33
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.