Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkCornerAnnotation.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCornerAnnotation.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 =========================================================================*/
00025 #ifndef __vtkCornerAnnotation_h
00026 #define __vtkCornerAnnotation_h
00027 
00028 #include "vtkActor2D.h"
00029 
00030 class vtkTextMapper;
00031 class vtkImageMapToWindowLevelColors;
00032 class vtkImageActor;
00033 class vtkTextProperty;
00034 
00035 class VTK_HYBRID_EXPORT vtkCornerAnnotation : public vtkActor2D
00036 {
00037 public:
00038   vtkTypeRevisionMacro(vtkCornerAnnotation,vtkActor2D);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040 
00043   static vtkCornerAnnotation *New();
00044   
00046 
00047   int RenderOpaqueGeometry(vtkViewport* viewport);
00048   int RenderTranslucentGeometry(vtkViewport* ) {return 0;};
00049   int RenderOverlay(vtkViewport* viewport);
00051 
00053 
00055   vtkSetMacro(MaximumLineHeight,double);
00056   vtkGetMacro(MaximumLineHeight,double);
00058   
00060 
00062   vtkSetMacro(MinimumFontSize,int);
00063   vtkGetMacro(MinimumFontSize,int);
00064   vtkSetMacro(MaximumFontSize,int);
00065   vtkGetMacro(MaximumFontSize,int);
00067 
00069 
00075   vtkSetMacro( LinearFontScaleFactor, double );
00076   vtkGetMacro( LinearFontScaleFactor, double );
00077   vtkSetMacro( NonlinearFontScaleFactor, double );
00078   vtkGetMacro( NonlinearFontScaleFactor, double );
00080 
00084   virtual void ReleaseGraphicsResources(vtkWindow *);
00085 
00087 
00088   void SetText(int i, const char *text);
00089   char* GetText(int i);
00090   void ClearAllTexts();
00091   void CopyAllTextsFrom(vtkCornerAnnotation *ca);
00093 
00095 
00096   void SetImageActor(vtkImageActor*);
00097   vtkGetObjectMacro(ImageActor,vtkImageActor);
00099   
00101 
00103   void SetWindowLevel(vtkImageMapToWindowLevelColors*);
00104   vtkGetObjectMacro(WindowLevel,vtkImageMapToWindowLevelColors);
00106 
00108 
00109   vtkSetMacro(LevelShift, double);
00110   vtkGetMacro(LevelShift, double);
00112   
00114 
00115   vtkSetMacro(LevelScale, double);
00116   vtkGetMacro(LevelScale, double);
00118   
00120 
00121   virtual void SetTextProperty(vtkTextProperty *p);
00122   vtkGetObjectMacro(TextProperty,vtkTextProperty);
00124 
00126 
00128   vtkBooleanMacro(ShowSliceAndImage, int);
00129   vtkSetMacro(ShowSliceAndImage, int);
00130   vtkGetMacro(ShowSliceAndImage, int);
00132   
00133 protected:
00134   vtkCornerAnnotation();
00135   ~vtkCornerAnnotation();
00136 
00137   double MaximumLineHeight;
00138 
00139   vtkTextProperty *TextProperty;
00140 
00141   vtkImageMapToWindowLevelColors *WindowLevel;
00142   double LevelShift;
00143   double LevelScale;
00144   vtkImageActor *ImageActor;
00145   vtkImageActor *LastImageActor;
00146 
00147   char *CornerText[4];
00148   
00149   int FontSize;
00150   vtkActor2D    *TextActor[4];
00151   vtkTimeStamp   BuildTime;
00152   int            LastSize[2];
00153   vtkTextMapper *TextMapper[4];
00154 
00155   int MinimumFontSize;
00156   int MaximumFontSize;
00157 
00158   double LinearFontScaleFactor;
00159   double NonlinearFontScaleFactor;
00160   
00161   int ShowSliceAndImage;
00162   
00164 
00165   virtual void TextReplace(
00166     vtkImageActor *ia, vtkImageMapToWindowLevelColors *wl);
00168 
00170 
00171   virtual void SetTextActorsPosition(int vsize[2]);
00172   virtual void SetTextActorsJustification();
00174 
00175 private:
00176   vtkCornerAnnotation(const vtkCornerAnnotation&);  // Not implemented.
00177   void operator=(const vtkCornerAnnotation&);  // Not implemented.
00178 };
00179 
00180 
00181 #endif
00182 
00183 
00184 

Generated on Mon Jan 21 23:07:27 2008 for VTK by  doxygen 1.4.3-20050530