VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
35 #ifndef __vtkCornerAnnotation_h
36 #define __vtkCornerAnnotation_h
37 
38 #include "vtkRenderingAnnotationModule.h" // For export macro
39 #include "vtkActor2D.h"
40 
41 class vtkTextMapper;
43 class vtkImageActor;
44 class vtkTextProperty;
45 
47 {
48 public:
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
54  static vtkCornerAnnotation *New();
55 
57 
58  int RenderOpaqueGeometry(vtkViewport* viewport);
59  virtual int RenderTranslucentPolygonalGeometry(vtkViewport* ) {return 0;};
60  int RenderOverlay(vtkViewport* viewport);
62 
64  virtual int HasTranslucentPolygonalGeometry();
65 
67 
69  vtkSetMacro(MaximumLineHeight,double);
70  vtkGetMacro(MaximumLineHeight,double);
72 
74 
76  vtkSetMacro(MinimumFontSize,int);
77  vtkGetMacro(MinimumFontSize,int);
78  vtkSetMacro(MaximumFontSize,int);
79  vtkGetMacro(MaximumFontSize,int);
81 
83 
89  vtkSetMacro( LinearFontScaleFactor, double );
90  vtkGetMacro( LinearFontScaleFactor, double );
91  vtkSetMacro( NonlinearFontScaleFactor, double );
92  vtkGetMacro( NonlinearFontScaleFactor, double );
94 
98  virtual void ReleaseGraphicsResources(vtkWindow *);
99 
101 
102  void SetText(int i, const char *text);
103  const char* GetText(int i);
104  void ClearAllTexts();
105  void CopyAllTextsFrom(vtkCornerAnnotation *ca);
107 
109 
110  void SetImageActor(vtkImageActor*);
111  vtkGetObjectMacro(ImageActor,vtkImageActor);
113 
115 
117  void SetWindowLevel(vtkImageMapToWindowLevelColors*);
118  vtkGetObjectMacro(WindowLevel,vtkImageMapToWindowLevelColors);
120 
122 
123  vtkSetMacro(LevelShift, double);
124  vtkGetMacro(LevelShift, double);
126 
128 
129  vtkSetMacro(LevelScale, double);
130  vtkGetMacro(LevelScale, double);
132 
134 
135  virtual void SetTextProperty(vtkTextProperty *p);
136  vtkGetObjectMacro(TextProperty,vtkTextProperty);
138 
140 
142  vtkBooleanMacro(ShowSliceAndImage, int);
143  vtkSetMacro(ShowSliceAndImage, int);
144  vtkGetMacro(ShowSliceAndImage, int);
146 
147 protected:
150 
152 
154 
156  double LevelShift;
157  double LevelScale;
160 
161  char *CornerText[4];
162 
163  int FontSize;
164  vtkActor2D *TextActor[4];
166  int LastSize[2];
167  vtkTextMapper *TextMapper[4];
168 
171 
174 
176 
178 
179  virtual void TextReplace(
182 
184 
185  virtual void SetTextActorsPosition(int vsize[2]);
186  virtual void SetTextActorsJustification();
188 
189 private:
190  vtkCornerAnnotation(const vtkCornerAnnotation&); // Not implemented.
191  void operator=(const vtkCornerAnnotation&); // Not implemented.
192 };
193 
194 
195 #endif
196 
197 
198 
text annotation in four corners
vtkTextProperty * TextProperty
virtual void ReleaseGraphicsResources(vtkWindow *)
abstract specification for Viewports
Definition: vtkViewport.h:46
map the input image through a lookup table and window / level it
a actor that draws 2D data
Definition: vtkActor2D.h:44
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkImageMapToWindowLevelColors * WindowLevel
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.
virtual int RenderOverlay(vtkViewport *viewport)
vtkImageActor * LastImageActor
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
GLfloat GLfloat p
Definition: vtkgl.h:15717