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 
00073   void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
00074 
00079   void SetOriginVertexString(char* arrayName, char* value);
00080 
00082 
00084   vtkSetStringMacro(OutputArrayName);
00086 
00088 
00092   vtkSetMacro(OriginFromSelection, bool);
00093   vtkGetMacro(OriginFromSelection, bool);
00094   vtkBooleanMacro(OriginFromSelection, bool);
00096 
00098 
00101   vtkGetMacro(OutputSelection, bool);
00102   vtkSetMacro(OutputSelection, bool);
00103   vtkBooleanMacro(OutputSelection, bool);
00105   
00107 
00110   vtkSetStringMacro(OutputSelectionType);
00112 
00113 protected:
00114   vtkBoostBreadthFirstSearch();
00115   ~vtkBoostBreadthFirstSearch();
00116 
00117   virtual int RequestData(
00118     vtkInformation *, 
00119     vtkInformationVector **, 
00120     vtkInformationVector *);
00121 
00122   virtual int FillInputPortInformation(
00123     int port, vtkInformation* info);
00124 
00125   virtual int FillOutputPortInformation(
00126     int port, vtkInformation* info);
00127   
00128 private:
00129 
00130   vtkIdType OriginVertexIndex;
00131   char* InputArrayName;
00132   char* OutputArrayName;
00133   vtkVariant OriginValue;
00134   bool OutputSelection;
00135   bool OriginFromSelection;
00136   char* OutputSelectionType;
00137   
00139 
00140   vtkSetStringMacro(InputArrayName);
00142 
00144 
00146   vtkIdType GetVertexIndex(
00147     vtkAbstractArray *abstract,vtkVariant value);
00149 
00150   vtkBoostBreadthFirstSearch(const vtkBoostBreadthFirstSearch&);  // Not implemented.
00151   void operator=(const vtkBoostBreadthFirstSearch&);  // Not implemented.
00152 };
00153 
00154 #endif