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 
00036 #ifndef __vtkExpandSelectedGraph_h
00037 #define __vtkExpandSelectedGraph_h
00038 
00039 #include "vtkSelectionAlgorithm.h"
00040 
00041 class vtkGraph;
00042 class vtkIdTypeArray;
00043 
00044 class VTK_INFOVIS_EXPORT vtkExpandSelectedGraph : public vtkSelectionAlgorithm
00045 {
00046 public:
00047   static vtkExpandSelectedGraph* New();
00048   vtkTypeMacro(vtkExpandSelectedGraph,vtkSelectionAlgorithm);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00052   void SetGraphConnection(vtkAlgorithmOutput* in);
00053   
00055   int FillInputPortInformation(int port, vtkInformation* info);
00056   
00058 
00060   vtkSetMacro(BFSDistance, int);
00061   vtkGetMacro(BFSDistance, int);
00063   
00065 
00069   vtkSetMacro(IncludeShortestPaths, bool);
00070   vtkGetMacro(IncludeShortestPaths, bool);
00071   vtkBooleanMacro(IncludeShortestPaths, bool);
00073 
00075 
00076   vtkSetStringMacro(Domain);
00077   vtkGetStringMacro(Domain);
00079   
00081 
00083   vtkSetMacro(UseDomain, bool);
00084   vtkGetMacro(UseDomain, bool);
00085   vtkBooleanMacro(UseDomain, bool);
00087 
00088 protected:
00089   vtkExpandSelectedGraph();
00090   ~vtkExpandSelectedGraph();
00091 
00092   int RequestData(
00093     vtkInformation*, 
00094     vtkInformationVector**, 
00095     vtkInformationVector*);
00096 
00097   void Expand(vtkIdTypeArray*,vtkGraph*);
00098     
00099   int BFSDistance;
00100   bool IncludeShortestPaths;
00101   char* Domain;
00102   bool UseDomain;
00103 
00104 private:
00105   vtkExpandSelectedGraph(const vtkExpandSelectedGraph&); // Not implemented
00106   void operator=(const vtkExpandSelectedGraph&);   // Not implemented
00107   
00108   void BFSExpandSelection(vtkIdTypeArray *selection, 
00109                           vtkGraph *graph);
00110 };
00111 
00112 #endif
00113