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 -------------------------------------------------------------------------*/
42 #ifndef vtkPBGLBreadthFirstSearch_h
43 #define vtkPBGLBreadthFirstSearch_h
44 
45 #include "vtkInfovisParallelModule.h" // For export macro
46 #include "vtkStdString.h" // For string type
47 #include "vtkVariant.h" // For variant type
48 
49 #include "vtkGraphAlgorithm.h"
50 
51 class vtkSelection;
52 
53 #if !defined(VTK_LEGACY_REMOVE)
54 class VTKINFOVISPARALLEL_EXPORT vtkPBGLBreadthFirstSearch : public vtkGraphAlgorithm
55 {
56 public:
59  void PrintSelf(ostream& os, vtkIndent indent);
60 
62 
67  {
68  this->SetInputConnection(1, algOutput);
69  }
71 
77 
86 
94  void SetOriginVertexString(char* arrayName, char* value);
95 
97 
101  vtkSetStringMacro(OutputArrayName);
103 
105 
111  vtkSetMacro(OriginFromSelection, bool);
112  vtkGetMacro(OriginFromSelection, bool);
113  vtkBooleanMacro(OriginFromSelection, bool);
115 
117 
122  vtkGetMacro(OutputSelection, bool);
123  vtkSetMacro(OutputSelection, bool);
124  vtkBooleanMacro(OutputSelection, bool);
126 
128 
133  vtkSetStringMacro(OutputSelectionType);
135 
136 protected:
139 
140  virtual int RequestData(
141  vtkInformation *,
144 
146  int port, vtkInformation* info);
147 
149  int port, vtkInformation* info);
150 
151 private:
152 
153  vtkIdType OriginVertexIndex;
154  char* InputArrayName;
155  char* OutputArrayName;
156  vtkVariant OriginValue;
157  bool OutputSelection;
158  bool OriginFromSelection;
159  char* OutputSelectionType;
160 
162 
165  vtkSetStringMacro(InputArrayName);
167 
172  vtkIdType GetVertexIndex(
173  vtkAbstractArray *abstract,vtkVariant value);
174 
175  vtkPBGLBreadthFirstSearch(const vtkPBGLBreadthFirstSearch&) VTK_DELETE_FUNCTION;
176  void operator=(const vtkPBGLBreadthFirstSearch&) VTK_DELETE_FUNCTION;
177 };
178 
179 #endif //VTK_LEGACY_REMOVE
180 #endif
vtkStdString.h
vtkPBGLBreadthFirstSearch::SetOriginVertexString
void SetOriginVertexString(char *arrayName, char *value)
Convenience method for setting the origin vertex given an array name and string value.
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:55
vtkVariant.h
vtkPBGLBreadthFirstSearch::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkPBGLBreadthFirstSearch::SetOriginVertex
void SetOriginVertex(vtkIdType index)
Set the index (into the vertex array) of the breadth first search 'origin' vertex.
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkPBGLBreadthFirstSearch::SetOriginSelection
void SetOriginSelection(vtkSelection *s)
Convenience methods for setting the origin selection input.
vtkPBGLBreadthFirstSearch::SetOriginSelectionConnection
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
Definition: vtkPBGLBreadthFirstSearch.h:66
vtkSelection
A node in a selection tree.
Definition: vtkSelection.h:44
vtkPBGLBreadthFirstSearch::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
vtkPBGLBreadthFirstSearch::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkGraphAlgorithm.h
vtkPBGLBreadthFirstSearch::SetOriginVertex
void SetOriginVertex(vtkStdString arrayName, vtkVariant value)
Set the breadth first search 'origin' vertex.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:76
vtkPBGLBreadthFirstSearch::vtkPBGLBreadthFirstSearch
vtkPBGLBreadthFirstSearch()
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:79
vtkPBGLBreadthFirstSearch::~vtkPBGLBreadthFirstSearch
~vtkPBGLBreadthFirstSearch()
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkAlgorithm::SetInputConnection
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkPBGLBreadthFirstSearch
Breadth-first search on a distributed vtkGraph.
Definition: vtkPBGLBreadthFirstSearch.h:55
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:40
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
vtkPBGLBreadthFirstSearch::New
static vtkPBGLBreadthFirstSearch * New()
vtkPBGLBreadthFirstSearch::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkX3D::index
@ index
Definition: vtkX3D.h:246