VTK  9.2.5
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 -------------------------------------------------------------------------*/
66 #ifndef vtkBoostBreadthFirstSearch_h
67 #define vtkBoostBreadthFirstSearch_h
68 
69 #include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro
70 #include "vtkStdString.h" // For string type
71 #include "vtkVariant.h" // For variant type
72 
73 #include "vtkGraphAlgorithm.h"
74 
75 class vtkSelection;
76 
77 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostBreadthFirstSearch : public vtkGraphAlgorithm
78 {
79 public:
82  void PrintSelf(ostream& os, vtkIndent indent) override;
83 
85 
90  {
91  this->SetInputConnection(1, algOutput);
92  }
94 
100 
109 
117  void SetOriginVertexString(char* arrayName, char* value);
118 
120 
124  vtkSetStringMacro(OutputArrayName);
126 
128 
134  vtkSetMacro(OriginFromSelection, bool);
135  vtkGetMacro(OriginFromSelection, bool);
136  vtkBooleanMacro(OriginFromSelection, bool);
138 
140 
145  vtkGetMacro(OutputSelection, bool);
146  vtkSetMacro(OutputSelection, bool);
147  vtkBooleanMacro(OutputSelection, bool);
149 
151 
156  vtkSetStringMacro(OutputSelectionType);
158 
159 protected:
162 
164 
166 
168 
169 private:
170  vtkIdType OriginVertexIndex;
171  char* InputArrayName;
172  char* OutputArrayName;
173  vtkVariant OriginValue;
174  bool OutputSelection;
175  bool OriginFromSelection;
176  char* OutputSelectionType;
177 
179 
182  vtkSetStringMacro(InputArrayName);
184 
189  vtkIdType GetVertexIndex(vtkAbstractArray* abstract, vtkVariant value);
190 
192  void operator=(const vtkBoostBreadthFirstSearch&) = delete;
193 };
194 
195 #endif
Abstract superclass for all arrays.
Proxy object to connect input/output ports.
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
Boost breadth_first_search on a vtkGraph.
static vtkBoostBreadthFirstSearch * New()
void SetOriginVertexString(char *arrayName, char *value)
Convenience method for setting the origin vertex given an array name and string value.
void SetOriginSelection(vtkSelection *s)
Convenience methods for setting the origin selection input.
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetOriginVertex(vtkStdString arrayName, vtkVariant value)
Set the breadth first search 'origin' vertex.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkBoostBreadthFirstSearch() override
void SetOriginVertex(vtkIdType index)
Set the index (into the vertex array) of the breadth first search 'origin' vertex.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
Convenience methods for setting the origin selection input.
Superclass for algorithms that produce only graph as output.
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
data object that represents a "selection" in VTK.
Definition: vtkSelection.h:169
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:108
A atomic type representing the union of many types.
Definition: vtkVariant.h:159
@ info
Definition: vtkX3D.h:382
@ value
Definition: vtkX3D.h:226
@ port
Definition: vtkX3D.h:453
@ index
Definition: vtkX3D.h:252
int vtkIdType
Definition: vtkType.h:332