18 #include "vtkUnicodeString.h"
19 #include <vtkImageData.h>
20 #include <vtkImageData.h>
21 #include <vtkImageMapper.h>
22 #include <vtkImageMapper.h>
23 #include <vtkImageReader2.h>
24 #include <vtkImageReader2Factory.h>
25 #include <vtkTextActor.h>
26 #include <vtkTextProperty.h>
27 #include <vtkTextRenderer.h>
28 #include <vtkTextRendererStringToImage.h>
32 #include <vtkImageImport.h>
33 #include <vtkProperty2D.h>
61 LocalStorage *ls = this->m_LSH.GetLocalStorage(renderer);
64 if (GetLogoImagePath().empty())
69 vtkImageReader2 *imageReader = m_readerFactory->CreateImageReader2(GetLogoImagePath().c_str());
72 imageReader->SetFileName(GetLogoImagePath().c_str());
73 imageReader->Update();
75 imageReader->Delete();
88 float size = GetRelativeSize(renderer);
90 int corner = GetCornerPosition(renderer);
93 ls->
m_LogoRep->SetPosition(offset[0], offset[1]);
95 GetOpacity(opacity, renderer);
96 ls->
m_LogoRep->GetImageProperty()->SetOpacity(opacity);
104 m_VtkImageImport->SetDataScalarTypeToUnsignedChar();
107 m_VtkImageImport->SetDataExtentToWholeExtent();
113 unsigned int column, row;
114 char *dest = ImageData;
132 m_VtkImageImport->SetImportVoidPointer(ImageData);
133 m_VtkImageImport->Modified();
134 m_VtkImageImport->Update();
135 return m_VtkImageImport->GetOutput();
140 SetStringProperty(
"Overlay.LogoImagePath", path.c_str());
147 GetPropertyList()->GetStringProperty(
"Overlay.LogoImagePath", path);
154 SetProperty(
"Overlay.OffsetVector", OffsetVectorProperty.GetPointer(), renderer);
161 OffsetVector.Fill(0);
162 GetPropertyValue<mitk::Point2D>(
"Overlay.OffsetVector", OffsetVector, renderer);
168 SetIntProperty(
"Overlay.CornerPosition", corner, renderer);
175 GetIntProperty(
"Overlay.CornerPosition", corner, renderer);
181 SetFloatProperty(
"Overlay.RelativeSize", size, renderer);
188 GetFloatProperty(
"Overlay.RelativeSize", size, renderer);
194 LocalStorage *ls = this->m_LSH.GetLocalStorage(renderer);
void SetLogoImagePath(std::string text)
LocalStorage()
Default constructor of the local storage.
void SetCornerPosition(const int &corner, BaseRenderer *renderer=NULL)
The corner where the logo is displayed. 0 = Bottom left 1 = Bottom right 2 = Top right 3 = Top left 4...
vtkSmartPointer< mitkVtkLogoRepresentation > m_LogoRep
virtual vtkProp * GetVtkProp(BaseRenderer *renderer) const override
This method is implemented by the specific VTKOverlays in order to create the element as a vtkProp...
LogoOverlay()
explicit constructor which disallows implicit conversions
void UpdateVtkOverlay(mitk::BaseRenderer *renderer) override
static const unsigned int mbiLogo_Data[]
Point2D GetOffsetVector(mitk::BaseRenderer *renderer=NULL) const
Organizes the rendering process.
virtual ~LogoOverlay()
virtual destructor in order to derive from this class
vtkImageData * CreateMbiLogo()
std::string GetLogoImagePath() const
void SetRelativeSize(const float &size, BaseRenderer *renderer=NULL)
static const unsigned int mbiLogo_Height
vtkSmartPointer< vtkImageData > m_LogoImage
Actor of a 2D render window.
static const unsigned int mbiLogo_Width
void SetOffsetVector(const Point2D &OffsetVector, BaseRenderer *renderer=NULL)
The relative offset to the corner position.
void UpdateGenerateDataTime()
vtkSmartPointer< vtkImageReader2Factory > m_readerFactory
~LocalStorage()
Default deconstructor of the local storage.
float GetRelativeSize(mitk::BaseRenderer *renderer=NULL) const
bool IsGenerateDataRequired(mitk::BaseRenderer *renderer, mitk::Overlay *overlay)
vtkRenderer * GetVtkRenderer() const
static const unsigned int mbiLogo_NumberOfScalars
int GetCornerPosition(mitk::BaseRenderer *renderer=NULL) const
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.