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 vtkAbstractArray;
00069 class vtkCamera;
00070 class vtkCoincidentPoints;
00071 class vtkDataArray;
00072 class vtkIntArray;
00073 class vtkLabelHierarchyIterator;
00074 class vtkPoints;
00075 class vtkPolyData;
00076 class vtkRenderer;
00077 class vtkTextProperty;
00078
00079 class VTK_RENDERING_EXPORT vtkLabelHierarchy : public vtkPointSet
00080 {
00081 public:
00082 static vtkLabelHierarchy* New();
00083 vtkTypeMacro(vtkLabelHierarchy,vtkPointSet);
00084 virtual void PrintSelf( ostream& os, vtkIndent indent );
00085
00088 virtual void SetPoints( vtkPoints* );
00089
00091 virtual void ComputeHierarchy();
00092
00094
00096 vtkSetMacro(TargetLabelCount,int);
00097 vtkGetMacro(TargetLabelCount,int);
00099
00101
00102 vtkSetMacro(MaximumDepth,int);
00103 vtkGetMacro(MaximumDepth,int);
00105
00106
00108
00109 enum IteratorType {
00110 FULL_SORT,
00111 QUEUE,
00112 DEPTH_FIRST,
00113 FRUSTUM
00114 };
00115
00117
00119
00120 virtual void SetTextProperty(vtkTextProperty* tprop);
00121 vtkGetObjectMacro(TextProperty,vtkTextProperty);
00123
00125
00126 virtual void SetPriorities(vtkDataArray* arr);
00127 vtkGetObjectMacro(Priorities,vtkDataArray);
00129
00131
00132 virtual void SetLabels(vtkAbstractArray* arr);
00133 vtkGetObjectMacro(Labels,vtkAbstractArray);
00135
00137
00138 virtual void SetOrientations(vtkDataArray* arr);
00139 vtkGetObjectMacro(Orientations,vtkDataArray);
00141
00143
00144 virtual void SetIconIndices(vtkIntArray* arr);
00145 vtkGetObjectMacro(IconIndices,vtkIntArray);
00147
00149
00150 virtual void SetSizes(vtkDataArray* arr);
00151 vtkGetObjectMacro(Sizes,vtkDataArray);
00153
00155
00157 virtual void SetBoundedSizes(vtkDataArray* arr);
00158 vtkGetObjectMacro(BoundedSizes,vtkDataArray);
00160
00161
00163
00172 vtkLabelHierarchyIterator* NewIterator(
00173 int type, vtkRenderer* ren, vtkCamera* cam, double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2] );
00174
00176
00186 void GetDiscreteNodeCoordinatesFromWorldPoint( int ijk[3], double pt[3], int level );
00187
00196 static bool GetPathForNodalCoordinates( int* path, int ijk[3], int level );
00197
00199
00200 virtual vtkIdType GetNumberOfCells();
00201 virtual vtkCell* GetCell(vtkIdType);
00202 virtual void GetCell(vtkIdType, vtkGenericCell*);
00203 virtual int GetCellType(vtkIdType);
00204 virtual void GetCellPoints(vtkIdType, vtkIdList*);
00205 virtual void GetPointCells(vtkIdType, vtkIdList*);
00206 virtual vtkIdType FindCell(double*, vtkCell*, vtkIdType, double, int&, double*, double*);
00207 virtual vtkIdType FindCell(double*, vtkCell*, vtkGenericCell*, vtkIdType, double, int&, double*, double*);
00208 virtual int GetMaxCellSize();
00210
00211
00212 class Implementation;
00213 Implementation* GetImplementation() { return this->Impl; }
00214
00215
00217
00218 vtkGetObjectMacro(CenterPts,vtkPoints);
00220
00222
00225 vtkGetObjectMacro(CoincidentPoints,vtkCoincidentPoints);
00227
00228 protected:
00229 vtkLabelHierarchy();
00230 virtual ~vtkLabelHierarchy();
00231
00232 int TargetLabelCount;
00233 int MaximumDepth;
00234 vtkDataArray* Priorities;
00235 vtkAbstractArray* Labels;
00236 vtkDataArray* Orientations;
00237 vtkIntArray* IconIndices;
00238 vtkDataArray* Sizes;
00239 vtkDataArray* BoundedSizes;
00240 vtkCoincidentPoints* CoincidentPoints;
00241 vtkPoints* CenterPts;
00242 vtkTextProperty* TextProperty;
00243
00244
00245 Implementation* Impl;
00246
00247 friend class vtkLabelHierarchyFrustumIterator;
00248 friend class vtkLabelHierarchyFullSortIterator;
00249 friend class implementation;
00250
00251
00252 private:
00253 vtkLabelHierarchy( const vtkLabelHierarchy& );
00254 void operator = ( const vtkLabelHierarchy& );
00255 };
00256
00257 #endif // __vtkLabelHierarchy_h