VTK
vtkPBGLShortestPaths.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPBGLShortestPaths.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 vtkPBGLShortestPaths_h
40 #define vtkPBGLShortestPaths_h
41 
42 #include "vtkInfovisParallelModule.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 #if !defined(VTK_LEGACY_REMOVE)
51 class VTKINFOVISPARALLEL_EXPORT vtkPBGLShortestPaths : public vtkGraphAlgorithm
52 {
53 public:
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
59 
62  {
63  this->SetInputConnection(1, algOutput);
64  }
66 
70 
76 
81  void SetOriginVertexString(char* arrayName, char* value);
82 
84 
88  vtkSetStringMacro(EdgeWeightArrayName);
90 
92 
102  vtkSetMacro(Delta,double);
104 
106 
111  vtkSetStringMacro(PredecessorArrayName);
113 
115 
121  vtkSetStringMacro(PathLengthArrayName);
123 
125 
129  vtkSetMacro(OriginFromSelection, bool);
130  vtkGetMacro(OriginFromSelection, bool);
131  vtkBooleanMacro(OriginFromSelection, bool);
133 
135 
138  vtkGetMacro(OutputSelection, bool);
139  vtkSetMacro(OutputSelection, bool);
140  vtkBooleanMacro(OutputSelection, bool);
142 
144 
147  vtkSetStringMacro(OutputSelectionType);
149 
151 
154  vtkSetMacro(UseUniformEdgeWeights, bool);
155  vtkGetMacro(UseUniformEdgeWeights, bool);
156  vtkBooleanMacro(UseUniformEdgeWeights, bool);
158 
159 
160 protected:
163 
164  virtual int RequestData(
165  vtkInformation *,
168 
170  int port, vtkInformation* info);
171 
173  int port, vtkInformation* info);
174 
175 private:
176 
177  vtkIdType OriginVertexIndex;
178  char* InputArrayName;
179  char* EdgeWeightArrayName;
180  double Delta;
181  char* PredecessorArrayName;
182  char* PathLengthArrayName;
183  vtkVariant OriginValue;
184  bool OutputSelection;
185  bool OriginFromSelection;
186  bool UseUniformEdgeWeights;
187  char* OutputSelectionType;
188 
190 
191  vtkSetStringMacro(InputArrayName);
193 
195 
197  vtkIdType GetVertexIndex(
198  vtkAbstractArray *abstract,vtkVariant value);
200 
201  vtkPBGLShortestPaths(const vtkPBGLShortestPaths&); // Not implemented.
202  void operator=(const vtkPBGLShortestPaths&); // Not implemented.
203 };
204 
205 #endif //VTK_LEGACY_REMOVE
206 #endif
vtkPBGLShortestPaths
Compute the shortest paths from the origin vertex to all other vertices in a distributed vtkGraph.
Definition: vtkPBGLShortestPaths.h:52
vtkStdString.h
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:54
vtkPBGLShortestPaths::SetOriginSelectionConnection
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
Definition: vtkPBGLShortestPaths.h:61
vtkVariant.h
vtkPBGLShortestPaths::SetOriginVertex
void SetOriginVertex(vtkStdString arrayName, vtkVariant value)
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkgl::s
GLdouble s
Definition: vtkgl.h:11594
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkPBGLShortestPaths::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkPBGLShortestPaths::SetOriginSelection
void SetOriginSelection(vtkSelection *s)
vtkSelection
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:45
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkPBGLShortestPaths::SetOriginVertex
void SetOriginVertex(vtkIdType index)
vtkPBGLShortestPaths::SetOriginVertexString
void SetOriginVertexString(char *arrayName, char *value)
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkGraphAlgorithm.h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetStringMacro
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
vtkPBGLShortestPaths::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:79
vtkPBGLShortestPaths::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkPBGLShortestPaths::~vtkPBGLShortestPaths
~vtkPBGLShortestPaths()
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:65
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
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:39
vtkPBGLShortestPaths::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:48
vtkPBGLShortestPaths::vtkPBGLShortestPaths
vtkPBGLShortestPaths()
vtkPBGLShortestPaths::New
static vtkPBGLShortestPaths * New()