00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00063 #ifndef __vtkLabelHierarchy_h
00064 #define __vtkLabelHierarchy_h
00065
00066 #include "vtkPointSet.h"
00067
00068 class vtkCamera;
00069 class vtkCoincidentPoints;
00070 class vtkDataArray;
00071 class vtkLabelHierarchyIterator;
00072 class vtkPoints;
00073 class vtkPolyData;
00074 class vtkRenderer;
00075
00076 class VTK_RENDERING_EXPORT vtkLabelHierarchy : public vtkPointSet
00077 {
00078 public:
00079 static vtkLabelHierarchy* New();
00080 vtkTypeRevisionMacro(vtkLabelHierarchy,vtkPointSet);
00081 virtual void PrintSelf( ostream& os, vtkIndent indent );
00082
00085 virtual void SetPoints( vtkPoints* );
00086
00088 virtual void ComputeHierarchy();
00089
00091
00093 vtkSetMacro(TargetLabelCount,int);
00094 vtkGetMacro(TargetLabelCount,int);
00096
00098
00099 vtkSetMacro(MaximumDepth,int);
00100 vtkGetMacro(MaximumDepth,int);
00102
00103
00105
00106 enum IteratorType {
00107 FULL_SORT,
00108 QUEUE,
00109 DEPTH_FIRST,
00110 FRUSTUM
00111 };
00112
00114
00116
00117 virtual void SetPriorities(vtkDataArray* arr);
00118 vtkGetObjectMacro(Priorities,vtkDataArray);
00120
00121
00123
00132 vtkLabelHierarchyIterator* NewIterator(
00133 int type, vtkRenderer* ren, vtkCamera* cam, double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2] );
00134
00136
00146 void GetDiscreteNodeCoordinatesFromWorldPoint( int ijk[3], double pt[3], int level );
00147
00156 static bool GetPathForNodalCoordinates( int* path, int ijk[3], int level );
00157
00159
00160 virtual vtkIdType GetNumberOfCells();
00161 virtual vtkCell* GetCell(vtkIdType);
00162 virtual void GetCell(vtkIdType, vtkGenericCell*);
00163 virtual int GetCellType(vtkIdType);
00164 virtual void GetCellPoints(vtkIdType, vtkIdList*);
00165 virtual void GetPointCells(vtkIdType, vtkIdList*);
00166 virtual vtkIdType FindCell(double*, vtkCell*, vtkIdType, double, int&, double*, double*);
00167 virtual vtkIdType FindCell(double*, vtkCell*, vtkGenericCell*, vtkIdType, double, int&, double*, double*);
00168 virtual int GetMaxCellSize();
00170
00171
00172 class Implementation;
00173 Implementation* GetImplementation() { return this->Impl; }
00174
00175
00177
00178 vtkGetObjectMacro(CenterPts,vtkPoints);
00180
00182
00185 vtkGetObjectMacro(CoincidentPoints,vtkCoincidentPoints);
00187
00188 protected:
00189 vtkLabelHierarchy();
00190 virtual ~vtkLabelHierarchy();
00191
00192 int TargetLabelCount;
00193 int MaximumDepth;
00194 vtkDataArray* Priorities;
00195 vtkCoincidentPoints* CoincidentPoints;
00196 vtkPoints* CenterPts;
00197
00198
00199 Implementation* Impl;
00200
00201 friend class vtkLabelHierarchyFrustumIterator;
00202 friend class vtkLabelHierarchyFullSortIterator;
00203 friend class implementation;
00204
00205
00206 private:
00207 vtkLabelHierarchy( const vtkLabelHierarchy& );
00208 void operator = ( const vtkLabelHierarchy& );
00209 };
00210
00211 #endif // __vtkLabelHierarchy_h