Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkLogoAnnotation.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef LOGOAnnotation_H
14 #define LOGOAnnotation_H
15 
16 #include "MitkAnnotationExports.h"
18 #include <mitkVtkAnnotation.h>
19 #include <vtkSmartPointer.h>
20 
22 class vtkImageData;
23 class vtkImageReader2Factory;
24 class vtkImageImport;
25 
26 namespace mitk
27 {
30  {
31  public:
33  {
34  public:
36  vtkSmartPointer<vtkImageData> m_LogoImage;
37  vtkSmartPointer<mitkVtkLogoRepresentation> m_LogoRep;
38 
40  itk::TimeStamp m_LastUpdateTime;
41 
43  LocalStorage();
45  ~LocalStorage();
46  };
47 
49  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
50 
51  vtkSmartPointer<vtkImageReader2Factory> m_readerFactory;
52  void SetLogoImage(vtkSmartPointer<vtkImageData> logo);
53 
54  void SetLogoImagePath(std::string text);
55  std::string GetLogoImagePath() const;
56  void LoadLogoImageFromPath();
57 
59  void SetOffsetVector(const Point2D &OffsetVector);
60  Point2D GetOffsetVector() const;
61 
68  void SetCornerPosition(const int &corner);
69  int GetCornerPosition() const;
70 
71  void SetRelativeSize(const float &size);
72  float GetRelativeSize() const;
73 
74  protected:
77 
78  vtkProp *GetVtkProp(BaseRenderer *renderer) const override;
79  void UpdateVtkAnnotation(mitk::BaseRenderer *renderer) override;
80 
82  explicit LogoAnnotation();
83 
85  ~LogoAnnotation() override;
86 
87  private:
88 
89  vtkSmartPointer<vtkImageData> m_UpdatedLogoImage;
90  vtkSmartPointer<vtkImageImport> m_VtkImageImport;
91 
93  LogoAnnotation(const LogoAnnotation &);
94 
96  LogoAnnotation &operator=(const LogoAnnotation &);
97  };
98 
99 } // namespace mitk
100 #endif // LOGOAnnotation_H
#define MITKANNOTATION_EXPORT
Templated class for management of LocalStorage implementations in Mappers.
Organizes the rendering process.
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
Base class for mapper specific rendering ressources.
vtkSmartPointer< vtkImageData > m_LogoImage
Actor of a 2D render window.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
The VtkAnnotation class is the base for all Annotation which are using the VTK framework to render th...
vtkSmartPointer< mitkVtkLogoRepresentation > m_LogoRep
Displays a logo on the renderwindow.
Base class for all Annotation This class is to be implemented in order to create Annotation which are...
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.