VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkBoostPrimMinimumSpanningTree.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 -------------------------------------------------------------------------*/ 00048 #ifndef __vtkBoostPrimMinimumSpanningTree_h 00049 #define __vtkBoostPrimMinimumSpanningTree_h 00050 00051 #include "vtkInfovisBoostGraphAlgorithmsModule.h" // For export macro 00052 #include "vtkStdString.h" // For string type 00053 #include "vtkVariant.h" // For variant type 00054 00055 #include "vtkTreeAlgorithm.h" 00056 00057 class VTKINFOVISBOOSTGRAPHALGORITHMS_EXPORT vtkBoostPrimMinimumSpanningTree : public vtkTreeAlgorithm 00058 { 00059 public: 00060 static vtkBoostPrimMinimumSpanningTree *New(); 00061 vtkTypeMacro(vtkBoostPrimMinimumSpanningTree, vtkTreeAlgorithm); 00062 void PrintSelf(ostream& os, vtkIndent indent); 00063 00065 00069 vtkSetStringMacro(EdgeWeightArrayName); 00071 00074 void SetOriginVertex(vtkIdType index); 00075 00080 void SetOriginVertex(vtkStdString arrayName, vtkVariant value); 00081 00083 00085 vtkSetMacro(CreateGraphVertexIdArray, bool); 00086 vtkGetMacro(CreateGraphVertexIdArray, bool); 00087 vtkBooleanMacro(CreateGraphVertexIdArray, bool); 00089 00091 00095 void SetNegateEdgeWeights(bool value); 00096 vtkGetMacro(NegateEdgeWeights, bool); 00097 vtkBooleanMacro(NegateEdgeWeights, bool); 00099 00100 protected: 00101 vtkBoostPrimMinimumSpanningTree(); 00102 ~vtkBoostPrimMinimumSpanningTree(); 00103 00104 int RequestData( 00105 vtkInformation *, 00106 vtkInformationVector **, 00107 vtkInformationVector *); 00108 00109 int FillInputPortInformation( 00110 int port, vtkInformation* info); 00111 00112 private: 00113 char* EdgeWeightArrayName; 00114 vtkIdType OriginVertexIndex; 00115 vtkVariant OriginValue; 00116 bool CreateGraphVertexIdArray; 00117 bool ArrayNameSet; 00118 char* ArrayName; 00119 bool NegateEdgeWeights; 00120 float EdgeWeightMultiplier; 00121 00123 00124 vtkSetStringMacro(ArrayName); 00126 00128 00130 vtkIdType GetVertexIndex( 00131 vtkAbstractArray *abstract,vtkVariant value); 00133 00134 vtkBoostPrimMinimumSpanningTree(const vtkBoostPrimMinimumSpanningTree&); // Not implemented. 00135 void operator=(const vtkBoostPrimMinimumSpanningTree&); // Not implemented. 00136 }; 00137 00138 #endif