VTK
vtkAppendSelection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAppendSelection.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 =========================================================================*/
15 /*----------------------------------------------------------------------------
16  Copyright (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
29 #ifndef vtkAppendSelection_h
30 #define vtkAppendSelection_h
31 
32 #include "vtkFiltersCoreModule.h" // For export macro
33 #include "vtkSelectionAlgorithm.h"
34 
35 class vtkSelection;
36 
37 class VTKFILTERSCORE_EXPORT vtkAppendSelection : public vtkSelectionAlgorithm
38 {
39 public:
40  static vtkAppendSelection *New();
41 
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
52  vtkSetMacro(UserManagedInputs,vtkTypeBool);
53  vtkGetMacro(UserManagedInputs,vtkTypeBool);
54  vtkBooleanMacro(UserManagedInputs,vtkTypeBool);
56 
61  void AddInputData(vtkSelection *);
62 
67  void RemoveInputData(vtkSelection *);
68 
70 
73  vtkSelection *GetInput(int idx);
74  vtkSelection *GetInput() { return this->GetInput( 0 ); };
76 
81  void SetNumberOfInputs(int num);
82 
83  // Set Nth input, should only be used when UserManagedInputs is true.
84  void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input);
85 
87 
95  vtkSetMacro(AppendByUnion, vtkTypeBool);
96  vtkGetMacro(AppendByUnion, vtkTypeBool);
97  vtkBooleanMacro(AppendByUnion, vtkTypeBool);
99 
100 protected:
102  ~vtkAppendSelection() override;
103 
104  // Usual data generation method
107  int FillInputPortInformation(int, vtkInformation *) override;
108 
109  private:
110  // hide the superclass' AddInput() from the user and the compiler
111  void AddInputData(vtkDataObject *)
112  { vtkErrorMacro( << "AddInput() must be called with a vtkSelection not a vtkDataObject."); };
113 
114  vtkTypeBool UserManagedInputs;
115  vtkTypeBool AppendByUnion;
116 private:
117  vtkAppendSelection(const vtkAppendSelection&) = delete;
118  void operator=(const vtkAppendSelection&) = delete;
119 };
120 
121 #endif
122 
123 
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkAppendSelection
appends one or more selections together
Definition: vtkAppendSelection.h:37
vtkSelectionAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkSelection
data object that represents a "selection" in VTK.
Definition: vtkSelection.h:57
vtkSelectionAlgorithm.h
vtkSelectionAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkSelectionAlgorithm::New
static vtkSelectionAlgorithm * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSelectionAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:36
vtkAppendSelection::GetInput
vtkSelection * GetInput()
Definition: vtkAppendSelection.h:74
vtkSelectionAlgorithm
Superclass for algorithms that produce only Selection as output.
Definition: vtkSelectionAlgorithm.h:46
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69