VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPBGLShortestPaths.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00037 #ifndef __vtkPBGLShortestPaths_h 00038 #define __vtkPBGLShortestPaths_h 00039 00040 #include "vtkInfovisParallelModule.h" // For export macro 00041 #include "vtkStdString.h" // For string type 00042 #include "vtkVariant.h" // For variant type 00043 00044 #include "vtkGraphAlgorithm.h" 00045 00046 class vtkSelection; 00047 00048 class VTKINFOVISPARALLEL_EXPORT vtkPBGLShortestPaths : public vtkGraphAlgorithm 00049 { 00050 public: 00051 static vtkPBGLShortestPaths *New(); 00052 vtkTypeMacro(vtkPBGLShortestPaths, vtkGraphAlgorithm); 00053 void PrintSelf(ostream& os, vtkIndent indent); 00054 00056 00057 void SetOriginSelection(vtkSelection *s); 00058 void SetOriginSelectionConnection(vtkAlgorithmOutput* algOutput) 00059 { 00060 this->SetInputConnection(1, algOutput); 00061 } 00063 00066 void SetOriginVertex(vtkIdType index); 00067 00072 void SetOriginVertex(vtkStdString arrayName, vtkVariant value); 00073 00078 void SetOriginVertexString(char* arrayName, char* value); 00079 00081 00085 vtkSetStringMacro(EdgeWeightArrayName); 00087 00089 00099 vtkSetMacro(Delta,double); 00101 00103 00108 vtkSetStringMacro(PredecessorArrayName); 00110 00112 00118 vtkSetStringMacro(PathLengthArrayName); 00120 00122 00126 vtkSetMacro(OriginFromSelection, bool); 00127 vtkGetMacro(OriginFromSelection, bool); 00128 vtkBooleanMacro(OriginFromSelection, bool); 00130 00132 00135 vtkGetMacro(OutputSelection, bool); 00136 vtkSetMacro(OutputSelection, bool); 00137 vtkBooleanMacro(OutputSelection, bool); 00139 00141 00144 vtkSetStringMacro(OutputSelectionType); 00146 00148 00151 vtkSetMacro(UseUniformEdgeWeights, bool); 00152 vtkGetMacro(UseUniformEdgeWeights, bool); 00153 vtkBooleanMacro(UseUniformEdgeWeights, bool); 00155 00156 00157 protected: 00158 vtkPBGLShortestPaths(); 00159 ~vtkPBGLShortestPaths(); 00160 00161 virtual int RequestData( 00162 vtkInformation *, 00163 vtkInformationVector **, 00164 vtkInformationVector *); 00165 00166 virtual int FillInputPortInformation( 00167 int port, vtkInformation* info); 00168 00169 virtual int FillOutputPortInformation( 00170 int port, vtkInformation* info); 00171 00172 private: 00173 00174 vtkIdType OriginVertexIndex; 00175 char* InputArrayName; 00176 char* EdgeWeightArrayName; 00177 double Delta; 00178 char* PredecessorArrayName; 00179 char* PathLengthArrayName; 00180 vtkVariant OriginValue; 00181 bool OutputSelection; 00182 bool OriginFromSelection; 00183 bool UseUniformEdgeWeights; 00184 char* OutputSelectionType; 00185 00187 00188 vtkSetStringMacro(InputArrayName); 00190 00192 00194 vtkIdType GetVertexIndex( 00195 vtkAbstractArray *abstract,vtkVariant value); 00197 00198 vtkPBGLShortestPaths(const vtkPBGLShortestPaths&); // Not implemented. 00199 void operator=(const vtkPBGLShortestPaths&); // Not implemented. 00200 }; 00201 00202 #endif