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
00074 void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
00075
00080 void SetOriginVertexString(char* arrayName, char* value);
00081
00083
00085 vtkSetStringMacro(OutputArrayName);
00087
00089
00093 vtkSetMacro(OriginFromSelection, bool);
00094 vtkGetMacro(OriginFromSelection, bool);
00095 vtkBooleanMacro(OriginFromSelection, bool);
00097
00099
00102 vtkGetMacro(OutputSelection, bool);
00103 vtkSetMacro(OutputSelection, bool);
00104 vtkBooleanMacro(OutputSelection, bool);
00106
00108
00111 vtkSetStringMacro(OutputSelectionType);
00113
00114 protected:
00115 vtkPBGLBreadthFirstSearch();
00116 ~vtkPBGLBreadthFirstSearch();
00117
00118 virtual int RequestData(
00119 vtkInformation *,
00120 vtkInformationVector **,
00121 vtkInformationVector *);
00122
00123 virtual int FillInputPortInformation(
00124 int port, vtkInformation* info);
00125
00126 virtual int FillOutputPortInformation(
00127 int port, vtkInformation* info);
00128
00129 private:
00130
00131 vtkIdType OriginVertexIndex;
00132 char* InputArrayName;
00133 char* OutputArrayName;
00134 vtkVariant OriginValue;
00135 bool OutputSelection;
00136 bool OriginFromSelection;
00137 char* OutputSelectionType;
00138
00140
00141 vtkSetStringMacro(InputArrayName);
00143
00145
00147 vtkIdType GetVertexIndex(
00148 vtkAbstractArray *abstract,vtkVariant value);
00150
00151 vtkPBGLBreadthFirstSearch(const vtkPBGLBreadthFirstSearch&);
00152 void operator=(const vtkPBGLBreadthFirstSearch&);
00153 };
00154
00155 #endif