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 =========================================================================*/
36 #ifndef vtkAppendPolyData_h
37 #define vtkAppendPolyData_h
38 
39 #include "vtkFiltersCoreModule.h" // For export macro
40 #include "vtkPolyDataAlgorithm.h"
41 
42 class vtkCellArray;
43 class vtkDataArray;
44 class vtkPoints;
45 class vtkPolyData;
46 
48 {
49 public:
50  static vtkAppendPolyData *New();
51 
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
56 
61  vtkSetMacro(UserManagedInputs,int);
62  vtkGetMacro(UserManagedInputs,int);
63  vtkBooleanMacro(UserManagedInputs,int);
65 
68  void AddInputData(vtkPolyData *);
69 
72  void RemoveInputData(vtkPolyData *);
73 
74 //BTX
76 
77  vtkPolyData *GetInput(int idx);
78  vtkPolyData *GetInput() { return this->GetInput( 0 ); };
79 //ETX
81 
84  void SetNumberOfInputs(int num);
85 
86  // Set Nth input, should only be used when UserManagedInputs is true.
87  void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input);
88  void SetInputDataByNumber(int num, vtkPolyData *ds);
89 
91 
98  vtkSetMacro(ParallelStreaming, int);
99  vtkGetMacro(ParallelStreaming, int);
100  vtkBooleanMacro(ParallelStreaming, int);
102 
104 
107  vtkSetMacro(OutputPointsPrecision,int);
108  vtkGetMacro(OutputPointsPrecision,int);
110 
111 //BTX
112  int ExecuteAppend(vtkPolyData* output,
113  vtkPolyData* inputs[], int numInputs);
114 //ETX
115 protected:
118 
119  // Flag for selecting parallel streaming behavior
122 
123  // Usual data generation method
124  virtual int RequestData(vtkInformation *,
126  virtual int RequestUpdateExtent(vtkInformation *,
128  virtual int FillInputPortInformation(int, vtkInformation *);
129 
130  // An efficient templated way to append data.
131  void AppendData(vtkDataArray *dest, vtkDataArray *src, vtkIdType offset);
132 
133 
134  // An efficient way to append cells.
135  vtkIdType *AppendCells(vtkIdType *pDest, vtkCellArray *src,
136  vtkIdType offset);
137 
138  private:
139  // hide the superclass' AddInput() from the user and the compiler
141  { vtkErrorMacro( << "AddInput() must be called with a vtkPolyData not a vtkDataObject."); };
142 
143  template <class InputIterator>
144  void AppendData(vtkDataArray *dest, vtkDataArray *src, vtkIdType offset,
145  InputIterator srcData, InputIterator srcEnd);
146 
147  template <class InputIterator, class OutputIterator>
148  void AppendData(vtkDataArray *dest, vtkDataArray *src, vtkIdType offset,
149  InputIterator srcData, InputIterator srcEnd,
150  OutputIterator destData);
151 
152  int UserManagedInputs;
153 
154 private:
155  vtkAppendPolyData(const vtkAppendPolyData&); // Not implemented.
156  void operator=(const vtkAppendPolyData&); // Not implemented.
157 };
158 
159 #endif
160 
161 
virtual int FillInputPortInformation(int port, vtkInformation *info)
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTKFILTERSCORE_EXPORT
void AddInputData(vtkDataObject *)
int vtkIdType
Definition: vtkType.h:275
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
Proxy object to connect input/output ports.
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Superclass for algorithms that produce only polydata as output.
vtkPolyData * GetInput()
a simple class to control print indentation
Definition: vtkIndent.h:38
appends one or more polygonal datasets together
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkDataObject * GetInput()
object to represent cell connectivity
Definition: vtkCellArray.h:49
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:64
represent and manipulate 3D points
Definition: vtkPoints.h:38