• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Rendering/vtkLabelPlacer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLabelPlacer.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 -------------------------------------------------------------------------*/
00041 #ifndef __vtkLabelPlacer_h
00042 #define __vtkLabelPlacer_h
00043 
00044 #include "vtkPolyDataAlgorithm.h"
00045 
00046 class vtkRenderer;
00047 class vtkCoordinate;
00048 
00049 class VTK_RENDERING_EXPORT vtkLabelPlacer : public vtkPolyDataAlgorithm
00050 {
00051 public:
00052   static vtkLabelPlacer* New();
00053   vtkTypeRevisionMacro(vtkLabelPlacer,vtkPolyDataAlgorithm);
00054   virtual void PrintSelf( ostream& os, vtkIndent indent );
00055 
00056   vtkGetObjectMacro(Renderer,vtkRenderer);
00057   virtual void SetRenderer( vtkRenderer* );
00058 
00059   vtkGetObjectMacro(AnchorTransform,vtkCoordinate);
00060 
00061   //BTX
00063   enum LabelGravity
00064     {
00065     VerticalBottomBit   = 1,
00066     VerticalBaselineBit = 2,
00067     VerticalCenterBit   = 4,
00068     VerticalTopBit      = 8,
00069     HorizontalLeftBit   = 16,
00070     HorizontalCenterBit = 32,
00071     HorizontalRightBit  = 64,
00072     VerticalBitMask     = 15,
00073     HorizontalBitMask   = 112,
00074 
00075     LowerLeft=17,      
00076     LowerCenter=33,    
00077     LowerRight=65,     
00078 
00079     BaselineLeft=18,   
00080     BaselineCenter=34, 
00081     BaselineRight=66,  
00082 
00083     CenterLeft=20,     
00084     CenterCenter=36,   
00085     CenterRight=68,    
00086 
00087     UpperLeft=24,      
00088     UpperCenter=40,    
00089     UpperRight=72      
00090     };
00091 
00093   enum OutputCoordinates
00094     {
00095     WORLD=0,           
00096     DISPLAY=1          
00097     };
00098   //ETX
00099 
00100   virtual void SetGravity( int gravity );
00101   vtkGetMacro(Gravity,int);
00102 
00103   vtkSetClampMacro(MaximumLabelFraction,double,0.,1.);
00104   vtkGetMacro(MaximumLabelFraction,double);
00105 
00107 
00109   vtkSetMacro(IteratorType,int);
00110   vtkGetMacro(IteratorType,int);
00112 
00113   virtual unsigned long GetMTime();
00114 
00116 
00120   vtkGetMacro(PositionsAsNormals,bool);
00121   vtkSetMacro(PositionsAsNormals,bool);
00122   vtkBooleanMacro(PositionsAsNormals,bool);
00124 
00126 
00128   vtkGetMacro(GeneratePerturbedLabelSpokes,bool);
00129   vtkSetMacro(GeneratePerturbedLabelSpokes,bool);
00130   vtkBooleanMacro(GeneratePerturbedLabelSpokes,bool);
00132 
00134 
00136   vtkGetMacro(OutputTraversedBounds,bool);
00137   vtkSetMacro(OutputTraversedBounds,bool);
00138   vtkBooleanMacro(OutputTraversedBounds,bool);
00140 
00142 
00145   vtkGetMacro(OutputCoordinateSystem,int);
00146   vtkSetClampMacro(OutputCoordinateSystem,int,WORLD,DISPLAY);
00147   void OutputCoordinateSystemWorld() { this->SetOutputCoordinateSystem( vtkLabelPlacer::WORLD ); }
00148   void OutputCoordinateSystemDisplay() { this->SetOutputCoordinateSystem( vtkLabelPlacer::DISPLAY ); }
00150 
00151 protected:
00152   vtkLabelPlacer();
00153   virtual ~vtkLabelPlacer();
00154 
00155   virtual void SetAnchorTransform( vtkCoordinate* );
00156 
00157   int FillInputPortInformation( int port, vtkInformation* info );
00158   virtual int RequestData( vtkInformation* request,
00159     vtkInformationVector** inputVector, vtkInformationVector* outputVector );
00160 
00161   //BTX
00162   class Internal;
00163   Internal* Buckets;
00164   //ETX
00165 
00166   vtkRenderer* Renderer;
00167   vtkCoordinate* AnchorTransform;
00168   int Gravity;
00169   double MaximumLabelFraction;
00170   bool PositionsAsNormals;
00171   bool OutputTraversedBounds;
00172   bool GeneratePerturbedLabelSpokes;
00173 
00174   int LastRendererSize[2];
00175   double LastCameraPosition[3];
00176   double LastCameraFocalPoint[3];
00177   double LastCameraViewUp[3];
00178   double LastCameraParallelScale;
00179   int IteratorType;
00180   int OutputCoordinateSystem;
00181 
00182 private:
00183   vtkLabelPlacer( const vtkLabelPlacer& ); // Not implemented.
00184   void operator = ( const vtkLabelPlacer& ); // Not implemented.
00185 };
00186 
00187 #endif // __vtkLabelPlacer_h

Generated by  doxygen 1.7.1