VTK
dox/Infovis/vtkBoostPrimMinimumSpanningTree.h
Go to the documentation of this file.
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 "vtkStdString.h" // For string type
00052 #include "vtkVariant.h" // For variant type
00053 
00054 #include "vtkTreeAlgorithm.h"
00055 
00056 class VTK_INFOVIS_EXPORT vtkBoostPrimMinimumSpanningTree : public vtkTreeAlgorithm 
00057 {
00058 public:
00059   static vtkBoostPrimMinimumSpanningTree *New();
00060   vtkTypeMacro(vtkBoostPrimMinimumSpanningTree, vtkTreeAlgorithm);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062   
00064 
00068   vtkSetStringMacro(EdgeWeightArrayName);
00070   
00073   void SetOriginVertex(vtkIdType index);
00074 
00079   void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
00080   
00082 
00084   vtkSetMacro(CreateGraphVertexIdArray, bool);
00085   vtkGetMacro(CreateGraphVertexIdArray, bool);
00086   vtkBooleanMacro(CreateGraphVertexIdArray, bool);
00088   
00090 
00094   void SetNegateEdgeWeights(bool value);
00095   vtkGetMacro(NegateEdgeWeights, bool);
00096   vtkBooleanMacro(NegateEdgeWeights, bool);
00098   
00099 protected:
00100   vtkBoostPrimMinimumSpanningTree();
00101   ~vtkBoostPrimMinimumSpanningTree();
00102   
00103   int RequestData(
00104     vtkInformation *,
00105     vtkInformationVector **,
00106     vtkInformationVector *);
00107   
00108   int FillInputPortInformation(
00109     int port, vtkInformation* info);
00110   
00111 private:
00112   char* EdgeWeightArrayName;
00113   vtkIdType OriginVertexIndex;
00114   vtkVariant OriginValue;
00115   bool CreateGraphVertexIdArray;
00116   bool ArrayNameSet;
00117   char* ArrayName;
00118   bool NegateEdgeWeights;
00119   float EdgeWeightMultiplier;
00120   
00122 
00123   vtkSetStringMacro(ArrayName);
00125   
00127 
00129   vtkIdType GetVertexIndex(
00130     vtkAbstractArray *abstract,vtkVariant value);
00132   
00133   vtkBoostPrimMinimumSpanningTree(const vtkBoostPrimMinimumSpanningTree&);  // Not implemented.
00134   void operator=(const vtkBoostPrimMinimumSpanningTree&);  // Not implemented.
00135 };
00136 
00137 #endif