VTK
vtkPBGLBreadthFirstSearch.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPBGLBreadthFirstSearch.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 -------------------------------------------------------------------------*/
40 #ifndef __vtkPBGLBreadthFirstSearch_h
41 #define __vtkPBGLBreadthFirstSearch_h
42 
43 #include "vtkStdString.h" // For string type
44 #include "vtkVariant.h" // For variant type
45 
46 #include "vtkGraphAlgorithm.h"
47 
48 class vtkSelection;
49 
51 {
52 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
59  void SetOriginSelection(vtkSelection *s);
61  {
62  this->SetInputConnection(1, algOutput);
63  }
65 
68  void SetOriginVertex(vtkIdType index);
69 
74  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
75 
80  void SetOriginVertexString(char* arrayName, char* value);
81 
83 
85  vtkSetStringMacro(OutputArrayName);
87 
89 
93  vtkSetMacro(OriginFromSelection, bool);
94  vtkGetMacro(OriginFromSelection, bool);
95  vtkBooleanMacro(OriginFromSelection, bool);
97 
99 
102  vtkGetMacro(OutputSelection, bool);
103  vtkSetMacro(OutputSelection, bool);
104  vtkBooleanMacro(OutputSelection, bool);
106 
108 
111  vtkSetStringMacro(OutputSelectionType);
113 
114 protected:
117 
118  virtual int RequestData(
119  vtkInformation *,
122 
123  virtual int FillInputPortInformation(
124  int port, vtkInformation* info);
125 
126  virtual int FillOutputPortInformation(
127  int port, vtkInformation* info);
128 
129 private:
130 
131  vtkIdType OriginVertexIndex;
132  char* InputArrayName;
133  char* OutputArrayName;
134  vtkVariant OriginValue;
135  bool OutputSelection;
136  bool OriginFromSelection;
137  char* OutputSelectionType;
138 
140 
141  vtkSetStringMacro(InputArrayName);
143 
145 
147  vtkIdType GetVertexIndex(
148  vtkAbstractArray *abstract,vtkVariant value);
150 
151  vtkPBGLBreadthFirstSearch(const vtkPBGLBreadthFirstSearch&); // Not implemented.
152  void operator=(const vtkPBGLBreadthFirstSearch&); // Not implemented.
153 };
154 
155 #endif