VTK
dox/Infovis/vtkBoostBreadthFirstSearch.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkBoostBreadthFirstSearch.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 -------------------------------------------------------------------------*/
00039 #ifndef __vtkBoostBreadthFirstSearch_h
00040 #define __vtkBoostBreadthFirstSearch_h
00041 
00042 #include "vtkStdString.h" // For string type
00043 #include "vtkVariant.h" // For variant type
00044 
00045 #include "vtkGraphAlgorithm.h"
00046 
00047 class vtkSelection;
00048 
00049 class VTK_INFOVIS_EXPORT vtkBoostBreadthFirstSearch : public vtkGraphAlgorithm 
00050 {
00051 public:
00052   static vtkBoostBreadthFirstSearch *New();
00053   vtkTypeMacro(vtkBoostBreadthFirstSearch, vtkGraphAlgorithm);
00054   void PrintSelf(ostream& os, vtkIndent indent);
00055   
00057 
00058   void SetOriginSelection(vtkSelection *s);
00059   void SetOriginSelectionConnection(vtkAlgorithmOutput* algOutput)
00060   {
00061     this->SetInputConnection(1, algOutput);
00062   }
00064 
00067   void SetOriginVertex(vtkIdType index);
00068 
00069   //BTX
00070   
00072 
00076   void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
00077   //ETX
00079 
00084   void SetOriginVertexString(char* arrayName, char* value);
00085 
00087 
00089   vtkSetStringMacro(OutputArrayName);
00091 
00093 
00097   vtkSetMacro(OriginFromSelection, bool);
00098   vtkGetMacro(OriginFromSelection, bool);
00099   vtkBooleanMacro(OriginFromSelection, bool);
00101 
00103 
00106   vtkGetMacro(OutputSelection, bool);
00107   vtkSetMacro(OutputSelection, bool);
00108   vtkBooleanMacro(OutputSelection, bool);
00110   
00112 
00115   vtkSetStringMacro(OutputSelectionType);
00117 
00118 protected:
00119   vtkBoostBreadthFirstSearch();
00120   ~vtkBoostBreadthFirstSearch();
00121 
00122   virtual int RequestData(
00123     vtkInformation *, 
00124     vtkInformationVector **, 
00125     vtkInformationVector *);
00126 
00127   virtual int FillInputPortInformation(
00128     int port, vtkInformation* info);
00129 
00130   virtual int FillOutputPortInformation(
00131     int port, vtkInformation* info);
00132   
00133 private:
00134 
00135   vtkIdType OriginVertexIndex;
00136   char* InputArrayName;
00137   char* OutputArrayName;
00138   //BTX
00139   vtkVariant OriginValue;
00140   //ETX
00141   bool OutputSelection;
00142   bool OriginFromSelection;
00143   char* OutputSelectionType;
00144   
00146 
00147   vtkSetStringMacro(InputArrayName);
00149 
00150   //BTX
00151   
00153 
00155   vtkIdType GetVertexIndex(
00156     vtkAbstractArray *abstract,vtkVariant value);
00157   //ETX
00159 
00160   vtkBoostBreadthFirstSearch(const vtkBoostBreadthFirstSearch&);  // Not implemented.
00161   void operator=(const vtkBoostBreadthFirstSearch&);  // Not implemented.
00162 };
00163 
00164 #endif