VTK  9.0.20210624
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 
47 class VTKFILTERSCORE_EXPORT vtkAppendPolyData : public vtkPolyDataAlgorithm
48 {
49 public:
51 
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56 
62  vtkSetMacro(UserManagedInputs, vtkTypeBool);
63  vtkGetMacro(UserManagedInputs, vtkTypeBool);
64  vtkBooleanMacro(UserManagedInputs, vtkTypeBool);
66 
72 
78 
80 
83  vtkPolyData* GetInput(int idx);
84  vtkPolyData* GetInput() { return this->GetInput(0); }
86 
91  void SetNumberOfInputs(int num);
92 
93  // Set Nth input, should only be used when UserManagedInputs is true.
95  void SetInputDataByNumber(int num, vtkPolyData* ds);
96 
98 
108  vtkSetMacro(ParallelStreaming, vtkTypeBool);
109  vtkGetMacro(ParallelStreaming, vtkTypeBool);
110  vtkBooleanMacro(ParallelStreaming, vtkTypeBool);
112 
114 
119  vtkSetMacro(OutputPointsPrecision, int);
120  vtkGetMacro(OutputPointsPrecision, int);
122 
123  int ExecuteAppend(vtkPolyData* output, vtkPolyData* inputs[], int numInputs)
124  VTK_SIZEHINT(inputs, numInputs);
125 
126 protected:
128  ~vtkAppendPolyData() override;
129 
130  // Flag for selecting parallel streaming behavior
133 
134  // Usual data generation method
138 
139  // An efficient templated way to append data.
141 
142  // An efficient way to append cells.
144 
145 private:
146  // hide the superclass' AddInput() from the user and the compiler
148  {
149  vtkErrorMacro(<< "AddInput() must be called with a vtkPolyData not a vtkDataObject.");
150  }
151 
152  vtkTypeBool UserManagedInputs;
153 
154 private:
155  vtkAppendPolyData(const vtkAppendPolyData&) = delete;
156  void operator=(const vtkAppendPolyData&) = delete;
157 };
158 
159 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:34
vtkAppendPolyData::AppendData
void AppendData(vtkDataArray *dest, vtkDataArray *src, vtkIdType offset)
vtkAppendPolyData::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkAppendPolyData::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkAppendPolyData::ParallelStreaming
vtkTypeBool ParallelStreaming
Definition: vtkAppendPolyData.h:131
vtkAppendPolyData::AppendCells
void AppendCells(vtkCellArray *dst, vtkCellArray *src, vtkIdType offset)
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkAppendPolyData::SetInputDataByNumber
void SetInputDataByNumber(int num, vtkPolyData *ds)
vtkAppendPolyData::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
vtkAppendPolyData::AddInputData
void AddInputData(vtkPolyData *)
Add a dataset to the list of data to append.
vtkAppendPolyData::SetNumberOfInputs
void SetNumberOfInputs(int num)
Directly set(allocate) number of inputs, should only be used when UserManagedInputs is true.
vtkPolyDataAlgorithm.h
vtkAppendPolyData
appends one or more polygonal datasets together
Definition: vtkAppendPolyData.h:48
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:48
vtkX3D::offset
@ offset
Definition: vtkX3D.h:444
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:181
vtkPolyDataAlgorithm::AddInputData
void AddInputData(vtkDataObject *)
Assign a data object as input.
vtkAppendPolyData::GetInput
vtkPolyData * GetInput(int idx)
Get any input of this filter.
vtkAppendPolyData::GetInput
vtkPolyData * GetInput()
Get any input of this filter.
Definition: vtkAppendPolyData.h:84
vtkAppendPolyData::SetInputConnectionByNumber
void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input)
vtkAppendPolyData::~vtkAppendPolyData
~vtkAppendPolyData() override
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:74
vtkAppendPolyData::ExecuteAppend
int ExecuteAppend(vtkPolyData *output, vtkPolyData *inputs[], int numInputs)
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:37
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkAppendPolyData::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkAppendPolyData.h:132
vtkAppendPolyData::vtkAppendPolyData
vtkAppendPolyData()
vtkAppendPolyData::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:60
vtkAppendPolyData::New
static vtkAppendPolyData * New()
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkAppendPolyData::RemoveInputData
void RemoveInputData(vtkPolyData *)
Remove a dataset from the list of data to append.
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:42