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

A simple implementation of a layouter for 2D Overlays. More...

#include <mitkOverlay2DLayouter.h>

Inheritance diagram for mitk::Overlay2DLayouter:
Collaboration diagram for mitk::Overlay2DLayouter:

Public Types

enum  Alignment {
  TopLeft, Top, TopRight, BottomLeft,
  Bottom, BottomRight
}
 

Public Member Functions

 mitkClassMacro (Overlay2DLayouter, mitk::AbstractOverlayLayouter)
 
Pointer Clone () const
 
void PrepareLayout () override
 Sets the positions of each managed overlay according to the layouter role. More...
 
- Public Member Functions inherited from mitk::AbstractOverlayLayouter
 mitkClassMacroItkParent (AbstractOverlayLayouter, itk::LightObject)
 
void SetBaseRenderer (BaseRenderer *renderer)
 
BaseRendererGetBaseRenderer ()
 
void AddOverlay (Overlay *Overlay)
 Adds an Overlay to the internal list of managed Overlays. More...
 
void RemoveOverlay (Overlay *Overlay)
 Removes the passed Overlay from the m_ManagedOverlays List. More...
 
std::string GetIdentifier () const
 Returns a unique identifier for one specific kind of layouter. More...
 

Static Public Member Functions

static Pointer New ()
 
static std::string STANDARD_2D_TOPLEFT ()
 
static std::string STANDARD_2D_TOP ()
 
static std::string STANDARD_2D_TOPRIGHT ()
 
static std::string STANDARD_2D_BOTTOMLEFT ()
 
static std::string STANDARD_2D_BOTTOM ()
 
static std::string STANDARD_2D_BOTTOMRIGHT ()
 
static Overlay2DLayouter::Pointer CreateLayouter (Alignment alignment, BaseRenderer *renderer)
 Factory method for the different kinds of Layouters. More...
 
static Overlay2DLayouter::Pointer CreateLayouter (const std::string &identifier, BaseRenderer *renderer)
 Factory method for the different kinds of Layouters. More...
 

Protected Member Functions

 Overlay2DLayouter ()
 explicit constructor which disallows implicit conversions More...
 
virtual ~Overlay2DLayouter ()
 virtual destructor in order to derive from this class More...
 
- Protected Member Functions inherited from mitk::AbstractOverlayLayouter
 AbstractOverlayLayouter ()
 explicit constructor which disallows implicit conversions More...
 
virtual ~AbstractOverlayLayouter ()
 virtual destructor in order to derive from this class More...
 
std::list< mitk::Overlay * > GetManagedOverlays () const
 returns a list of the overlays that is managed by this Layouter. More...
 

Protected Attributes

Alignment m_Alignment
 
double m_Margin
 
- Protected Attributes inherited from mitk::AbstractOverlayLayouter
std::string m_Identifier
 A unique identifier for one specific kind of layouter. More...
 

Detailed Description

A simple implementation of a layouter for 2D Overlays.

Definition at line 27 of file mitkOverlay2DLayouter.h.

Member Enumeration Documentation

Enumerator
TopLeft 
Top 
TopRight 
BottomLeft 
Bottom 
BottomRight 

Definition at line 30 of file mitkOverlay2DLayouter.h.

Constructor & Destructor Documentation

mitk::Overlay2DLayouter::Overlay2DLayouter ( )
explicitprotected

explicit constructor which disallows implicit conversions

Definition at line 50 of file mitkOverlay2DLayouter.cpp.

mitk::Overlay2DLayouter::~Overlay2DLayouter ( )
protectedvirtual

virtual destructor in order to derive from this class

Definition at line 55 of file mitkOverlay2DLayouter.cpp.

Member Function Documentation

Pointer mitk::Overlay2DLayouter::Clone ( ) const
mitk::Overlay2DLayouter::Pointer mitk::Overlay2DLayouter::CreateLayouter ( Alignment  alignment,
mitk::BaseRenderer renderer 
)
static

Factory method for the different kinds of Layouters.

Create a Layouter that, depending on the identifier sorts the Overlays in one corner of the Renderwindow

Definition at line 89 of file mitkOverlay2DLayouter.cpp.

References New().

Referenced by main().

mitk::Overlay2DLayouter::Pointer mitk::Overlay2DLayouter::CreateLayouter ( const std::string &  identifier,
mitk::BaseRenderer renderer 
)
static

Factory method for the different kinds of Layouters.

Create a Layouter that, depending on the identifier sorts the Overlays in one corner of the Renderwindow

Definition at line 59 of file mitkOverlay2DLayouter.cpp.

References New().

mitk::Overlay2DLayouter::mitkClassMacro ( Overlay2DLayouter  ,
mitk::AbstractOverlayLayouter   
)
static Pointer mitk::Overlay2DLayouter::New ( )
static

Referenced by CreateLayouter().

void mitk::Overlay2DLayouter::PrepareLayout ( )
overridevirtual

Sets the positions of each managed overlay according to the layouter role.

This has to be implemented in order to provide a layouting procedure for the list of managed Overlays. The method has to provide a layouting for each identifier.

Implements mitk::AbstractOverlayLayouter.

Definition at line 126 of file mitkOverlay2DLayouter.cpp.

References mitk::Overlay::GetBoundsOnDisplay(), mitk::Overlay::Bounds::Position, mitk::Overlay::SetBoundsOnDisplay(), and mitk::Overlay::Bounds::Size.

std::string mitk::Overlay2DLayouter::STANDARD_2D_BOTTOM ( )
static

Definition at line 39 of file mitkOverlay2DLayouter.cpp.

Referenced by main().

std::string mitk::Overlay2DLayouter::STANDARD_2D_BOTTOMLEFT ( )
static

Definition at line 34 of file mitkOverlay2DLayouter.cpp.

std::string mitk::Overlay2DLayouter::STANDARD_2D_BOTTOMRIGHT ( )
static

Definition at line 44 of file mitkOverlay2DLayouter.cpp.

std::string mitk::Overlay2DLayouter::STANDARD_2D_TOP ( )
static

Definition at line 24 of file mitkOverlay2DLayouter.cpp.

std::string mitk::Overlay2DLayouter::STANDARD_2D_TOPLEFT ( )
static

Definition at line 19 of file mitkOverlay2DLayouter.cpp.

Referenced by main().

std::string mitk::Overlay2DLayouter::STANDARD_2D_TOPRIGHT ( )
static

Definition at line 29 of file mitkOverlay2DLayouter.cpp.

Member Data Documentation

Alignment mitk::Overlay2DLayouter::m_Alignment
protected

Definition at line 66 of file mitkOverlay2DLayouter.h.

double mitk::Overlay2DLayouter::m_Margin
protected

Definition at line 68 of file mitkOverlay2DLayouter.h.


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