Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::LogoOverlay Class Reference

Displays a logo on the renderwindow. More...

#include <mitkLogoOverlay.h>

Inheritance diagram for mitk::LogoOverlay:
Collaboration diagram for mitk::LogoOverlay:

Classes

class  LocalStorage
 

Public Member Functions

 mitkClassMacro (LogoOverlay, mitk::VtkOverlay)
 
Pointer Clone () const
 
void SetLogoImagePath (std::string text)
 
std::string GetLogoImagePath () const
 
void SetOffsetVector (const Point2D &OffsetVector, BaseRenderer *renderer=NULL)
 The relative offset to the corner position. More...
 
Point2D GetOffsetVector (mitk::BaseRenderer *renderer=NULL) const
 
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 = Center. More...
 
int GetCornerPosition (mitk::BaseRenderer *renderer=NULL) const
 
void SetRelativeSize (const float &size, BaseRenderer *renderer=NULL)
 
float GetRelativeSize (mitk::BaseRenderer *renderer=NULL) const
 
- Public Member Functions inherited from mitk::VtkOverlay
virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
void Update (BaseRenderer *renderer) override
 Applies all properties and should be called before the rendering procedure. More...
 
void AddToBaseRenderer (BaseRenderer *renderer) override
 Adds the overlay to the specified renderer. Update Overlay should be called soon in order to apply all properties. More...
 
void AddToRenderer (BaseRenderer *renderer, vtkRenderer *vtkrenderer) override
 Adds the overlay to the specified renderer. Update Overlay should be called soon in order to apply all properties. More...
 
void RemoveFromRenderer (BaseRenderer *renderer, vtkRenderer *vtkrenderer) override
 Removes the overlay from the specified renderer. It is not visible anymore then. More...
 
void RemoveFromBaseRenderer (BaseRenderer *renderer) override
 Removes the overlay from the specified renderer. It is not visible anymore then. More...
 
void Paint (BaseRenderer *renderer)
 Paints the overlay. More...
 
- Public Member Functions inherited from mitk::Overlay
void SetProperty (const std::string &propertyKey, const BaseProperty::Pointer &property, const mitk::BaseRenderer *renderer=nullptr)
 Set the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if NULL, use BaseRenderer-independent PropertyList). This is set-by-value. More...
 
void ReplaceProperty (const std::string &propertyKey, const BaseProperty::Pointer &property, const mitk::BaseRenderer *renderer=nullptr)
 Replace the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer (if NULL, use BaseRenderer-independent PropertyList). This is set-by-reference. More...
 
void AddProperty (const std::string &propertyKey, const BaseProperty::Pointer &property, const mitk::BaseRenderer *renderer=nullptr, bool overwrite=false)
 Add the property (instance of BaseProperty) if it does not exist (or always if overwrite is true) with key propertyKey in the PropertyList of the renderer (if NULL, use BaseRenderer-independent PropertyList). This is set-by-value. More...
 
mitk::PropertyListGetPropertyList (const mitk::BaseRenderer *renderer=nullptr) const
 Get the PropertyList of the renderer. If renderer is NULL, the BaseRenderer-independent PropertyList of this Overlay is returned. More...
 
void ConcatenatePropertyList (PropertyList *pList, bool replace=false)
 Add values from another PropertyList. More...
 
mitk::BasePropertyGetProperty (const std::string &propertyKey, const mitk::BaseRenderer *renderer=nullptr) const
 Get the property (instance of BaseProperty) with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList. More...
 
template<typename T >
bool GetProperty (itk::SmartPointer< T > &property, const std::string &propertyKey, const mitk::BaseRenderer *renderer=nullptr) const
 Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList. More...
 
template<typename T >
bool GetProperty (T *&property, const std::string &propertyKey, const mitk::BaseRenderer *renderer=nullptr) const
 Get the property of type T with key propertyKey from the PropertyList of the renderer, if available there, otherwise use the BaseRenderer-independent PropertyList. More...
 
template<typename T >
bool GetPropertyValue (const std::string &propertyKey, T &value, mitk::BaseRenderer *renderer=nullptr) const
 Convenience access method for GenericProperty<T> properties (T being the type of the second parameter) More...
 
bool GetBoolProperty (const std::string &propertyKey, bool &boolValue, mitk::BaseRenderer *renderer=nullptr) const
 Convenience access method for bool properties (instances of BoolProperty) More...
 
bool GetIntProperty (const std::string &propertyKey, int &intValue, mitk::BaseRenderer *renderer=nullptr) const
 Convenience access method for int properties (instances of IntProperty) More...
 
bool GetFloatProperty (const std::string &propertyKey, float &floatValue, mitk::BaseRenderer *renderer=nullptr) const
 Convenience access method for float properties (instances of FloatProperty) More...
 
bool GetStringProperty (const std::string &propertyKey, std::string &string, mitk::BaseRenderer *renderer=nullptr) const
 Convenience access method for string properties (instances of StringProperty) More...
 
