VTK
dox/Rendering/vtkLabelHierarchyIterator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkLabelHierarchyIterator.h
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 -------------------------------------------------------------------------*/
00027 #ifndef __vtkLabelHierarchyIterator_h
00028 #define __vtkLabelHierarchyIterator_h
00029 
00030 #include "vtkObject.h"
00031 #include "vtkStdString.h" // for std string
00032 #include "vtkUnicodeString.h" // for unicode string
00033 
00034 class vtkIdTypeArray;
00035 class vtkLabelHierarchy;
00036 class vtkPolyData;
00037 
00038 class VTK_RENDERING_EXPORT vtkLabelHierarchyIterator : public vtkObject
00039 {
00040 public:
00041   vtkTypeMacro(vtkLabelHierarchyIterator,vtkObject);
00042   virtual void PrintSelf( ostream& os, vtkIndent indent );
00043 
00048   virtual void Begin( vtkIdTypeArray* ) { }
00049 
00051   virtual void Next() { }
00052 
00054   virtual bool IsAtEnd() { return true; }
00055 
00057   virtual void GetPoint( double x[3] );
00058 
00060   virtual void GetSize( double sz[2] );
00061 
00063   virtual void GetBoundedSize( double sz[2] );
00064 
00066   virtual int GetType();
00067 
00069   virtual vtkStdString GetLabel();
00070 
00072   virtual vtkUnicodeString GetUnicodeLabel();
00073 
00075   virtual double GetOrientation();
00076 
00078   virtual vtkIdType GetLabelId() { return -1; }
00079 
00081 
00082   vtkGetObjectMacro(Hierarchy, vtkLabelHierarchy);
00084 
00087   virtual void SetTraversedBounds( vtkPolyData* );
00088 
00092   virtual void GetNodeGeometry( double ctr[3], double& size ) = 0;
00093 
00097   virtual void BoxNode();
00098 
00103   virtual void BoxAllNodes( vtkPolyData* );
00104 
00106 
00109   vtkSetMacro(AllBounds,int);
00110   vtkGetMacro(AllBounds,int);
00112 
00113 protected:
00114   vtkLabelHierarchyIterator();
00115   virtual ~vtkLabelHierarchyIterator();
00116 
00117   void BoxNodeInternal3( const double* ctr, double sz );
00118   void BoxNodeInternal2( const double* ctr, double sz );
00119 
00121   virtual void SetHierarchy( vtkLabelHierarchy* h );
00122 
00123   vtkLabelHierarchy* Hierarchy;
00124   vtkPolyData* TraversedBounds;
00125   double BoundsFactor;
00126   int AllBounds;
00127   int AllBoundsRecorded;
00128 
00129 private:
00130   vtkLabelHierarchyIterator( const vtkLabelHierarchyIterator& ); // Not implemented.
00131   void operator = ( const vtkLabelHierarchyIterator& ); // Not implemented.
00132 };
00133 
00134 #endif // __vtkLabelHierarchyIterator_h