VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkExpandSelectedGraph.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExpandSelectedGraph.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
20 
39 #ifndef __vtkExpandSelectedGraph_h
40 #define __vtkExpandSelectedGraph_h
41 
42 #include "vtkInfovisCoreModule.h" // For export macro
43 #include "vtkSelectionAlgorithm.h"
44 
45 class vtkGraph;
46 class vtkIdTypeArray;
47 
48 class VTKINFOVISCORE_EXPORT vtkExpandSelectedGraph : public vtkSelectionAlgorithm
49 {
50 public:
51  static vtkExpandSelectedGraph* New();
52  vtkTypeMacro(vtkExpandSelectedGraph,vtkSelectionAlgorithm);
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
56  void SetGraphConnection(vtkAlgorithmOutput* in);
57 
59  int FillInputPortInformation(int port, vtkInformation* info);
60 
62 
64  vtkSetMacro(BFSDistance, int);
65  vtkGetMacro(BFSDistance, int);
67 
69 
73  vtkSetMacro(IncludeShortestPaths, bool);
74  vtkGetMacro(IncludeShortestPaths, bool);
75  vtkBooleanMacro(IncludeShortestPaths, bool);
77 
79 
80  vtkSetStringMacro(Domain);
81  vtkGetStringMacro(Domain);
83 
85 
87  vtkSetMacro(UseDomain, bool);
88  vtkGetMacro(UseDomain, bool);
89  vtkBooleanMacro(UseDomain, bool);
91 
92 protected:
95 
96  int RequestData(
97  vtkInformation*,
98  vtkInformationVector**,
99  vtkInformationVector*);
100 
101  void Expand(vtkIdTypeArray*,vtkGraph*);
102 
105  char* Domain;
106  bool UseDomain;
107 
108 private:
109  vtkExpandSelectedGraph(const vtkExpandSelectedGraph&); // Not implemented
110  void operator=(const vtkExpandSelectedGraph&); // Not implemented
111 
112  void BFSExpandSelection(vtkIdTypeArray *selection,
113  vtkGraph *graph);
114 };
115 
116 #endif
117 
expands a selection set of a vtkGraph