|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Overlay displaying a scale bar in a render window. More...
#include <QmitkScalarBarOverlay.h>


Public Member Functions | |
| QmitkScalarBarOverlay (const char *id) | |
| Constructor. Creates the internal QmitkScalarBar widget. More... | |
| ~QmitkScalarBarOverlay () override | |
| Destructor. Removes the property observer. More... | |
| void | GenerateData (mitk::PropertyList::Pointer pl) override |
| Configures the scalar bar overlay from the given PropertyList. More... | |
| QSize | GetNeededSize () override |
| Returns the current size of the scalar bar widget. More... | |
Public Member Functions inherited from QmitkOverlay | |
| QmitkOverlay (const char *id) | |
| Constructor. More... | |
| ~QmitkOverlay () override | |
| Destructor. Deletes the internal widget unless it was set externally. More... | |
| virtual void | SetPosition (DisplayPosition pos) |
| Sets the display position of this overlay. More... | |
| virtual DisplayPosition | GetPosition () |
| Returns the current display position. More... | |
| virtual void | SetLayer (unsigned int layer) |
| Sets the stacking layer of this overlay. More... | |
| virtual unsigned int | GetLayer () |
| Returns the current stacking layer. More... | |
| virtual QWidget * | GetWidget () |
| Returns the internal QWidget representing this overlay. More... | |
Protected Member Functions | |
| void | GetProperties (mitk::PropertyList::Pointer pl) |
| Reads visual properties (color) from the PropertyList and applies them. More... | |
| void | SetupCallback (mitk::BaseProperty::Pointer prop) |
| Sets up an ITK observer on the given property to auto-update the scale factor. More... | |
| void | SetScaleFactor () |
| Reads the scale factor property and applies it to the scalar bar. More... | |
Protected Member Functions inherited from QmitkOverlay | |
| void | AddDropShadow (QWidget *widget) |
| Adds a drop shadow graphics effect to the given widget. More... | |
Protected Attributes | |
| QmitkScalarBar * | m_ScalarBar |
| The internal QmitkScalarBar widget. More... | |
| mitk::BaseProperty::Pointer | m_ObservedProperty |
| The observed property for automatic updates. More... | |
| mitk::PropertyList::Pointer | m_PropertyList |
| Cached PropertyList for property lookups. More... | |
| unsigned long | m_ObserverTag |
| ITK observer tag for the property modification callback. More... | |
Protected Attributes inherited from QmitkOverlay | |
| const char * | m_Id |
| ID of the overlay, used as property key for lookups. More... | |
| DisplayPosition | m_Position |
| Current display position of the overlay. More... | |
| unsigned int | m_Layer |
| Stacking layer of the overlay. More... | |
| QWidget * | m_Widget |
| Internal QWidget representing the overlay content. More... | |
| bool | m_WidgetIsCustom |
| Flag indicating whether the widget was set externally (custom overlay). More... | |
Additional Inherited Members | |
Public Types inherited from QmitkOverlay | |
| enum | DisplayPosition { top_Left , top_Center , top_Right , middle_Left , middle_Right , bottom_Left , bottom_Center , bottom_Right } |
| Enumeration of all possible display positions in a render window. More... | |
Overlay displaying a scale bar in a render window.
This overlay wraps a QmitkScalarBar widget and configures it based on properties from a mitk::PropertyList. The scale factor is read from the property identified by the overlay's ID (as a float property), and the color is read from the "overlay.color" property.
The overlay registers an observer on the scale property so that the bar updates automatically when the property value changes.
Definition at line 41 of file QmitkScalarBarOverlay.h.
| QmitkScalarBarOverlay::QmitkScalarBarOverlay | ( | const char * | id | ) |
Constructor. Creates the internal QmitkScalarBar widget.
| [in] | id | String identifier used to look up the scale factor property. |
|
override |
Destructor. Removes the property observer.
|
overridevirtual |
Configures the scalar bar overlay from the given PropertyList.
Reads overlay-specific properties (color, scale factor) and sets up an observer for automatic updates when the scale property changes.
| [in] | pl | The PropertyList containing the configuration properties. |
Reimplemented from QmitkOverlay.
|
overridevirtual |
Returns the current size of the scalar bar widget.
Implements QmitkOverlay.
|
protected |
Reads visual properties (color) from the PropertyList and applies them.
Reads the "overlay.color" property and configures the pen of the internal QmitkScalarBar accordingly. Falls back to a default color if the property is missing.
| [in] | pl | The PropertyList to read properties from. |
|
protected |
Reads the scale factor property and applies it to the scalar bar.
The scale factor is read from the property identified by m_Id. Falls back to a default value of 2 if the property is not found.
|
protected |
Sets up an ITK observer on the given property to auto-update the scale factor.
| [in] | prop | The property to observe for modifications. |
|
protected |
The observed property for automatic updates.
Definition at line 100 of file QmitkScalarBarOverlay.h.
|
protected |
ITK observer tag for the property modification callback.
Definition at line 106 of file QmitkScalarBarOverlay.h.
|
protected |
Cached PropertyList for property lookups.
Definition at line 103 of file QmitkScalarBarOverlay.h.
|
protected |
The internal QmitkScalarBar widget.
Definition at line 97 of file QmitkScalarBarOverlay.h.