NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
vtkSideAnnotation_p.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef vtkSideAnnotation_p_h
16 #define vtkSideAnnotation_p_h
17 
18 #include "vtkCornerAnnotation.h"
19 
28 class vtkSideAnnotation : public vtkCornerAnnotation
29 {
30 public:
31  vtkTypeMacro(vtkSideAnnotation, vtkCornerAnnotation);
32 
33  static vtkSideAnnotation* New();
34 
37  int RenderOpaqueGeometry(vtkViewport *viewport) override;
38 
40  void SetColour(int i, double* colour);
41 
43  void GetColour(int i, double* colour);
44 
45 protected:
46 
50  virtual ~vtkSideAnnotation();
51 
54  virtual void SetTextActorsPosition(int vsize[2]) override;
55 
58  virtual void SetTextActorsJustification() override;
59 
60 private:
61 
63  double m_Colours[4][3];
64 
65  vtkSideAnnotation(const vtkSideAnnotation&); // Purposefully not implemented.
66  void operator=(const vtkSideAnnotation&); // Purposefully not implemented.
67 };
68 
69 #endif
vtkSideAnnotation()
Constructs the vtkSideAnnotation object.
Definition: vtkSideAnnotation.cxx:29
virtual ~vtkSideAnnotation()
Destructs the vtkSideAnnotation object.
Definition: vtkSideAnnotation.cxx:39
vtkTypeMacro(vtkSideAnnotation, vtkCornerAnnotation)
virtual void SetTextActorsPosition(int vsize[2]) override
Overrides vtkCornerAnnotation::SetTextActorsPosition(int vsize[2]) to position the annotations on the...
Definition: vtkSideAnnotation.cxx:45
int RenderOpaqueGeometry(vtkViewport *viewport) override
Overrides vtkCornerAnnotation::RenderOpaqueGeometry(vtkViewPort*) to restore the colours after the an...
Definition: vtkSideAnnotation.cxx:76
Subclass of vtkCornerAnnotation to display annotations on the four sides of a render window...
Definition: vtkSideAnnotation_p.h:28
void GetColour(int i, double *colour)
Gets the colour of the text on the specified side.
Definition: vtkSideAnnotation.cxx:113
static vtkSideAnnotation * New()
virtual void SetTextActorsJustification() override
Overrides vtkCornerAnnotation::SetTextActorsJustification() to align the text to the inner side of th...
Definition: vtkSideAnnotation.cxx:55
void SetColour(int i, double *colour)
Sets the colour of the text on the specified side.
Definition: vtkSideAnnotation.cxx:93