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 "vtkStdString.h" // For string type
41 #include "vtkVariant.h" // For variant type
42 
43 #include "vtkGraphAlgorithm.h"
44 
45 class vtkSelection;
46 
48 {
49 public:
50  static vtkPBGLShortestPaths *New();
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
55 
56  void SetOriginSelection(vtkSelection *s);
58  {
59  this->SetInputConnection(1, algOutput);
60  }
62 
65  void SetOriginVertex(vtkIdType index);
66 
71  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
72 
77  void SetOriginVertexString(char* arrayName, char* value);
78 
80 
84  vtkSetStringMacro(EdgeWeightArrayName);
86 
88 
98  vtkSetMacro(Delta,double);
100 
102 
107  vtkSetStringMacro(PredecessorArrayName);
109 
111 
117  vtkSetStringMacro(PathLengthArrayName);
119 
121 
125  vtkSetMacro(OriginFromSelection, bool);
126  vtkGetMacro(OriginFromSelection, bool);
127  vtkBooleanMacro(OriginFromSelection, bool);
129 
131 
134  vtkGetMacro(OutputSelection, bool);
135  vtkSetMacro(OutputSelection, bool);
136  vtkBooleanMacro(OutputSelection, bool);
138 
140 
143  vtkSetStringMacro(OutputSelectionType);
145 
147 
150  vtkSetMacro(UseUniformEdgeWeights, bool);
151  vtkGetMacro(UseUniformEdgeWeights, bool);
152  vtkBooleanMacro(UseUniformEdgeWeights, bool);
154 
155 
156 protected:
159 
160  virtual int RequestData(
161  vtkInformation *,
164 
165  virtual int FillInputPortInformation(
166  int port, vtkInformation* info);
167 
168  virtual int FillOutputPortInformation(
169  int port, vtkInformation* info);
170 
171 private:
172 
173  vtkIdType OriginVertexIndex;
174  char* InputArrayName;
175  char* EdgeWeightArrayName;
176  double Delta;
177  char* PredecessorArrayName;
178  char* PathLengthArrayName;
179  vtkVariant OriginValue;
180  bool OutputSelection;
181  bool OriginFromSelection;
182  bool UseUniformEdgeWeights;
183  char* OutputSelectionType;
184 
186 
187  vtkSetStringMacro(InputArrayName);
189 
191 
193  vtkIdType GetVertexIndex(
194  vtkAbstractArray *abstract,vtkVariant value);
196 
197  vtkPBGLShortestPaths(const vtkPBGLShortestPaths&); // Not implemented.
198  void operator=(const vtkPBGLShortestPaths&); // Not implemented.
199 };
200 
201 #endif