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 ----------------------------------------------------------------------------*/
31 #ifndef vtkAppendSelection_h
32 #define vtkAppendSelection_h
33 
34 #include "vtkFiltersCoreModule.h" // For export macro
35 #include "vtkSelectionAlgorithm.h"
36 
37 class vtkSelection;
38 
40 {
41 public:
42  static vtkAppendSelection *New();
43 
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
52  vtkSetMacro(UserManagedInputs,int);
53  vtkGetMacro(UserManagedInputs,int);
54  vtkBooleanMacro(UserManagedInputs,int);
56 
59  void AddInputData(vtkSelection *);
60 
63  void RemoveInputData(vtkSelection *);
64 
65 //BTX
67 
68  vtkSelection *GetInput(int idx);
69  vtkSelection *GetInput() { return this->GetInput( 0 ); };
70 //ETX
72 
75  void SetNumberOfInputs(int num);
76 
77  // Set Nth input, should only be used when UserManagedInputs is true.
78  void SetInputConnectionByNumber(int num, vtkAlgorithmOutput *input);
79 
81 
86  vtkSetMacro(AppendByUnion, int);
87  vtkGetMacro(AppendByUnion, int);
88  vtkBooleanMacro(AppendByUnion, int);
90 
91 protected:
94 
95  // Usual data generation method
96  virtual int RequestData(vtkInformation *,
98  virtual int FillInputPortInformation(int, vtkInformation *);
99 
100  private:
101  // hide the superclass' AddInput() from the user and the compiler
102  void AddInputData(vtkDataObject *)
103  { vtkErrorMacro( << "AddInput() must be called with a vtkSelection not a vtkDataObject."); };
104 
105  int UserManagedInputs;
106  int AppendByUnion;
107 private:
108  vtkAppendSelection(const vtkAppendSelection&); // Not implemented.
109  void operator=(const vtkAppendSelection&); // Not implemented.
110 };
111 
112 #endif
113 
114 
Store vtkAlgorithm input/output information.
virtual int FillInputPortInformation(int port, vtkInformation *info)
#define VTKFILTERSCORE_EXPORT
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:44
Proxy object to connect input/output ports.
appends one or more selections together
static vtkSelectionAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkSelection * GetInput()
Superclass for algorithms that produce only Selection as output.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:64
void PrintSelf(ostream &os, vtkIndent indent)