VTK
vtkBoostBreadthFirstSearch.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBoostBreadthFirstSearch.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 -------------------------------------------------------------------------*/
39 #ifndef vtkBoostBreadthFirstSearch_h
40 #define vtkBoostBreadthFirstSearch_h
41 
42 #include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
43 #include "vtkStdString.h" // For string type
44 #include "vtkVariant.h" // For variant type
45 
46 #include "vtkGraphAlgorithm.h"
47 
48 class vtkSelection;
49 
50 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearch : public vtkGraphAlgorithm
51 {
52 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
59  void SetOriginSelection(vtkSelection *s);
61  {
62  this->SetInputConnection(1, algOutput);
63  }
65 
68  void SetOriginVertex(vtkIdType index);
69 
74  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
75 
80  void SetOriginVertexString(char* arrayName, char* value);
81 
83 
85  vtkSetStringMacro(OutputArrayName);
87 
89 
93  vtkSetMacro(OriginFromSelection, bool);
94  vtkGetMacro(OriginFromSelection, bool);
95  vtkBooleanMacro(OriginFromSelection, bool);
97 
99 
102  vtkGetMacro(OutputSelection, bool);
103  vtkSetMacro(OutputSelection, bool);
104  vtkBooleanMacro(OutputSelection, bool);
106 
108 
111  vtkSetStringMacro(OutputSelectionType);
113 
114 protected:
117 
118  virtual int RequestData(
119  vtkInformation *,
122 
123  virtual int FillInputPortInformation(
124  int port, vtkInformation* info);
125 
126  virtual int FillOutputPortInformation(
127  int port, vtkInformation* info);
128 
129 private:
130 
131  vtkIdType OriginVertexIndex;
132  char* InputArrayName;
133  char* OutputArrayName;
134  vtkVariant OriginValue;
135  bool OutputSelection;
136  bool OriginFromSelection;
137  char* OutputSelectionType;
138 
140 
141  vtkSetStringMacro(InputArrayName);
143 
145 
147  vtkIdType GetVertexIndex(
148  vtkAbstractArray *abstract,vtkVariant value);
150 
151  vtkBoostBreadthFirstSearch(const vtkBoostBreadthFirstSearch&); // Not implemented.
152  void operator=(const vtkBoostBreadthFirstSearch&); // Not implemented.
153 };
154 
155 #endif
static vtkGraphAlgorithm * New()
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
Boost breadth_first_search on a vtkGraph.
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:44
int vtkIdType
Definition: vtkType.h:275
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Superclass for algorithms that produce only graph as output.
A atomic type representing the union of many types.
Definition: vtkVariant.h:78
Proxy object to connect input/output ports.
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
a simple class to control print indentation
Definition: vtkIndent.h:38
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
virtual int FillInputPortInformation(int port, vtkInformation *info)