00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00040 #ifndef __vtkPBGLBreadthFirstSearch_h
00041 #define __vtkPBGLBreadthFirstSearch_h
00042
00043 #include "vtkStdString.h"
00044 #include "vtkVariant.h"
00045
00046 #include "vtkGraphAlgorithm.h"
00047
00048 class vtkSelection;
00049
00050 class VTK_PARALLEL_EXPORT vtkPBGLBreadthFirstSearch : public vtkGraphAlgorithm
00051 {
00052 public:
00053 static vtkPBGLBreadthFirstSearch *New();
00054 vtkTypeMacro(vtkPBGLBreadthFirstSearch, vtkGraphAlgorithm);
00055 void PrintSelf(ostream& os, vtkIndent indent);
00056
00058
00059 void SetOriginSelection(vtkSelection *s);
00060 void SetOriginSelectionConnection(vtkAlgorithmOutput* algOutput)
00061 {
00062 this->SetInputConnection(1, algOutput);
00063 }
00065
00068 void SetOriginVertex(vtkIdType index);
00069
00070
00071
00073
00077 void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
00078
00080
00085 void SetOriginVertexString(char* arrayName, char* value);
00086
00088
00090 vtkSetStringMacro(OutputArrayName);
00092
00094
00098 vtkSetMacro(OriginFromSelection, bool);
00099 vtkGetMacro(OriginFromSelection, bool);
00100 vtkBooleanMacro(OriginFromSelection, bool);
00102
00104
00107 vtkGetMacro(OutputSelection, bool);
00108 vtkSetMacro(OutputSelection, bool);
00109 vtkBooleanMacro(OutputSelection, bool);
00111
00113
00116 vtkSetStringMacro(OutputSelectionType);
00118
00119 protected:
00120 vtkPBGLBreadthFirstSearch();
00121 ~vtkPBGLBreadthFirstSearch();
00122
00123 virtual int RequestData(
00124 vtkInformation *,
00125 vtkInformationVector **,
00126 vtkInformationVector *);
00127
00128 virtual int FillInputPortInformation(
00129 int port, vtkInformation* info);
00130
00131 virtual int FillOutputPortInformation(
00132 int port, vtkInformation* info);
00133
00134 private:
00135
00136 vtkIdType OriginVertexIndex;
00137 char* InputArrayName;
00138 char* OutputArrayName;
00139
00140 vtkVariant OriginValue;
00141
00142 bool OutputSelection;
00143 bool OriginFromSelection;
00144 char* OutputSelectionType;
00145
00147
00148 vtkSetStringMacro(InputArrayName);
00150
00151
00152
00154
00156 vtkIdType GetVertexIndex(
00157 vtkAbstractArray *abstract,vtkVariant value);
00158
00160
00161 vtkPBGLBreadthFirstSearch(const vtkPBGLBreadthFirstSearch&);
00162 void operator=(const vtkPBGLBreadthFirstSearch&);
00163 };
00164
00165 #endif