00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00038
#ifndef __vtkSimpleScalarTree_h
00039
#define __vtkSimpleScalarTree_h
00040
00041
#include "vtkScalarTree.h"
00042
00043
00044
class vtkFloatArray;
00045
class vtkScalarNode;
00046
00047
00048 class VTK_FILTERING_EXPORT vtkSimpleScalarTree :
public vtkScalarTree
00049 {
00050
public:
00053
static vtkSimpleScalarTree *
New();
00054
00056
00057 vtkTypeRevisionMacro(vtkSimpleScalarTree,
vtkScalarTree);
00058
void PrintSelf(ostream& os,
vtkIndent indent);
00060
00062
00066 vtkSetClampMacro(BranchingFactor,
int,2,VTK_LARGE_INTEGER);
00067 vtkGetMacro(BranchingFactor,
int);
00069
00071
00073 vtkGetMacro(Level,
int);
00075
00077
00078 vtkSetClampMacro(MaxLevel,
int,1,VTK_LARGE_INTEGER);
00079 vtkGetMacro(MaxLevel,
int);
00081
00085
virtual void BuildTree();
00086
00088
virtual void Initialize();
00089
00092
virtual void InitTraversal(
float scalarValue);
00093
00095
00099
virtual vtkCell *
GetNextCell(
vtkIdType &cellId,
vtkIdList* &ptIds,
00100
vtkDataArray *cellScalars);
00102
00103
protected:
00104 vtkSimpleScalarTree();
00105 ~vtkSimpleScalarTree();
00106
00107 vtkDataArray *Scalars;
00108 int MaxLevel;
00109 int Level;
00110 int BranchingFactor;
00111 vtkScalarNode *Tree;
00112 int TreeSize;
00113
00114
private:
00115
vtkIdType TreeIndex;
00116
vtkIdType LeafOffset;
00117
int ChildNumber;
00118
vtkIdType CellId;
00119
int FindStartLeaf(
vtkIdType index,
int level);
00120
int FindNextLeaf(
vtkIdType index,
int level);
00121
00122
private:
00123 vtkSimpleScalarTree(
const vtkSimpleScalarTree&);
00124
void operator=(
const vtkSimpleScalarTree&);
00125 };
00126
00127
#endif
00128
00129