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 =========================================================================*/
37 #ifndef vtkAppendPolyData_h
38 #define vtkAppendPolyData_h
39 
40 #include "vtkFiltersCoreModule.h" // For export macro
41 #include "vtkPolyDataAlgorithm.h"
42 
43 class vtkCellArray;
44 class vtkDataArray;
45 class vtkPoints;
46 class vtkPolyData;
47 
48 class VTKFILTERSCORE_EXPORT vtkAppendPolyData : public vtkPolyDataAlgorithm
49 {
50 public:
51  static vtkAppendPolyData *New();
52 
54  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
55 
57 
63  vtkSetMacro(UserManagedInputs,int);
64  vtkGetMacro(UserManagedInputs,int);
65  vtkBooleanMacro(UserManagedInputs,int);
67 
72  void AddInputData(vtkPolyData *);
73 
78  void RemoveInputData(vtkPolyData *);
79 
81 
84  vtkPolyData *GetInput(int idx);
85  vtkPolyData *GetInput() { return this->GetInput( 0 ); };
87 
92  void SetNumberOfInputs(int num);
93 
94  // Set Nth input, should only be used when UserManagedInputs is true.
95  void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input);
96  void SetInputDataByNumber(int num, vtkPolyData *ds);
97 
99 
109  vtkSetMacro(ParallelStreaming, int);
110  vtkGetMacro(ParallelStreaming, int);
111  vtkBooleanMacro(ParallelStreaming, int);
113 
115 
120  vtkSetMacro(OutputPointsPrecision,int);
121  vtkGetMacro(OutputPointsPrecision,int);
123 
124  int ExecuteAppend(vtkPolyData* output,
125  vtkPolyData* inputs[], int numInputs);
126 
127 protected:
129  ~vtkAppendPolyData() VTK_OVERRIDE;
130 
131  // Flag for selecting parallel streaming behavior
134 
135  // Usual data generation method
137  vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
139  vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
140  int FillInputPortInformation(int, vtkInformation *) VTK_OVERRIDE;
141 
142  // An efficient templated way to append data.
143  void AppendData(vtkDataArray *dest, vtkDataArray *src, vtkIdType offset);
144 
145 
146  // An efficient way to append cells.
147  vtkIdType *AppendCells(vtkIdType *pDest, vtkCellArray *src,
148  vtkIdType offset);
149 
150  private:
151  // hide the superclass' AddInput() from the user and the compiler
153  { vtkErrorMacro( << "AddInput() must be called with a vtkPolyData not a vtkDataObject."); };
154 
155  int UserManagedInputs;
156 
157 private:
158  vtkAppendPolyData(const vtkAppendPolyData&) VTK_DELETE_FUNCTION;
159  void operator=(const vtkAppendPolyData&) VTK_DELETE_FUNCTION;
160 };
161 
162 #endif
163 
164 
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
void AddInputData(vtkDataObject *)
Assign a data object as input.
int vtkIdType
Definition: vtkType.h:287
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
Proxy object to connect input/output ports.
static vtkPolyDataAlgorithm * New()
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:54
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkDataObject * GetInput()
object to represent cell connectivity
Definition: vtkCellArray.h:50
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
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:64
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.