VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 -------------------------------------------------------------------------*/
37 #ifndef __vtkPBGLShortestPaths_h
38 #define __vtkPBGLShortestPaths_h
39 
40 #include "vtkInfovisParallelModule.h" // For export macro
41 #include "vtkStdString.h" // For string type
42 #include "vtkVariant.h" // For variant type
43 
44 #include "vtkGraphAlgorithm.h"
45 
46 class vtkSelection;
47 
48 class VTKINFOVISPARALLEL_EXPORT vtkPBGLShortestPaths : public vtkGraphAlgorithm
49 {
50 public:
51  static vtkPBGLShortestPaths *New();
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
56 
57  void SetOriginSelection(vtkSelection *s);
59  {
60  this->SetInputConnection(1, algOutput);
61  }
63 
66  void SetOriginVertex(vtkIdType index);
67 
72  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
73 
78  void SetOriginVertexString(char* arrayName, char* value);
79 
81 
85  vtkSetStringMacro(EdgeWeightArrayName);
87 
89 
99  vtkSetMacro(Delta,double);
101 
103 
108  vtkSetStringMacro(PredecessorArrayName);
110 
112 
118  vtkSetStringMacro(PathLengthArrayName);
120 
122 
126  vtkSetMacro(OriginFromSelection, bool);
127  vtkGetMacro(OriginFromSelection, bool);
128  vtkBooleanMacro(OriginFromSelection, bool);
130 
132 
135  vtkGetMacro(OutputSelection, bool);
136  vtkSetMacro(OutputSelection, bool);
137  vtkBooleanMacro(OutputSelection, bool);
139 
141 
144  vtkSetStringMacro(OutputSelectionType);
146 
148 
151  vtkSetMacro(UseUniformEdgeWeights, bool);
152  vtkGetMacro(UseUniformEdgeWeights, bool);
153  vtkBooleanMacro(UseUniformEdgeWeights, bool);
155 
156 
157 protected:
160 
161  virtual int RequestData(
162  vtkInformation *,
165 
166  virtual int FillInputPortInformation(
167  int port, vtkInformation* info);
168 
169  virtual int FillOutputPortInformation(
170  int port, vtkInformation* info);
171 
172 private:
173 
174  vtkIdType OriginVertexIndex;
175  char* InputArrayName;
176  char* EdgeWeightArrayName;
177  double Delta;
178  char* PredecessorArrayName;
179  char* PathLengthArrayName;
180  vtkVariant OriginValue;
181  bool OutputSelection;
182  bool OriginFromSelection;
183  bool UseUniformEdgeWeights;
184  char* OutputSelectionType;
185 
187 
188  vtkSetStringMacro(InputArrayName);
190 
192 
194  vtkIdType GetVertexIndex(
195  vtkAbstractArray *abstract,vtkVariant value);
197 
198  vtkPBGLShortestPaths(const vtkPBGLShortestPaths&); // Not implemented.
199  void operator=(const vtkPBGLShortestPaths&); // Not implemented.
200 };
201 
202 #endif
static vtkGraphAlgorithm * New()
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
GLuint index
Definition: vtkgl.h:11983
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
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
int vtkIdType
Definition: vtkType.h:268
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.
a simple class to control print indentation
Definition: vtkIndent.h:38
void PrintSelf(ostream &os, vtkIndent indent)
Compute the shortest paths from the origin vertex to all other vertices in a distributed vtkGraph...
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
GLdouble s
Definition: vtkgl.h:11594
Store zero or more vtkInformation instances.
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
virtual int FillInputPortInformation(int port, vtkInformation *info)