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 -------------------------------------------------------------------------*/
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 #if !defined(VTK_LEGACY_REMOVE)
49 class VTKINFOVISPARALLEL_EXPORT vtkPBGLShortestPaths : public vtkGraphAlgorithm
50 {
51 public:
52  static vtkPBGLShortestPaths *New();
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
57 
60  void SetOriginSelection(vtkSelection *s);
62  {
63  this->SetInputConnection(1, algOutput);
64  }
66 
71  void SetOriginVertex(vtkIdType index);
72 
80  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
81 
89  void SetOriginVertexString(char* arrayName, char* value);
90 
92 
99  vtkSetStringMacro(EdgeWeightArrayName);
101 
103 
116  vtkSetMacro(Delta,double);
118 
120 
127  vtkSetStringMacro(PredecessorArrayName);
129 
131 
139  vtkSetStringMacro(PathLengthArrayName);
141 
143 
149  vtkSetMacro(OriginFromSelection, bool);
150  vtkGetMacro(OriginFromSelection, bool);
151  vtkBooleanMacro(OriginFromSelection, bool);
153 
155 
160  vtkGetMacro(OutputSelection, bool);
161  vtkSetMacro(OutputSelection, bool);
162  vtkBooleanMacro(OutputSelection, bool);
164 
166 
171  vtkSetStringMacro(OutputSelectionType);
173 
175 
181  vtkSetMacro(UseUniformEdgeWeights, bool);
182  vtkGetMacro(UseUniformEdgeWeights, bool);
183  vtkBooleanMacro(UseUniformEdgeWeights, bool);
185 
186 
187 protected:
190 
191  virtual int RequestData(
192  vtkInformation *,
195 
196  virtual int FillInputPortInformation(
197  int port, vtkInformation* info);
198 
199  virtual int FillOutputPortInformation(
200  int port, vtkInformation* info);
201 
202 private:
203 
204  vtkIdType OriginVertexIndex;
205  char* InputArrayName;
206  char* EdgeWeightArrayName;
207  double Delta;
208  char* PredecessorArrayName;
209  char* PathLengthArrayName;
210  vtkVariant OriginValue;
211  bool OutputSelection;
212  bool OriginFromSelection;
213  bool UseUniformEdgeWeights;
214  char* OutputSelectionType;
215 
217 
220  vtkSetStringMacro(InputArrayName);
222 
227  vtkIdType GetVertexIndex(
228  vtkAbstractArray *abstract,vtkVariant value);
229 
230  vtkPBGLShortestPaths(const vtkPBGLShortestPaths&) VTK_DELETE_FUNCTION;
231  void operator=(const vtkPBGLShortestPaths&) VTK_DELETE_FUNCTION;
232 };
233 
234 #endif //VTK_LEGACY_REMOVE
235 #endif
static vtkGraphAlgorithm * New()
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:41
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
A node in a selection tree.
Definition: vtkSelection.h:37
int vtkIdType
Definition: vtkType.h:345
Superclass for algorithms that produce only graph as output.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
A atomic type representing the union of many types.
Definition: vtkVariant.h:69
Proxy object to connect input/output ports.
a simple class to control print indentation
Definition: vtkIndent.h:33
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
Compute the shortest paths from the origin vertex to all other vertices in a distributed vtkGraph...
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store zero or more vtkInformation instances.
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
Convenience methods for setting the origin selection input.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.