00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00037 #ifndef __vtkPBGLBreadthFirstSearch_h
00038 #define __vtkPBGLBreadthFirstSearch_h
00039
00040 #include "vtkStdString.h"
00041 #include "vtkVariant.h"
00042
00043 #include "vtkGraphAlgorithm.h"
00044
00045 class vtkSelection;
00046
00047 class VTK_PARALLEL_EXPORT vtkPBGLBreadthFirstSearch : public vtkGraphAlgorithm
00048 {
00049 public:
00050 static vtkPBGLBreadthFirstSearch *New();
00051 vtkTypeRevisionMacro(vtkPBGLBreadthFirstSearch, vtkGraphAlgorithm);
00052 void PrintSelf(ostream& os, vtkIndent indent);
00053
00055
00056 void SetOriginSelection(vtkSelection *s);
00057 void SetOriginSelectionConnection(vtkAlgorithmOutput* algOutput)
00058 {
00059 this->SetInputConnection(1, algOutput);
00060 }
00062
00065 void SetOriginVertex(vtkIdType index);
00066
00067
00068
00070
00074 void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
00075
00077
00082 void SetOriginVertexString(char* arrayName, char* value);
00083
00085
00087 vtkSetStringMacro(OutputArrayName);
00089
00091
00095 vtkSetMacro(OriginFromSelection, bool);
00096 vtkGetMacro(OriginFromSelection, bool);
00097 vtkBooleanMacro(OriginFromSelection, bool);
00099
00101
00104 vtkGetMacro(OutputSelection, bool);
00105 vtkSetMacro(OutputSelection, bool);
00106 vtkBooleanMacro(OutputSelection, bool);
00108
00110
00113 vtkSetStringMacro(OutputSelectionType);
00115
00116 protected:
00117 vtkPBGLBreadthFirstSearch();
00118 ~vtkPBGLBreadthFirstSearch();
00119
00120 virtual int RequestData(
00121 vtkInformation *,
00122 vtkInformationVector **,
00123 vtkInformationVector *);
00124
00125 virtual int FillInputPortInformation(
00126 int port, vtkInformation* info);
00127
00128 virtual int FillOutputPortInformation(
00129 int port, vtkInformation* info);
00130
00131 private:
00132
00133 vtkIdType OriginVertexIndex;
00134 char* InputArrayName;
00135 char* OutputArrayName;
00136
00137 vtkVariant OriginValue;
00138
00139 bool OutputSelection;
00140 bool OriginFromSelection;
00141 char* OutputSelectionType;
00142
00144
00145 vtkSetStringMacro(InputArrayName);
00147
00148
00149
00151
00153 vtkIdType GetVertexIndex(
00154 vtkAbstractArray *abstract,vtkVariant value);
00155
00157
00158 vtkPBGLBreadthFirstSearch(const vtkPBGLBreadthFirstSearch&);
00159 void operator=(const vtkPBGLBreadthFirstSearch&);
00160 };
00161
00162 #endif