void SetIntProperty (const std::string &propertyKey, int intValue, mitk::BaseRenderer *renderer=nullptr)
 Convenience method for setting int properties (instances of IntProperty) More...
 
void SetBoolProperty (const std::string &propertyKey, bool boolValue, mitk::BaseRenderer *renderer=nullptr)
 Convenience method for setting int properties (instances of IntProperty) More...
 
void SetFloatProperty (const std::string &propertyKey, float floatValue, mitk::BaseRenderer *renderer=nullptr)
 Convenience method for setting int properties (instances of IntProperty) More...
 
void SetStringProperty (const std::string &propertyKey, const std::string &string, mitk::BaseRenderer *renderer=nullptr)
 Convenience method for setting int properties (instances of IntProperty) More...
 
bool IsOn (const std::string &propertyKey, mitk::BaseRenderer *renderer, bool defaultIsOn=true) const
 Convenience access method for boolean properties (instances of BoolProperty). Return value is the value of the property. If the property is not found, the value of defaultIsOn is returned. More...
 
bool GetName (std::string &nodeName, mitk::BaseRenderer *renderer=nullptr, const std::string &propertyKey="name") const
 Convenience access method for accessing the name of an object (instance of StringProperty with property-key "name") More...
 
virtual std::string GetName () const
 Extra convenience access method for accessing the name of an object (instance of StringProperty with property-key "name"). More...
 
virtual void SetName (const std::string &name)
 Extra convenience access method to set the name of an object. More...
 
bool GetColor (float rgb[], mitk::BaseRenderer *renderer=nullptr, const std::string &propertyKey="color") const
 Convenience access method for color properties (instances of ColorProperty) More...
 
void SetColor (const mitk::Color &color, mitk::BaseRenderer *renderer=nullptr, const std::string &propertyKey="color")
 Convenience method for setting color properties (instances of ColorProperty) More...
 
void SetColor (float red, float green, float blue, mitk::BaseRenderer *renderer=nullptr, const std::string &propertyKey="color")
 Convenience method for setting color properties (instances of ColorProperty) More...
 
void SetColor (const float rgb[], mitk::BaseRenderer *renderer=nullptr, const std::string &propertyKey="color")
 Convenience method for setting color properties (instances of ColorProperty) More...
 
bool GetOpacity (float &opacity, mitk::BaseRenderer *renderer, const std::string &propertyKey="opacity") const
 Convenience access method for opacity properties (instances of FloatProperty) More...
 
void SetOpacity (float opacity, mitk::BaseRenderer *renderer=nullptr, const std::string &propertyKey="opacity")
 Convenience method for setting opacity properties (instances of FloatProperty) More...
 
void SetText (std::string text, mitk::BaseRenderer *renderer=nullptr)
 
std::string GetText (mitk::BaseRenderer *renderer=nullptr) const
 
void SetFontSize (int fontSize, mitk::BaseRenderer *renderer=nullptr)
 
int GetFontSize (mitk::BaseRenderer *renderer=nullptr) const
 
bool GetVisibility (bool &visible, mitk::BaseRenderer *renderer, const std::string &propertyKey="visible") const
 Convenience access method for visibility properties (instances of BoolProperty with property-key "visible") More...
 
bool IsVisible (mitk::BaseRenderer *renderer, const std::string &propertyKey="visible", bool defaultIsOn=true) const
 Convenience access method for visibility properties (instances of BoolProperty). Return value is the visibility. Default is visible==true, i.e., true is returned even if the property (propertyKey) is not found. More...
 
void SetVisibility (bool visible, mitk::BaseRenderer *renderer=nullptr, const std::string &propertyKey="visible")
 Convenience method for setting visibility properties (instances of BoolProperty) More...
 
virtual Bounds GetBoundsOnDisplay (BaseRenderer *renderer) const
 Returns position and size of the overlay on the display. More...
 
virtual void SetBoundsOnDisplay (BaseRenderer *renderer, const Bounds &)
 Sets position and size of the overlay on the display. More...
 
void SetForceInForeground (bool forceForeground)
 
bool IsForceInForeground () const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::VtkOverlay
static const char * GetStaticNameOfClass ()
 
- Static Public Member Functions inherited from mitk::Overlay
static const char * GetStaticNameOfClass ()
 

Public Attributes

vtkSmartPointer< vtkImageReader2Factory > m_readerFactory
 

Protected Member Functions

virtual vtkProp * GetVtkProp (BaseRenderer *renderer) const override
 This method is implemented by the specific VTKOverlays in order to create the element as a vtkProp. More...
 
void UpdateVtkOverlay (mitk::BaseRenderer *renderer) override
 
vtkImageData * CreateMbiLogo ()
 
 LogoOverlay ()
 explicit constructor which disallows implicit conversions More...
 
virtual ~LogoOverlay ()
 virtual destructor in order to derive from this class More...
 
