VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "vtkInfovisParallelModule.h" // For export macro
44 #include "vtkStdString.h" // For string type
45 #include "vtkVariant.h" // For variant type
46 
47 #include "vtkGraphAlgorithm.h"
48 
49 class vtkSelection;
50 
51 class VTKINFOVISPARALLEL_EXPORT vtkPBGLBreadthFirstSearch : public vtkGraphAlgorithm
52 {
53 public:
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
59 
60  void SetOriginSelection(vtkSelection *s);
62  {
63  this->SetInputConnection(1, algOutput);
64  }
66 
69  void SetOriginVertex(vtkIdType index);
70 
75  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
76 
81  void SetOriginVertexString(char* arrayName, char* value);
82 
84 
86  vtkSetStringMacro(OutputArrayName);
88 
90 
94  vtkSetMacro(OriginFromSelection, bool);
95  vtkGetMacro(OriginFromSelection, bool);
96  vtkBooleanMacro(OriginFromSelection, bool);
98 
100 
103  vtkGetMacro(OutputSelection, bool);
104  vtkSetMacro(OutputSelection, bool);
105  vtkBooleanMacro(OutputSelection, bool);
107 
109 
112  vtkSetStringMacro(OutputSelectionType);
114 
115 protected:
118 
119  virtual int RequestData(
120  vtkInformation *,
123 
124  virtual int FillInputPortInformation(
125  int port, vtkInformation* info);
126 
127  virtual int FillOutputPortInformation(
128  int port, vtkInformation* info);
129 
130 private:
131 
132  vtkIdType OriginVertexIndex;
133  char* InputArrayName;
134  char* OutputArrayName;
135  vtkVariant OriginValue;
136  bool OutputSelection;
137  bool OriginFromSelection;
138  char* OutputSelectionType;
139 
141 
142  vtkSetStringMacro(InputArrayName);
144 
146 
148  vtkIdType GetVertexIndex(
149  vtkAbstractArray *abstract,vtkVariant value);
151 
152  vtkPBGLBreadthFirstSearch(const vtkPBGLBreadthFirstSearch&); // Not implemented.
153  void operator=(const vtkPBGLBreadthFirstSearch&); // Not implemented.
154 };
155 
156 #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:268
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.