VTK
vtkPBGLBreadthFirstSearch.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPBGLBreadthFirstSearch.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 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
36 #ifndef vtkPBGLBreadthFirstSearch_h
37 #define vtkPBGLBreadthFirstSearch_h
38 
39 #include "vtkInfovisParallelModule.h" // For export macro
40 #include "vtkStdString.h" // For string type
41 #include "vtkVariant.h" // For variant type
42 
43 #include "vtkGraphAlgorithm.h"
44 
45 class vtkSelection;
46 
47 #if !defined(VTK_LEGACY_REMOVE)
48 class VTKINFOVISPARALLEL_EXPORT vtkPBGLBreadthFirstSearch : public vtkGraphAlgorithm
49 {
50 public:
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
56 
59  void SetOriginSelection(vtkSelection *s);
61  {
62  this->SetInputConnection(1, algOutput);
63  }
65 
70  void SetOriginVertex(vtkIdType index);
71 
79  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
80 
88  void SetOriginVertexString(char* arrayName, char* value);
89 
91 
95  vtkSetStringMacro(OutputArrayName);
97 
99 
105  vtkSetMacro(OriginFromSelection, bool);
106  vtkGetMacro(OriginFromSelection, bool);
107  vtkBooleanMacro(OriginFromSelection, bool);
109 
111 
116  vtkGetMacro(OutputSelection, bool);
117  vtkSetMacro(OutputSelection, bool);
118  vtkBooleanMacro(OutputSelection, bool);
120 
122 
127  vtkSetStringMacro(OutputSelectionType);
129 
130 protected:
133 
134  virtual int RequestData(
135  vtkInformation *,
138 
139  virtual int FillInputPortInformation(
140  int port, vtkInformation* info);
141 
142  virtual int FillOutputPortInformation(
143  int port, vtkInformation* info);
144 
145 private:
146 
147  vtkIdType OriginVertexIndex;
148  char* InputArrayName;
149  char* OutputArrayName;
150  vtkVariant OriginValue;
151  bool OutputSelection;
152  bool OriginFromSelection;
153  char* OutputSelectionType;
154 
156 
159  vtkSetStringMacro(InputArrayName);
161 
166  vtkIdType GetVertexIndex(
167  vtkAbstractArray *abstract,vtkVariant value);
168 
169  vtkPBGLBreadthFirstSearch(const vtkPBGLBreadthFirstSearch&) VTK_DELETE_FUNCTION;
170  void operator=(const vtkPBGLBreadthFirstSearch&) VTK_DELETE_FUNCTION;
171 };
172 
173 #endif //VTK_LEGACY_REMOVE
174 #endif
static vtkGraphAlgorithm * New()
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:41
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
A node in a selection tree.
Definition: vtkSelection.h:37
int vtkIdType
Definition: vtkType.h:345
Superclass for algorithms that produce only graph as output.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
A atomic type representing the union of many types.
Definition: vtkVariant.h:69
Proxy object to connect input/output ports.
a simple class to control print indentation
Definition: vtkIndent.h:33
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
Convenience methods for setting the origin selection input.
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Breadth-first search on a distributed vtkGraph.