Medical Imaging Interaction Toolkit  2018.4.99-a28b433c
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);
50  itkCloneMacro(Self);
51 
52  vtkSmartPointer<vtkImageReader2Factory> m_readerFactory;
53  void SetLogoImage(vtkSmartPointer<vtkImageData> logo);
54 
55  void SetLogoImagePath(std::string text);
56  std::string GetLogoImagePath() const;
57  void LoadLogoImageFromPath();
58 
60  void SetOffsetVector(const Point2D &OffsetVector);
61  Point2D GetOffsetVector() const;
62 
69  void SetCornerPosition(const int &corner);
70  int GetCornerPosition() const;
71 
72  void SetRelativeSize(const float &size);
73  float GetRelativeSize() const;
74 
75  protected:
78 
79  vtkProp *GetVtkProp(BaseRenderer *renderer) const override;
80  void UpdateVtkAnnotation(mitk::BaseRenderer *renderer) override;
81 
83  explicit LogoAnnotation();
84 
86  ~LogoAnnotation() override;
87 
88  private:
89 
90  vtkSmartPointer<vtkImageData> m_UpdatedLogoImage;
91  vtkSmartPointer<vtkImageImport> m_VtkImageImport;
92 
95 
97  LogoAnnotation &operator=(const LogoAnnotation &);
98  };
99 
100 } // namespace mitk
101 #endif // LOGOAnnotation_H
#define MITKANNOTATION_EXPORT
Organizes the rendering process.
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all LocalStorages for the render windows.
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.
vtkSmartPointer< vtkImageReader2Factory > m_readerFactory