Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkStatusBar.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 mitkStatusBar_h
14 #define mitkStatusBar_h
16 #include <MitkCoreExports.h>
17 #include <itkObject.h>
18 #include <mitkPoint.h>
19 #include <mitkTimeGeometry.h>
20 #include <itkIndex.h>
21 
22 namespace mitk
23 {
24  //##Documentation
25  //## @brief Sending a message to the applications StatusBar
26  //##
27  //## Holds a GUI dependent StatusBarImplementation and sends the text further.
28  //## nearly equal to itk::OutputWindow,
29  //## no Window, but one line of text and a delay for clear.
30  //## all mitk-classes use this class to display text on GUI-StatusBar.
31  //## The mainapplication has to set the internal held StatusBarImplementation with SetInstance(..).
32  //## @ingroup Interaction
33  class MITKCORE_EXPORT StatusBar : public itk::Object
34  {
35  public:
36  itkTypeMacro(StatusBar, itk::Object);
37 
38  //##Documentation
39  //## @brief static method to get the GUI dependent StatusBar-instance
40  //## so the methods DisplayText, etc. can be called
41  //## No reference counting, cause of decentral static use!
43 
44  //##Documentation
45  //## @brief Supply a GUI- dependent StatusBar. Has to be set by the application
46  //## to connect the application dependent subclass of mitkStatusBar
47  //## if you create an instance, then call ->Delete() on the supplied
48  //## instance after setting it.
50 
51  //##Documentation
52  //## @brief Send a string to the applications StatusBar
53  void DisplayText(const char *t);
54  //##Documentation
55  //## @brief Send a string with a time delay to the applications StatusBar
56  void DisplayText(const char *t, int ms);
57  void DisplayErrorText(const char *t);
58  void DisplayWarningText(const char *t);
59  void DisplayWarningText(const char *t, int ms);
60  void DisplayGenericOutputText(const char *t);
61  void DisplayDebugText(const char *t);
62  void DisplayGreyValueText(const char *t);
63 
64  //##Documentation
66  //## @brief Display position, index, time and pixel value
67  void DisplayImageInfo(Point3D point, itk::Index<3> index, TimePointType time, ScalarType pixelValue);
68  //## @brief Display rotation, index, time and custom pixel value
69  void DisplayImageInfo(Point3D point, itk::Index<3> index, TimePointType time, const char* pixelValue);
70  //## @brief Display placeholder text for invalid information
72 
73  //##Documentation
74  //## @brief removes any temporary message being shown.
75  void Clear();
76 
77  //##Documentation
78  //## @brief Set the SizeGrip of the window
79  //## (the triangle in the lower right Windowcorner for changing the size)
80  //## to enabled or disabled
81  void SetSizeGripEnabled(bool enable);
82 
83  protected:
85  ~StatusBar() override;
86 
89  };
90 
91 } // end namespace mitk
92 #endif
#define MITKCORE_EXPORT
GUI independent Interface for all Gui dependent implementations of a StatusBar.
Sending a message to the applications StatusBar.
Definition: mitkStatusBar.h:34
void DisplayGreyValueText(const char *t)
static StatusBarImplementation * m_Implementation
Definition: mitkStatusBar.h:87
~StatusBar() override
void DisplayImageInfo(Point3D point, itk::Index< 3 > index, TimePointType time, ScalarType pixelValue)
void DisplayText(const char *t, int ms)
Send a string with a time delay to the applications StatusBar.
void DisplayWarningText(const char *t, int ms)
void DisplayText(const char *t)
Send a string to the applications StatusBar.
void DisplayImageInfoInvalid()
void DisplayWarningText(const char *t)
void DisplayDebugText(const char *t)
void DisplayErrorText(const char *t)
void Clear()
removes any temporary message being shown.
static void SetImplementation(StatusBarImplementation *instance)
Supply a GUI- dependent StatusBar. Has to be set by the application to connect the application depend...
void DisplayRendererInfo(Point3D point, TimePointType time)
void SetSizeGripEnabled(bool enable)
Set the SizeGrip of the window (the triangle in the lower right Windowcorner for changing the size) t...
static StatusBar * m_Instance
Definition: mitkStatusBar.h:88
void DisplayImageInfo(Point3D point, itk::Index< 3 > index, TimePointType time, const char *pixelValue)
void DisplayGenericOutputText(const char *t)
static StatusBar * GetInstance()
static method to get the GUI dependent StatusBar-instance so the methods DisplayText,...
Find image slices visible on a given plane.
mitk::ScalarType TimePointType
double ScalarType