VTK
vtkBoostBreadthFirstSearch.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBoostBreadthFirstSearch.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 -------------------------------------------------------------------------*/
39 #ifndef __vtkBoostBreadthFirstSearch_h
40 #define __vtkBoostBreadthFirstSearch_h
41 
42 #include "vtkStdString.h" // For string type
43 #include "vtkVariant.h" // For variant type
44 
45 #include "vtkGraphAlgorithm.h"
46 
47 class vtkSelection;
48 
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
57 
58  void SetOriginSelection(vtkSelection *s);
60  {
61  this->SetInputConnection(1, algOutput);
62  }
64 
67  void SetOriginVertex(vtkIdType index);
68 
73  void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
74 
79  void SetOriginVertexString(char* arrayName, char* value);
80 
82 
84  vtkSetStringMacro(OutputArrayName);
86 
88 
92  vtkSetMacro(OriginFromSelection, bool);
93  vtkGetMacro(OriginFromSelection, bool);
94  vtkBooleanMacro(OriginFromSelection, bool);
96 
98 
101  vtkGetMacro(OutputSelection, bool);
102  vtkSetMacro(OutputSelection, bool);
103  vtkBooleanMacro(OutputSelection, bool);
105 
107 
110  vtkSetStringMacro(OutputSelectionType);
112 
113 protected:
116 
117  virtual int RequestData(
118  vtkInformation *,
121 
122  virtual int FillInputPortInformation(
123  int port, vtkInformation* info);
124 
125  virtual int FillOutputPortInformation(
126  int port, vtkInformation* info);
127 
128 private:
129 
130  vtkIdType OriginVertexIndex;
131  char* InputArrayName;
132  char* OutputArrayName;
133  vtkVariant OriginValue;
134  bool OutputSelection;
135  bool OriginFromSelection;
136  char* OutputSelectionType;
137 
139 
140  vtkSetStringMacro(InputArrayName);
142 
144 
146  vtkIdType GetVertexIndex(
147  vtkAbstractArray *abstract,vtkVariant value);
149 
150  vtkBoostBreadthFirstSearch(const vtkBoostBreadthFirstSearch&); // Not implemented.
151  void operator=(const vtkBoostBreadthFirstSearch&); // Not implemented.
152 };
153 
154 #endif
static vtkGraphAlgorithm * New()
Wrapper around vtkstd::string to keep symbols short.
Definition: vtkStdString.h:45
Boost breadth_first_search on a vtkGraph.
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:43
int vtkIdType
Definition: vtkType.h:255
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:72
Proxy object to connect input/output ports.
void SetOriginSelectionConnection(vtkAlgorithmOutput *algOutput)
a simple class to control print indentation
Definition: vtkIndent.h:37
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
#define VTK_INFOVIS_EXPORT
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
virtual int FillInputPortInformation(int port, vtkInformation *info)