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 "vtkStdString.h" // For string type 00041 #include "vtkVariant.h" // For variant type 00042 00043 #include "vtkGraphAlgorithm.h" 00044 00045 class vtkSelection; 00046 00047 class VTK_PARALLEL_EXPORT vtkPBGLShortestPaths : public vtkGraphAlgorithm 00048 { 00049 public: 00050 static vtkPBGLShortestPaths *New(); 00051 vtkTypeMacro(vtkPBGLShortestPaths, vtkGraphAlgorithm); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00053 00055 00056 void SetOriginSelection(vtkSelection *s); 00057 void SetOriginSelectionConnection(vtkAlgorithmOutput* algOutput) 00058 { 00059 this->SetInputConnection(1, algOutput); 00060 } 00062 00065 void SetOriginVertex(vtkIdType index); 00066 00067 //BTX 00068 00070 00074 void SetOriginVertex(vtkStdString arrayName, vtkVariant value); 00075 //ETX 00077 00082 void SetOriginVertexString(char* arrayName, char* value); 00083 00085 00089 vtkSetStringMacro(EdgeWeightArrayName); 00091 00093 00103 vtkSetMacro(Delta,double); 00105 00107 00112 vtkSetStringMacro(PredecessorArrayName); 00114 00116 00122 vtkSetStringMacro(PathLengthArrayName); 00124 00126 00130 vtkSetMacro(OriginFromSelection, bool); 00131 vtkGetMacro(OriginFromSelection, bool); 00132 vtkBooleanMacro(OriginFromSelection, bool); 00134 00136 00139 vtkGetMacro(OutputSelection, bool); 00140 vtkSetMacro(OutputSelection, bool); 00141 vtkBooleanMacro(OutputSelection, bool); 00143 00145 00148 vtkSetStringMacro(OutputSelectionType); 00150 00152 00155 vtkSetMacro(UseUniformEdgeWeights, bool); 00156 vtkGetMacro(UseUniformEdgeWeights, bool); 00157 vtkBooleanMacro(UseUniformEdgeWeights, bool); 00159 00160 00161 protected: 00162 vtkPBGLShortestPaths(); 00163 ~vtkPBGLShortestPaths(); 00164 00165 virtual int RequestData( 00166 vtkInformation *, 00167 vtkInformationVector **, 00168 vtkInformationVector *); 00169 00170 virtual int FillInputPortInformation( 00171 int port, vtkInformation* info); 00172 00173 virtual int FillOutputPortInformation( 00174 int port, vtkInformation* info); 00175 00176 private: 00177 00178 vtkIdType OriginVertexIndex; 00179 char* InputArrayName; 00180 char* EdgeWeightArrayName; 00181 double Delta; 00182 char* PredecessorArrayName; 00183 char* PathLengthArrayName; 00184 //BTX 00185 vtkVariant OriginValue; 00186 //ETX 00187 bool OutputSelection; 00188 bool OriginFromSelection; 00189 bool UseUniformEdgeWeights; 00190 char* OutputSelectionType; 00191 00193 00194 vtkSetStringMacro(InputArrayName); 00196 00197 //BTX 00198 00200 00202 vtkIdType GetVertexIndex( 00203 vtkAbstractArray *abstract,vtkVariant value); 00204 //ETX 00206 00207 vtkPBGLShortestPaths(const vtkPBGLShortestPaths&); // Not implemented. 00208 void operator=(const vtkPBGLShortestPaths&); // Not implemented. 00209 }; 00210 00211 #endif