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 -------------------------------------------------------------------------*/
40 #ifndef vtkPBGLShortestPaths_h
41 #define vtkPBGLShortestPaths_h
42 
43 #include "vtkInfovisParallelModule.h" // For export macro
44 #include "vtkStdString.h" // For string type
45 #include "vtkVariant.h" // For variant type
46 
47 #include "vtkGraphAlgorithm.h"
48 
49 class vtkSelection;
50 
51 #if !defined(VTK_LEGACY_REMOVE)
52 class VTKINFOVISPARALLEL_EXPORT vtkPBGLShortestPaths : public vtkGraphAlgorithm
53 {
54 public:
57  void PrintSelf(ostream& os, vtkIndent indent);
58 
60 
65  {
66  this->SetInputConnection(1, algOutput);
67  }
69 
75 
84 
92  void SetOriginVertexString(char* arrayName, char* value);
93 
95 
102  vtkSetStringMacro(EdgeWeightArrayName);
104 
106 
119  vtkSetMacro(Delta,double);
121 
123 
130  vtkSetStringMacro(PredecessorArrayName);
132 
134 
142  vtkSetStringMacro(PathLengthArrayName);
144 
146 
152  vtkSetMacro(OriginFromSelection, bool);
153  vtkGetMacro(OriginFromSelection, bool);
154  vtkBooleanMacro(OriginFromSelection, bool);
156 
158 
163  vtkGetMacro(OutputSelection, bool);
164  vtkSetMacro(OutputSelection, bool);
165  vtkBooleanMacro(OutputSelection, bool);
167 
169 
174  vtkSetStringMacro(OutputSelectionType);
176 
178 
184  vtkSetMacro(UseUniformEdgeWeights, bool);
185  vtkGetMacro(UseUniformEdgeWeights, bool);
186  vtkBooleanMacro(UseUniformEdgeWeights, bool);
188 
189 
190 protected:
193 
194  virtual int RequestData(
195  vtkInformation *,
198 
200  int port, vtkInformation* info);
201 
203  int port, vtkInformation* info);
204 
205 private:
206 
207  vtkIdType OriginVertexIndex;
208  char* InputArrayName;
209  char* EdgeWeightArrayName;
210  double Delta;
211  char* PredecessorArrayName;
212  char* PathLengthArrayName;
213  vtkVariant OriginValue;
214  bool OutputSelection;
215  bool OriginFromSelection;
216  bool UseUniformEdgeWeights;
217  char* OutputSelectionType;
218 
220 
223  vtkSetStringMacro(InputArrayName);
225 
230  vtkIdType GetVertexIndex(
231  vtkAbstractArray *abstract,vtkVariant value);
232 
233  vtkPBGLShortestPaths(const vtkPBGLShortestPaths&) VTK_DELETE_FUNCTION;
234  void operator=(const vtkPBGLShortestPaths&) VTK_DELETE_FUNCTION;
235 };
236 
237 #endif //VTK_LEGACY_REMOVE
238 #endif
vtkPBGLShortestPaths
Compute the shortest paths from the origin vertex to all other vertices in a distributed vtkGraph.
Definition: vtkPBGLShortestPaths.h:53
vtkStdString.h
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:55
vtkPBGLShortestPaths::SetOriginSelectionConnection
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
Definition: vtkPBGLShortestPaths.h:64
vtkVariant.h
vtkPBGLShortestPaths::SetOriginVertex
void SetOriginVertex(vtkStdString arrayName, vtkVariant value)
Set 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
vtkPBGLShortestPaths::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkPBGLShortestPaths::SetOriginSelection
void SetOriginSelection(vtkSelection *s)
Convenience methods for setting the origin selection input.
vtkSelection
A node in a selection tree.
Definition: vtkSelection.h:44
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkPBGLShortestPaths::SetOriginVertex
void SetOriginVertex(vtkIdType index)
Set the index (into the vertex array) of the breadth first search 'origin' vertex.
vtkPBGLShortestPaths::SetOriginVertexString
void SetOriginVertexString(char *arrayName, char *value)
Convenience method for setting the origin vertex given an array name and string value.
vtkGraphAlgorithm.h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPBGLShortestPaths::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:76
vtkPBGLShortestPaths::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkPBGLShortestPaths::~vtkPBGLShortestPaths
~vtkPBGLShortestPaths()
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:79
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
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:40
vtkPBGLShortestPaths::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkPBGLShortestPaths::vtkPBGLShortestPaths
vtkPBGLShortestPaths()
vtkPBGLShortestPaths::New
static vtkPBGLShortestPaths * New()