- Protected Member Functions inherited from mitk::VtkOverlay
 VtkOverlay ()
 explicit constructor which disallows implicit conversions More...
 
virtual ~VtkOverlay ()
 virtual destructor in order to derive from this class More...
 
- Protected Member Functions inherited from mitk::Overlay
 Overlay ()
 explicit constructor which disallows implicit conversions More...
 
virtual ~Overlay ()
 virtual destructor in order to derive from this class More...
 

Protected Attributes

mitk::LocalStorageHandler< LocalStoragem_LSH
 The LocalStorageHandler holds all LocalStorages for the render windows. More...
 
- Protected Attributes inherited from mitk::Overlay
PropertyList::Pointer m_PropertyList
 BaseRenderer-independent PropertyList. More...
 
MapOfPropertyLists m_MapOfPropertyLists
 Map associating each BaseRenderer with its own PropertyList. More...
 
itk::TimeStamp m_DataReferenceChangedTime
 Timestamp of the last change of m_Data. More...
 

Additional Inherited Members

- Public Types inherited from mitk::VtkOverlay
typedef VtkOverlay Self
 
typedef Overlay Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
- Public Types inherited from mitk::Overlay
typedef std::map< const BaseRenderer *, PropertyList::PointerMapOfPropertyLists
 
typedef Overlay Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Detailed Description

Displays a logo on the renderwindow.

Definition at line 33 of file mitkLogoOverlay.h.

Constructor & Destructor Documentation

mitk::LogoOverlay::LogoOverlay ( )
explicitprotected

explicit constructor which disallows implicit conversions

Definition at line 35 of file mitkLogoOverlay.cpp.

References m_readerFactory, mitk::New(), offset, SetCornerPosition(), SetOffsetVector(), and SetRelativeSize().

mitk::LogoOverlay::~LogoOverlay ( )
protectedvirtual

virtual destructor in order to derive from this class

Definition at line 46 of file mitkLogoOverlay.cpp.

Member Function Documentation

Pointer mitk::LogoOverlay::Clone ( ) const
vtkImageData * mitk::LogoOverlay::CreateMbiLogo ( )
protected
int mitk::LogoOverlay::GetCornerPosition ( mitk::BaseRenderer renderer = NULL) const

Definition at line 172 of file mitkLogoOverlay.cpp.

std::string mitk::LogoOverlay::GetLogoImagePath ( ) const

Definition at line 144 of file mitkLogoOverlay.cpp.

mitk::Point2D mitk::LogoOverlay::GetOffsetVector ( mitk::BaseRenderer renderer = NULL) const

Definition at line 158 of file mitkLogoOverlay.cpp.

float mitk::LogoOverlay::GetRelativeSize ( mitk::BaseRenderer renderer = NULL) const

Definition at line 185 of file mitkLogoOverlay.cpp.

vtkProp * mitk::LogoOverlay::GetVtkProp ( BaseRenderer renderer) const
overrideprotectedvirtual

This method is implemented by the specific VTKOverlays in order to create the element as a vtkProp.

Parameters
renderer
Returns
The element that was created by the subclasses as a vtkProp.

Implements mitk::VtkOverlay.

Definition at line 192 of file mitkLogoOverlay.cpp.

References mitk::LogoOverlay::LocalStorage::m_LogoRep.

mitk::LogoOverlay::mitkClassMacro ( LogoOverlay  ,
mitk::VtkOverlay   
)
static Pointer mitk::LogoOverlay::New ( )
static
void mitk::LogoOverlay::SetCornerPosition ( const int &  corner,
mitk::BaseRenderer renderer = NULL 
)

The corner where the logo is displayed. 0 = Bottom left 1 = Bottom right 2 = Top right 3 = Top left 4 = Center.

Definition at line 166 of file mitkLogoOverlay.cpp.

Referenced by LogoOverlay().

void mitk::LogoOverlay::SetLogoImagePath ( std::string  text)

Definition at line 138 of file mitkLogoOverlay.cpp.

void mitk::LogoOverlay::SetOffsetVector ( const Point2D OffsetVector,
mitk::BaseRenderer renderer = NULL 
)

The relative offset to the corner position.

Definition at line 151 of file mitkLogoOverlay.cpp.

References mitk::Point2dProperty::New().

Referenced by LogoOverlay().

void mitk::LogoOverlay::SetRelativeSize ( const float &  size,
mitk::BaseRenderer renderer = NULL 
)

Definition at line 179 of file mitkLogoOverlay.cpp.

Referenced by LogoOverlay().

Member Data Documentation

mitk::LocalStorageHandler<LocalStorage> mitk::LogoOverlay::m_LSH
mutableprotected

The LocalStorageHandler holds all LocalStorages for the render windows.

Definition at line 78 of file mitkLogoOverlay.h.

vtkSmartPointer<vtkImageReader2Factory> mitk::LogoOverlay::m_readerFactory

Definition at line 55 of file mitkLogoOverlay.h.

Referenced by LogoOverlay().


The documentation for this class was generated from the following files: