ImFusion SDK 4.3
RadiologyViewOverlays Class Reference

#include <ImFusion/GUI/RadiologyViewOverlays.h>

Helper class to create and manage ViewOverlays commonly shown in radiology workstations. More...

+ Inheritance diagram for RadiologyViewOverlays:

Detailed Description

Helper class to create and manage ViewOverlays commonly shown in radiology workstations.

Public Types

enum  OverlayType {
  NoOverlays = 0 , FullscreenButton = 1 << 0 , ViewOrderButton = 1 << 1 , DataSelectionButton = 1 << 2 ,
  ViewOptionsButton = 1 << 3 , DisplayOptionsButton = 1 << 4 , PatientInfo = 1 << 5 , HorizontalScale = 1 << 6 ,
  VerticalScale = 1 << 7 , OrientationMesh = 1 << 8 , Histogram = 1 << 9 , PixelInfo = 1 << 10 ,
  FpsCounter = 1 << 11 , OffscreenIndicator = 1 << 12 , AllOverlays = 0xFFFF
}
 Enumeration to select default overlays to add to a view. More...
 
enum class  OrientationMeshType { Cube , Head , Body , CubeQuadruped }
 Enumeration of available meshes to show in the OrientationOverlay. More...
 
using PatientInfoFormatter = std::function<std::string(const ImageInfoDataComponent&)>
 Alias for a formatting function to be used with the PatientInfo overlay.
 

Public Member Functions

 RadiologyViewOverlays (DisplayBase *display, DisplayAutoLayouter *autoLayouter, DataModel *dataModel)
 Creates a new RadiologyViewOverlays instance.
 
void addOverlays (View &view, Flags< OverlayType > overlayTypes)
 Create and add the given overlayTypes the the given view.
 
void addOverlays (std::vector< View * > views, Flags< OverlayType > overlayTypes)
 Create and add the given overlayTypes the the given set of views.
 
bool removeOverlay (View &view, OverlayType type)
 Removes a ViewOverlay that was previously created through addOverlays().
 
bool isOverlayVisible (const View &view, OverlayType type) const
 Returns if the given overlay is visible in the given view.
 
void setOverlayVisibility (const View &view, OverlayType type, bool isVisible)
 Sets the visibility of the given overlay in the given view.
 
void setOverlayVisibility (OverlayType type, bool isVisible)
 Sets the visibility of the given overlay in all known views.
 
void setPatientInfoFormatter (PatientInfoFormatter formatter)
 Defines the content of the PatientInfo overlay based on a formatting function.
 
void setPatientInfoFormatString (const std::string &formatString)
 Defines the content of the PatientInfo overlay based on a format string.
 
OrientationMeshType orientationMeshType () const
 Returns the mesh to be used in the OrientationMesh overlay.
 
void setOrientationMeshType (OrientationMeshType value)
 Sets the mesh to be used in the OrientationMesh overlay.
 
ViewOverlaygetOverlay (const View &view, OverlayType type)
 
const ViewOverlaygetOverlay (const View &view, OverlayType type) const
 
ButtonOverlaygetFullscreenButtonOverlay (const View &view)
 Convenience function to access the ButtonOverlay for toggling fullscreen mode of the given view if present.
 
ButtonOverlaygetViewOrderButtonOverlay (const View &view)
 Convenience function to access the ButtonOverlay for rearranging the view order of the given view if present.
 
ButtonOverlaygetDataSelectionButtonOverlay (const View &view)
 Convenience function to access the ButtonOverlay for rearranging the view order of the given view if present.
 
InteractiveViewOptionsOverlaygetViewOptionsButtonOverlay (const View &view)
 Convenience function to access the ButtonOverlay for rearranging the view order of the given view if present.
 
InteractiveViewOptionsOverlaygetDisplayOptionsButtonOverlay (const View &view)
 Convenience function to access the ButtonOverlay for rearranging the view order of the given view if present.
 
OrientationMeshOverlaygetOrientationMeshOverlay (const View &view)
 Convenience function to access the OrientationMeshOverlay of the given view if present.
 
ViewOverlaygetPatientInfoOverlay (const View &view)
 Convenience function to access the horizontal ScaleOverlay of the given view if present.
 
ScaleOverlaygetHorizontalScaleOverlay (const View &view)
 Convenience function to access the horizontal ScaleOverlay of the given view if present.
 
ScaleOverlaygetVerticalScaleOverlay (const View &view)
 Convenience function to access the vertical ScaleOverlay of the given view if present.
 
OffscreenIndicatorsOverlaygetOffscreenIndicatorsOverlay (const View &view)
 Convenience function to access the OffscreenIndicatorsOverlay of the given view if present.
 
HistogramOverlaygetHistogramOverlay (const View &view)
 Convenience function to access the HistogramOverlay of the given view if present.
 
PixelInfoOverlaygetPixelInfoOverlay (const View &view)
 Convenience function to access the PixelInfoOverlay of the given view if present.
 
ViewOverlaygetFpsCounterOverlay (const View &view)
 Convenience function to access the FpsCounter overlay of the given view if present.
 
- Public Member Functions inherited from SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
 
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
 
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.
 

Additional Inherited Members

- Protected Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 

Member Enumeration Documentation

◆ OverlayType

Enumeration to select default overlays to add to a view.

Enumerator
FullscreenButton 

Button to maximize/minimize the view; requires DisplayAutoLayouter.

ViewOrderButton 

Button to move the view to a different position in the view layout; requires DisplayAutoLayouter.

DataSelectionButton 

Button to select the visible data from the DataModel.

ViewOptionsButton 

Button to show a popup for configuring view options.

DisplayOptionsButton 

Button to show a popup for configuring display options.

PatientInfo 

Text overlay showing patient information.

HorizontalScale 

Horizontal ruler overlay showing the image scale; only applicable to SliceViews.

VerticalScale 

Vertical ruler overlay showing the image scale; only applicable to SliceViews.

OrientationMesh 

Overlay showing the orientation of the shown data (e.g. in form of a cube)

Histogram 

Shows the intensity distribution of the shown image as histogram; only applicable to SliceViews.

PixelInfo 

Shows image pixel information underneath the mouse pointer; only applicable to SliceViews.

FpsCounter 

Shows an estimate of the frames per second of the renderer.

OffscreenIndicator 

Dynamic overlay showing data that is outside of the current view area; only applicable to SliceViews.

◆ OrientationMeshType

enum class OrientationMeshType
strong

Enumeration of available meshes to show in the OrientationOverlay.

Enumerator
Cube 

Shows a cube where the faces have the letters A/P/L/R/F/H.

Head 

Shows a depiction of a human head.

Body 

Shows a depiction of a human body.

CubeQuadruped 

Shows a cube where the faces have the letters D/V/LE/RT/RC/CD.

Constructor & Destructor Documentation

◆ RadiologyViewOverlays()

RadiologyViewOverlays ( DisplayBase * display,
DisplayAutoLayouter * autoLayouter,
DataModel * dataModel )

Creates a new RadiologyViewOverlays instance.

All parameters are optional for this class in general but required for certain overlay types.

Parameters
displayPointer to the parent display, required for the ViewOptionsButton and DisplayOptionsButton to be available.
autoLayouterPointer to the DisplayAutoLayouter of the parent display, required for the FullscreenButton and ViewOrderButton to be available.
dataModelPointer to an DataModel used by the parent application, required for the DataSelectionButton to be available.

Member Function Documentation

◆ addOverlays() [1/2]

void addOverlays ( View & view,
Flags< OverlayType > overlayTypes )

Create and add the given overlayTypes the the given view.

Exceptions
std::runtime_errorin case:
  • overlayTypes contains ViewOptionsButton or DisplayOptionsButton and no DisplayBase was provided during construction.
  • overlayTypes contains FullscreenButton or ViewOrderButton and no DisplayAutoLayouter was provided during construction.
  • overlayTypes contains DataSelectionButton and no DataModel was provided during construction.

◆ addOverlays() [2/2]

void addOverlays ( std::vector< View * > views,
Flags< OverlayType > overlayTypes )

Create and add the given overlayTypes the the given set of views.

Exceptions
std::runtime_errorin case:
  • overlayTypes contains ViewOptionsButton or DisplayOptionsButton and no DisplayBase was provided during construction.
  • overlayTypes contains FullscreenButton or ViewOrderButton and no DisplayAutoLayouter was provided during construction.
  • overlayTypes contains DataSelectionButton and no DataModel was provided during construction.

◆ removeOverlay()

bool removeOverlay ( View & view,
OverlayType type )

Removes a ViewOverlay that was previously created through addOverlays().

Returns true if successful or false if an overlay of the given type was not found for the given view.

◆ setPatientInfoFormatString()

void setPatientInfoFormatString ( const std::string & formatString)

Defines the content of the PatientInfo overlay based on a format string.

The format string can contain placeholders using the syntax {placeholder}, where "placeholder" is one of the following: patient_name, birthdate, study_date, study_time, modality, patient_sex.

Example (also the default formatting string after construction):

setPatientInfoFormatString("{modality}: {patient_name} ({patient_sex}) - {study_date} {study_time}")
void setPatientInfoFormatString(const std::string &formatString)
Defines the content of the PatientInfo overlay based on a format string.

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close