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 -------------------------------------------------------------------------*/
41 #ifndef vtkPBGLBreadthFirstSearch_h
42 #define vtkPBGLBreadthFirstSearch_h
43 
44 #include "vtkInfovisParallelModule.h" // For export macro
45 #include "vtkStdString.h" // For string type
46 #include "vtkVariant.h" // For variant type
47 
48 #include "vtkGraphAlgorithm.h"
49 
50 class vtkSelection;
51 
52 #if !defined(VTK_LEGACY_REMOVE)
53 class VTKINFOVISPARALLEL_EXPORT vtkPBGLBreadthFirstSearch : public vtkGraphAlgorithm
54 {
55 public:
58  void PrintSelf(ostream& os, vtkIndent indent);
59 
61 
62  void SetOriginSelection(vtkSelection *s);
64  {
65  this->SetInputConnection(1, algOutput);
66  }
68 
71  void SetOriginVertex(vtkIdType index);
72 
77  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
78 
83  void SetOriginVertexString(char* arrayName, char* value);
84 
86 
88  vtkSetStringMacro(OutputArrayName);
90 
92 
96  vtkSetMacro(OriginFromSelection, bool);
97  vtkGetMacro(OriginFromSelection, bool);
98  vtkBooleanMacro(OriginFromSelection, bool);
100 
102 
105  vtkGetMacro(OutputSelection, bool);
106  vtkSetMacro(OutputSelection, bool);
107  vtkBooleanMacro(OutputSelection, bool);
109 
111 
114  vtkSetStringMacro(OutputSelectionType);
116 
117 protected:
120 
121  virtual int RequestData(
122  vtkInformation *,
125 
126  virtual int FillInputPortInformation(
127  int port, vtkInformation* info);
128 
129  virtual int FillOutputPortInformation(
130  int port, vtkInformation* info);
131 
132 private:
133 
134  vtkIdType OriginVertexIndex;
135  char* InputArrayName;
136  char* OutputArrayName;
137  vtkVariant OriginValue;
138  bool OutputSelection;
139  bool OriginFromSelection;
140  char* OutputSelectionType;
141 
143 
144  vtkSetStringMacro(InputArrayName);
146 
148 
150  vtkIdType GetVertexIndex(
151  vtkAbstractArray *abstract,vtkVariant value);
153 
154  vtkPBGLBreadthFirstSearch(const vtkPBGLBreadthFirstSearch&); // Not implemented.
155  void operator=(const vtkPBGLBreadthFirstSearch&); // Not implemented.
156 };
157 
158 #endif //VTK_LEGACY_REMOVE
159 #endif
static vtkGraphAlgorithm * New()
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:44
int vtkIdType
Definition: vtkType.h:275
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Superclass for algorithms that produce only graph as output.
A atomic type representing the union of many types.
Definition: vtkVariant.h:78
Proxy object to connect input/output ports.
a simple class to control print indentation
Definition: vtkIndent.h:38
void PrintSelf(ostream &os, vtkIndent indent)
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Breadth-first search on a distributed vtkGraph.