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:
54  static vtkPBGLShortestPaths *New();
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
59 
60  void SetOriginSelection(vtkSelection *s);
62  {
63  this->SetInputConnection(1, algOutput);
64  }
66 
69  void SetOriginVertex(vtkIdType index);
70 
75  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
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 
169  virtual int FillInputPortInformation(
170  int port, vtkInformation* info);
171 
172  virtual int FillOutputPortInformation(
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
static vtkGraphAlgorithm * New()
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
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
int vtkIdType
Definition: vtkType.h:275
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)
Store zero or more vtkInformation instances.
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
virtual int FillInputPortInformation(int port, vtkInformation *info)