VTK
dox/Rendering/vtkDynamic2DLabelMapper.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkDynamic2DLabelMapper.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 -------------------------------------------------------------------------*/
00061 #ifndef __vtkDynamic2DLabelMapper_h
00062 #define __vtkDynamic2DLabelMapper_h
00063 
00064 #include "vtkLabeledDataMapper.h"
00065 
00066 class VTK_RENDERING_EXPORT vtkDynamic2DLabelMapper : public vtkLabeledDataMapper
00067 {
00068 public:
00070 
00072   static vtkDynamic2DLabelMapper *New();
00073   vtkTypeMacro(vtkDynamic2DLabelMapper, vtkLabeledDataMapper);
00074   void PrintSelf(ostream& os, vtkIndent indent);
00076   
00079   void SetPriorityArrayName(const char* name);
00080   
00082 
00084   vtkSetMacro(ReversePriority, bool);
00085   vtkGetMacro(ReversePriority, bool);
00086   vtkBooleanMacro(ReversePriority, bool);
00088   
00090 
00092   vtkSetMacro(LabelHeightPadding, float);
00093   vtkGetMacro(LabelHeightPadding, float);
00095   
00097 
00099   vtkSetMacro(LabelWidthPadding, float);
00100   vtkGetMacro(LabelWidthPadding, float);
00102   
00104 
00105   void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor);
00106   void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor);
00108 
00109 protected:
00110   vtkDynamic2DLabelMapper();
00111   ~vtkDynamic2DLabelMapper();
00112 
00114   double GetCurrentScale(vtkViewport *viewport);
00115   
00116   float* LabelWidth;
00117   float* LabelHeight;
00118   float* Cutoff;
00119   float ReferenceScale;
00120   float LabelHeightPadding;
00121   float LabelWidthPadding;
00122   
00123   bool ReversePriority;
00124 
00125 private:
00126   vtkDynamic2DLabelMapper(const vtkDynamic2DLabelMapper&);  // Not implemented.
00127   void operator=(const vtkDynamic2DLabelMapper&);  // Not implemented.
00128 };
00129 
00130 #endif
00131