VTK
dox/Infovis/vtkExpandSelectedGraph.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkExpandSelectedGraph.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 -------------------------------------------------------------------------*/
00020 
00039 #ifndef __vtkExpandSelectedGraph_h
00040 #define __vtkExpandSelectedGraph_h
00041 
00042 #include "vtkSelectionAlgorithm.h"
00043 
00044 class vtkGraph;
00045 class vtkIdTypeArray;
00046 
00047 class VTK_INFOVIS_EXPORT vtkExpandSelectedGraph : public vtkSelectionAlgorithm
00048 {
00049 public:
00050   static vtkExpandSelectedGraph* New();
00051   vtkTypeMacro(vtkExpandSelectedGraph,vtkSelectionAlgorithm);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00055   void SetGraphConnection(vtkAlgorithmOutput* in);
00056   
00058   int FillInputPortInformation(int port, vtkInformation* info);
00059   
00061 
00063   vtkSetMacro(BFSDistance, int);
00064   vtkGetMacro(BFSDistance, int);
00066   
00068 
00072   vtkSetMacro(IncludeShortestPaths, bool);
00073   vtkGetMacro(IncludeShortestPaths, bool);
00074   vtkBooleanMacro(IncludeShortestPaths, bool);
00076 
00078 
00079   vtkSetStringMacro(Domain);
00080   vtkGetStringMacro(Domain);
00082   
00084 
00086   vtkSetMacro(UseDomain, bool);
00087   vtkGetMacro(UseDomain, bool);
00088   vtkBooleanMacro(UseDomain, bool);
00090 
00091 protected:
00092   vtkExpandSelectedGraph();
00093   ~vtkExpandSelectedGraph();
00094 
00095   int RequestData(
00096     vtkInformation*, 
00097     vtkInformationVector**, 
00098     vtkInformationVector*);
00099 
00100   void Expand(vtkIdTypeArray*,vtkGraph*);
00101     
00102   int BFSDistance;
00103   bool IncludeShortestPaths;
00104   char* Domain;
00105   bool UseDomain;
00106 
00107 private:
00108   vtkExpandSelectedGraph(const vtkExpandSelectedGraph&); // Not implemented
00109   void operator=(const vtkExpandSelectedGraph&);   // Not implemented
00110   
00111   void BFSExpandSelection(vtkIdTypeArray *selection, 
00112                           vtkGraph *graph);
00113 };
00114 
00115 #endif
00116