VTK
vtkCornerAnnotation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCornerAnnotation.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
38 #ifndef vtkCornerAnnotation_h
39 #define vtkCornerAnnotation_h
40 
41 #include "vtkRenderingAnnotationModule.h" // For export macro
42 #include "vtkActor2D.h"
43 
44 class vtkTextMapper;
46 class vtkImageActor;
47 class vtkTextProperty;
48 
50 {
51 public:
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
57  static vtkCornerAnnotation *New();
58 
60 
61  int RenderOpaqueGeometry(vtkViewport* viewport);
62  virtual int RenderTranslucentPolygonalGeometry(vtkViewport* ) {return 0;};
63  int RenderOverlay(vtkViewport* viewport);
65 
67  virtual int HasTranslucentPolygonalGeometry();
68 
70 
72  vtkSetMacro(MaximumLineHeight,double);
73  vtkGetMacro(MaximumLineHeight,double);
75 
77 
79  vtkSetMacro(MinimumFontSize,int);
80  vtkGetMacro(MinimumFontSize,int);
81  vtkSetMacro(MaximumFontSize,int);
82  vtkGetMacro(MaximumFontSize,int);
84 
86 
92  vtkSetMacro( LinearFontScaleFactor, double );
93  vtkGetMacro( LinearFontScaleFactor, double );
94  vtkSetMacro( NonlinearFontScaleFactor, double );
95  vtkGetMacro( NonlinearFontScaleFactor, double );
97 
101  virtual void ReleaseGraphicsResources(vtkWindow *);
102 
104 
107  {
108  LowerLeft = 0,
111  UpperRight
112  };
114 
116 
117  void SetText(int i, const char *text);
118  const char* GetText(int i);
119  void ClearAllTexts();
120  void CopyAllTextsFrom(vtkCornerAnnotation *ca);
122 
124 
125  void SetImageActor(vtkImageActor*);
126  vtkGetObjectMacro(ImageActor,vtkImageActor);
128 
130 
132  void SetWindowLevel(vtkImageMapToWindowLevelColors*);
135 
137 
138  vtkSetMacro(LevelShift, double);
139  vtkGetMacro(LevelShift, double);
141 
143 
144  vtkSetMacro(LevelScale, double);
145  vtkGetMacro(LevelScale, double);
147 
149 
150  virtual void SetTextProperty(vtkTextProperty *p);
151  vtkGetObjectMacro(TextProperty,vtkTextProperty);
153 
155 
157  vtkBooleanMacro(ShowSliceAndImage, int);
158  vtkSetMacro(ShowSliceAndImage, int);
159  vtkGetMacro(ShowSliceAndImage, int);
161 
162 protected:
165 
167 
169 
171  double LevelShift;
172  double LevelScale;
175 
176  char *CornerText[4];
177 
178  int FontSize;
179  vtkActor2D *TextActor[4];
181  int LastSize[2];
182  vtkTextMapper *TextMapper[4];
183 
186 
189 
191 
193 
194  virtual void TextReplace(
197 
199 
200  virtual void SetTextActorsPosition(int vsize[2]);
201  virtual void SetTextActorsJustification();
203 
204 private:
205  vtkCornerAnnotation(const vtkCornerAnnotation&); // Not implemented.
206  void operator=(const vtkCornerAnnotation&); // Not implemented.
207 };
208 
209 
210 #endif
211 
212 
213 
text annotation in four corners
vtkTextProperty * TextProperty
virtual void ReleaseGraphicsResources(vtkWindow *)
abstract specification for Viewports
Definition: vtkViewport.h:46
Uses the upper left corner.
map the input image through a lookup table and window / level it
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
a actor that draws 2D data
Definition: vtkActor2D.h:44
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkImageMapToWindowLevelColors * WindowLevel
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:632
2D text annotation
Definition: vtkTextMapper.h:59
#define VTKRENDERINGANNOTATION_EXPORT
window superclass for vtkRenderWindow
Definition: vtkWindow.h:33
virtual int HasTranslucentPolygonalGeometry()
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:48
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
vtkImageActor * ImageActor
a simple class to control print indentation
Definition: vtkIndent.h:38
void PrintSelf(ostream &os, vtkIndent indent)
static vtkActor2D * New()
represent text properties.
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
virtual int RenderOverlay(vtkViewport *viewport)
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
Uses the lower right corner.
vtkImageActor * LastImageActor
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
GLfloat GLfloat p
Definition: vtkgl.h:15717
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69