00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00034 #ifndef __vtkSimpleScalarTree_h
00035 #define __vtkSimpleScalarTree_h
00036
00037 #include "vtkScalarTree.h"
00038
00039
00040 class vtkScalarNode;
00041
00042
00043 class VTK_FILTERING_EXPORT vtkSimpleScalarTree : public vtkScalarTree
00044 {
00045 public:
00048 static vtkSimpleScalarTree *New();
00049
00051
00052 vtkTypeMacro(vtkSimpleScalarTree,vtkScalarTree);
00053 void PrintSelf(ostream& os, vtkIndent indent);
00055
00057
00061 vtkSetClampMacro(BranchingFactor,int,2,VTK_LARGE_INTEGER);
00062 vtkGetMacro(BranchingFactor,int);
00064
00066
00068 vtkGetMacro(Level,int);
00070
00072
00073 vtkSetClampMacro(MaxLevel,int,1,VTK_LARGE_INTEGER);
00074 vtkGetMacro(MaxLevel,int);
00076
00080 virtual void BuildTree();
00081
00083 virtual void Initialize();
00084
00087 virtual void InitTraversal(double scalarValue);
00088
00090
00094 virtual vtkCell *GetNextCell(vtkIdType &cellId, vtkIdList* &ptIds,
00095 vtkDataArray *cellScalars);
00097
00098 protected:
00099 vtkSimpleScalarTree();
00100 ~vtkSimpleScalarTree();
00101
00102 vtkDataArray *Scalars;
00103 int MaxLevel;
00104 int Level;
00105 int BranchingFactor;
00106 vtkScalarNode *Tree;
00107 int TreeSize;
00108
00109 private:
00110 vtkIdType TreeIndex;
00111 vtkIdType LeafOffset;
00112 int ChildNumber;
00113 vtkIdType CellId;
00114 int FindStartLeaf(vtkIdType index, int level);
00115 int FindNextLeaf(vtkIdType index,int level);
00116
00117 private:
00118 vtkSimpleScalarTree(const vtkSimpleScalarTree&);
00119 void operator=(const vtkSimpleScalarTree&);
00120 };
00121
00122 #endif
00123
00124