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 -------------------------------------------------------------------------*/
41 #ifndef vtkPBGLBreadthFirstSearch_h
42 #define vtkPBGLBreadthFirstSearch_h
43 
44 #include "vtkInfovisParallelModule.h" // For export macro
45 #include "vtkStdString.h" // For string type
46 #include "vtkVariant.h" // For variant type
47 
48 #include "vtkGraphAlgorithm.h"
49 
50 class vtkSelection;
51 
52 #if !defined(VTK_LEGACY_REMOVE)
53 class VTKINFOVISPARALLEL_EXPORT vtkPBGLBreadthFirstSearch : public vtkGraphAlgorithm
54 {
55 public:
58  void PrintSelf(ostream& os, vtkIndent indent);
59 
61 
64  {
65  this->SetInputConnection(1, algOutput);
66  }
68 
72 
78 
83  void SetOriginVertexString(char* arrayName, char* value);
84 
86 
88  vtkSetStringMacro(OutputArrayName);
90 
92 
96  vtkSetMacro(OriginFromSelection, bool);
97  vtkGetMacro(OriginFromSelection, bool);
98  vtkBooleanMacro(OriginFromSelection, bool);
100 
102 
105  vtkGetMacro(OutputSelection, bool);
106  vtkSetMacro(OutputSelection, bool);
107  vtkBooleanMacro(OutputSelection, bool);
109 
111 
114  vtkSetStringMacro(OutputSelectionType);
116 
117 protected:
120 
121  virtual int RequestData(
122  vtkInformation *,
125 
127  int port, vtkInformation* info);
128 
130  int port, vtkInformation* info);
131 
132 private:
133 
134  vtkIdType OriginVertexIndex;
135  char* InputArrayName;
136  char* OutputArrayName;
137  vtkVariant OriginValue;
138  bool OutputSelection;
139  bool OriginFromSelection;
140  char* OutputSelectionType;
141 
143 
144  vtkSetStringMacro(InputArrayName);
146 
148 
150  vtkIdType GetVertexIndex(
151  vtkAbstractArray *abstract,vtkVariant value);
153 
154  vtkPBGLBreadthFirstSearch(const vtkPBGLBreadthFirstSearch&); // Not implemented.
155  void operator=(const vtkPBGLBreadthFirstSearch&); // Not implemented.
156 };
157 
158 #endif //VTK_LEGACY_REMOVE
159 #endif
vtkStdString.h
vtkPBGLBreadthFirstSearch::SetOriginVertexString
void SetOriginVertexString(char *arrayName, char *value)
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:54
vtkVariant.h
vtkPBGLBreadthFirstSearch::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkPBGLBreadthFirstSearch::SetOriginVertex
void SetOriginVertex(vtkIdType index)
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkPBGLBreadthFirstSearch::SetOriginSelection
void SetOriginSelection(vtkSelection *s)
vtkgl::s
GLdouble s
Definition: vtkgl.h:11594
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkPBGLBreadthFirstSearch::SetOriginSelectionConnection
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
Definition: vtkPBGLBreadthFirstSearch.h:63
vtkSelection
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:45
vtkPBGLBreadthFirstSearch::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
vtkPBGLBreadthFirstSearch::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkGraphAlgorithm.h
vtkPBGLBreadthFirstSearch::SetOriginVertex
void SetOriginVertex(vtkStdString arrayName, vtkVariant value)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetStringMacro
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:79
vtkPBGLBreadthFirstSearch::vtkPBGLBreadthFirstSearch
vtkPBGLBreadthFirstSearch()
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:65
vtkPBGLBreadthFirstSearch::~vtkPBGLBreadthFirstSearch
~vtkPBGLBreadthFirstSearch()
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkAlgorithm::SetInputConnection
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkPBGLBreadthFirstSearch
Breadth-first search on a distributed vtkGraph.
Definition: vtkPBGLBreadthFirstSearch.h:54
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:39
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:48
vtkPBGLBreadthFirstSearch::New
static vtkPBGLBreadthFirstSearch * New()
vtkPBGLBreadthFirstSearch::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)