VTK
dox/Infovis/Core/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 "vtkInfovisCoreModule.h" // For export macro
00043 #include "vtkSelectionAlgorithm.h"
00044 
00045 class vtkGraph;
00046 class vtkIdTypeArray;
00047 
00048 class VTKINFOVISCORE_EXPORT vtkExpandSelectedGraph : public vtkSelectionAlgorithm
00049 {
00050 public:
00051   static vtkExpandSelectedGraph* New();
00052   vtkTypeMacro(vtkExpandSelectedGraph,vtkSelectionAlgorithm);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00056   void SetGraphConnection(vtkAlgorithmOutput* in);
00057 
00059   int FillInputPortInformation(int port, vtkInformation* info);
00060 
00062 
00064   vtkSetMacro(BFSDistance, int);
00065   vtkGetMacro(BFSDistance, int);
00067 
00069 
00073   vtkSetMacro(IncludeShortestPaths, bool);
00074   vtkGetMacro(IncludeShortestPaths, bool);
00075   vtkBooleanMacro(IncludeShortestPaths, bool);
00077 
00079 
00080   vtkSetStringMacro(Domain);
00081   vtkGetStringMacro(Domain);
00083 
00085 
00087   vtkSetMacro(UseDomain, bool);
00088   vtkGetMacro(UseDomain, bool);
00089   vtkBooleanMacro(UseDomain, bool);
00091 
00092 protected:
00093   vtkExpandSelectedGraph();
00094   ~vtkExpandSelectedGraph();
00095 
00096   int RequestData(
00097     vtkInformation*,
00098     vtkInformationVector**,
00099     vtkInformationVector*);
00100 
00101   void Expand(vtkIdTypeArray*,vtkGraph*);
00102 
00103   int BFSDistance;
00104   bool IncludeShortestPaths;
00105   char* Domain;
00106   bool UseDomain;
00107 
00108 private:
00109   vtkExpandSelectedGraph(const vtkExpandSelectedGraph&); // Not implemented
00110   void operator=(const vtkExpandSelectedGraph&);   // Not implemented
00111 
00112   void BFSExpandSelection(vtkIdTypeArray *selection,
00113                           vtkGraph *graph);
00114 };
00115 
00116 #endif
00117