VTK
dox/Parallel/vtkPBGLShortestPaths.h
Go to the documentation of this file.
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 
00071   void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
00072 
00077   void SetOriginVertexString(char* arrayName, char* value);
00078 
00080 
00084   vtkSetStringMacro(EdgeWeightArrayName);
00086 
00088 
00098   vtkSetMacro(Delta,double);
00100 
00102 
00107   vtkSetStringMacro(PredecessorArrayName);
00109 
00111 
00117   vtkSetStringMacro(PathLengthArrayName);
00119 
00121 
00125   vtkSetMacro(OriginFromSelection, bool);
00126   vtkGetMacro(OriginFromSelection, bool);
00127   vtkBooleanMacro(OriginFromSelection, bool);
00129 
00131 
00134   vtkGetMacro(OutputSelection, bool);
00135   vtkSetMacro(OutputSelection, bool);
00136   vtkBooleanMacro(OutputSelection, bool);
00138   
00140 
00143   vtkSetStringMacro(OutputSelectionType);
00145 
00147 
00150   vtkSetMacro(UseUniformEdgeWeights, bool);
00151   vtkGetMacro(UseUniformEdgeWeights, bool);
00152   vtkBooleanMacro(UseUniformEdgeWeights, bool);
00154 
00155 
00156 protected:
00157   vtkPBGLShortestPaths();
00158   ~vtkPBGLShortestPaths();
00159 
00160   virtual int RequestData(
00161     vtkInformation *, 
00162     vtkInformationVector **, 
00163     vtkInformationVector *);
00164 
00165   virtual int FillInputPortInformation(
00166     int port, vtkInformation* info);
00167 
00168   virtual int FillOutputPortInformation(
00169     int port, vtkInformation* info);
00170   
00171 private:
00172 
00173   vtkIdType OriginVertexIndex;
00174   char* InputArrayName;
00175   char* EdgeWeightArrayName;
00176   double Delta;
00177   char* PredecessorArrayName;
00178   char* PathLengthArrayName;
00179   vtkVariant OriginValue;
00180   bool OutputSelection;
00181   bool OriginFromSelection;
00182   bool UseUniformEdgeWeights;
00183   char* OutputSelectionType;
00184   
00186 
00187   vtkSetStringMacro(InputArrayName);
00189 
00191 
00193   vtkIdType GetVertexIndex(
00194     vtkAbstractArray *abstract,vtkVariant value);
00196 
00197   vtkPBGLShortestPaths(const vtkPBGLShortestPaths&);  // Not implemented.
00198   void operator=(const vtkPBGLShortestPaths&);  // Not implemented.
00199 };
00200 
00201 #endif