VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkLabelHierarchy.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 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 //BTX 00105 00106 enum IteratorType { 00107 FULL_SORT, 00108 QUEUE, 00109 DEPTH_FIRST, 00110 FRUSTUM 00111 }; 00112 //ETX 00114 00116 00117 virtual void SetPriorities(vtkDataArray* arr); 00118 vtkGetObjectMacro(Priorities,vtkDataArray); 00120 00121 //BTX 00123 00132 vtkLabelHierarchyIterator* NewIterator( 00133 int type, vtkRenderer* ren, vtkCamera* cam, double frustumPlanes[24], bool positionsAsNormals, float bucketSize[2] ); 00134 //ETX 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 //BTX 00172 class Implementation; 00173 Implementation* GetImplementation() { return this->Impl; } 00174 //ETX 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 //BTX 00199 Implementation* Impl; 00200 00201 friend class vtkLabelHierarchyFrustumIterator; 00202 friend class vtkLabelHierarchyFullSortIterator; 00203 friend class implementation; 00204 //ETX 00205 00206 private: 00207 vtkLabelHierarchy( const vtkLabelHierarchy& ); // Not implemented. 00208 void operator = ( const vtkLabelHierarchy& ); // Not implemented. 00209 }; 00210 00211 #endif // __vtkLabelHierarchy_h