ImFusion SDK 4.3
DisplayWidgetMulti Class Reference

#include <ImFusion/GUI/DisplayWidgetMulti.h>

Specialized version of DisplayWidget that manages specific views and provides an automatic layout. More...

+ Inheritance diagram for DisplayWidgetMulti:

Detailed Description

Specialized version of DisplayWidget that manages specific views and provides an automatic layout.

Other than DisplayWidget, DisplayWidgetMulti knows the specific properties of each view (e.g. 2D or 3D). It provides several convenience methods to add specific views with preset properties and overlays. Views are automatically separated into into 4 categories: 2D, 3D, MPR or Algorithm.

Algorithm views are owned by DisplayWidgetMulti and will be considered during layouting, however they are not considered by other functionality (e.g. showing Data) and are alto not modified otherwise by this class. As the name suggests they are intended to be fully maintained by an Algorithm(Controller) and show algorithm-specific data, such as plots or debugging information.

Public Types

enum  LayoutMode : int {
  LayoutRows = 0 , LayoutFocusPlusStack = 1 , LayoutFocusPlusRows = 2 , LayoutSideBySide = 3 ,
  LayoutAuto = 4 , LayoutCustom = 100
}
 
enum  LayoutFeatures : int {
  Features2DView = 1 , FeaturesMPRViews = 2 , Features3DView = 4 , FeaturesAlgorithmViews = 8 ,
  FeaturesFocus = 16 , FeaturesTopBottomRow = 32 , FeaturesAllViews = Features2DView | FeaturesMPRViews | Features3DView | FeaturesAlgorithmViews
}
 
enum class  OrientationMeshType { Cube , Head , Body , CubeQuadruped }
 
enum class  DefaultOverlays {
  None = 0 , FullscreenButton = 1 << 0 , ViewOrderButton = 1 << 1 , DataSelectionButton = 1 << 2 ,
  ViewOptionsButton = 1 << 3 , DisplayOptionsButton = 1 << 4 , PatientInfo = 1 << 5 , ScaleOverlays = 1 << 6 ,
  OrientationMesh = 1 << 7 , Histogram = 1 << 8 , PixelInfo = 1 << 9 , FpsCounter = 1 << 10 ,
  OffscreenIndicator = 1 << 11 , SliceIndex = 1 << 12 , All = 0xFFFF , FocusButton = ViewOrderButton
}
 Enumeration to select default overlays to add to a view. More...
 
enum  ViewFilter { AllViews , NoAlgorithmViews , OnlyAlgorithmViews }
 Enumeration used by a couple of convenience functions to define which views to filter during lookup. More...
 
using LayoutFunc = std::function<DisplayLayoutConfig(const std::vector<InteractiveView*>& visibleViews)>
 Returns a layout configuration containing the visibleViews.
 

Public Slots

void hideView (InteractiveView *view)
 hides view and resets the layout accordingly
 
void show2DView (bool show)
 Shows or hides the 2D view and resets the layout accordingly.
 
void showMPRViews (bool show)
 Shows or hides all MPR views and resets the layout accordingly.
 
void show3DView (bool show)
 Shows or hides the 3D view and resets the layout accordingly.
 
void showAlgorithmViews (bool show)
 Shows or hides all algorithm views and resets the layout accordingly.
 
void setLayoutMode (DisplayWidgetMulti::LayoutMode mode)
 Sets layout mode and resets the layout according to mode.
 
void maximizeView (InteractiveView *view)
 Maximizes a single view.
 
void unMaximizeView ()
 Unmaximizes the view that is currently maximized.
 
void setFocusView (InteractiveView *view)
 Moves the view to the focus if the layout supports that.
 
void resetLayout ()
 Resets the layout based on the currently selected display layout and view order configuration.
 
QString getViewName (const InteractiveView *view) const
 Returns a human-readable name describing the view.
 
- Public Slots inherited from DisplayWidget
void setRecording (bool enable, bool reset=true, bool continuous=false)
 If enabled and the recording path is not empty, all paintEvent results will be written to disk.
 
void setRecordingOutputDir (const QString &path)
 Sets the path to the output file used in the recording.
 
bool saveScreenshot (const QString &path)
 Saves the current screen content under the given path.
 
void layoutViews (bool noAnimation=false)
 Layout the views.
 
void resetLayout ()
 
void fatalError (QString errorMessage)
 
void update ()
 
void setFpsLimit (int fps)
 Limits the maximum frequency of display updates.
 
void removeFpsLimit ()
 Remove the limit on the frequency of display updates.
 
double currentFps ()
 Returns the current frame rate (independent of any FPS limit)
 
void setContainerWidget (QWidget *widget)
 Sets the widget this QWindow is wrapped in (if any).
 
QWidget * containerWidget () const
 
bool event (QEvent *event) override
 Handles any display event and hands it to corresponding views.
 
void resizeEvent (QResizeEvent *event) override
 
QPoint mapFromOpenGL (const QPoint &point) const
 Converts the point from top-left to bottom-left coordinates.
 
QPointF mapFromOpenGL (const QPointF &point) const
 
QPoint mapToOpenGL (const QPoint &point) const
 Converts the point from bottom-left to top-left coordinates.
 
QPointF mapToOpenGL (const QPointF &point) const
 

Signals

void view2DVisibilityChanged (bool visible)
 Emits true if 2D changed to visible or false otherwise.
 
void viewsMPRVisibilityChanged (bool visible)
 Emits true if a MPR view changed to visible and all MPR views are visible or false otherwise.
 
void view3DVisibilityChanged (bool visible)
 Emits true if 3D changed to visible or false otherwise.
 
void viewsAlgorithmVisibilityChanged (bool visible)
 Emits true if a algorithm view changed to visible and all algorithm views are visible or false otherwise.
 
void visibleDataChanged (const DataList &before, const DataList &now)
 Emitted when any view changes its visible data This is also emitted if the visible data is the same but there are displayed in different views now.
 
void layoutModeChanged (DisplayWidgetMulti::LayoutMode mode)
 Emitted after the layout mode has changed.
 
void customLayoutAdded (DisplayWidgetMulti::LayoutMode mode)
 Emitted after a custom layout with the given name has been added.
 
void customLayoutRemoved (DisplayWidgetMulti::LayoutMode mode)
 Emitted after a custom layout with the given name has been removed.
 
- Signals inherited from DisplayWidget
void viewAdded (InteractiveView *v)
 Emitted after a view has been added.
 
void viewRemoved (InteractiveView *v)
 Emitted after a view has been removed. This signal is not emitted when the DisplayLayout gets deleted and deletes all remaining views.
 
void viewDeleted (InteractiveView *v)
 Emitted after a view has been deleted without being removed.
 
void viewLayoutChanged ()
 Emitted when the layout of the views has changed.
 

Public Member Functions

 DisplayWidgetMulti (bool initialize=true, QWindow *parent=0)
 Creates a new empty DisplayWidgetMulti.
 
ImageView2DaddView2D (bool algorithmView=true, bool defaultOverlays=true)
 Convenience method to create and add a 2D view with default settings and returns a pointer to the newly created view.
 
void addView2D (ImageView2D *view, bool algorithmView=true, bool defaultOverlays=true)
 Add an already existing 2D view and pass ownership.
 
void addDefaultOverlays (InteractiveView &view, Flags< DefaultOverlays > overlays)
 Add the selected overlays to the view of.
 
ViewGroupaddViewGroup3D (bool algorithmView=true, bool defaultOverlays=true)
 Create and add three MPR views, 3D view combined in a ViewGroup.
 
bool addView (InteractiveView *view, bool algorithmView, bool defaultOverlays=true)
 Add an already existing view and pass ownership.
 
bool addView (InteractiveView *view) override
 Add view and pass ownership. If the view is not removed before this object is deleted it will be deleted too.
 
bool removeView (InteractiveView *view) override
 Remove view used by an algorithm. The user is responsible for deleting the view.
 
ImageView2Dview2D (int which=0)
 Access 2D views.
 
int number2DViews () const
 
std::vector< ImageView2D * > views2d ()
 
ImageView2DviewSlice (int which=0)
 Access MPR/slice views.
 
int numberSliceViews () const
 
std::vector< ImageView2D * > viewsSlice ()
 
ImageView3Dview3D (int which=0)
 Access 3D views.
 
int number3DViews () const
 
std::vector< ImageView3D * > views3d ()
 
ViewGroupviewGroup (int which=0)
 Access ViewGroups.
 
int numberViewGroups () const
 
std::vector< ViewGroup * > viewGroups ()
 
int numAlgorithmViews () const
 Access algorithm views.
 
const std::vector< InteractiveView * > & algorithmViews () const
 
bool isAlgorithmView (const InteractiveView *view) const
 Returns true if the given view is an algorithm view.
 
std::vector< InteractiveView * > views (ViewFilter viewFilter=ViewFilter::AllViews) const
 Access a set of views based on a specified filter.
 
std::vector< InteractiveView * > dataViews (const Data *data, ViewFilter viewFilter=ViewFilter::AllViews) const
 Returns all views that currently show the given image.
 
void setVisibleData (const DataList &data)
 Visualize the given data in the first 2D view and the first MPR/3D view group where applicable.
 
DataList visibleData (ViewFilter viewFilter=ViewFilter::AllViews) const
 Returns the union of the currently visible data in the specified views.
 
bool isVisible (const Data *data, ViewFilter viewFilter=ViewFilter::AllViews) const
 Whether the given data is currently visible in any of the specified views.
 
bool showData (Data *data)
 Appends data to the visible data by calling showData() on the first 2D view and the first MPR/3D view group where applicable.
 
void hideData (const Data *data, ViewFilter viewFilter=ViewFilter::AllViews)
 Removes data from the set of visible data by calling hideData() on all specified views.
 
void replaceData (Data *which, Data *with, ViewFilter viewFilter=ViewFilter::AllViews)
 Replaces all occurrence of which in the set of visible data with with in all specified views.
 
void addObject (InteractiveObject *object, InteractiveView *view)
 Add object to specified view.
 
void addObject (InteractiveObject *object, const ViewGroup *viewgroup)
 Add object to specified view group.
 
void removeObject (InteractiveObject *object, InteractiveView *view)
 Remove object from specified view.
 
void removeObject (InteractiveObject *object, const ViewGroup *viewgroup)
 Remove object from specified view group.
 
void removeObject (InteractiveObject *object)
 Remove object from all views in which it is shown.
 
std::vector< InteractiveObject * > objects (InteractiveView *view) const
 Return all objects associated with a view.
 
std::vector< InteractiveObject * > objects (const ViewGroup *viewgroup) const
 Return all objects associated with a view group.
 
std::vector< InteractiveObject * > objects (SharedImageSet *is) const
 Return all objects associated with a data set.
 
std::vector< InteractiveObject * > objects (ViewFilter viewFilter=ViewFilter::AllViews) const
 Return all objects.
 
void centerOnObject (const GlObject &object, const Data *parentData=nullptr)
 Centers views on a given object.
 
Interactive< GlSlice > * addSliceManipulator (InteractiveView *view)
 Create and add interactive object containing slice object and its manipulator to the specified view.
 
bool removeSliceManipulator (InteractiveView *view)
 Remove interactive object containing slice object and its manipulator from the specified view. Return true upon success.
 
Interactive< GlSlice > * sliceManipulator (InteractiveView *view) const
 Access a slice manipulator of a 2D view. The ownership of the interactive object remains belonging to the DisplayWidgetMulti.
 
void setShowPatientInformation (int val)
 Set where patient information should be displayed: 0=Nowhere, 1=First view only, 2=All views.
 
void setShowScaleInformation (int val)
 Set how the scale information overlay should be displayed: 0=None, 1=Horizontal, 2=Vertical, 3=Both.
 
void setShowDataSelectionButton (bool show, const DataItemModel *dataModel)
 Sets if the views should contain a button to select the visible data of the view.
 
void setShowOffscreenIndicators (bool show)
 Sets if the views should show indicators to datasets that are outside the viewing area.
 
void setShowSliceIndex (bool show)
 Sets if the views should show the slice index overlay.
 
void setShowDisplayOptionsOverlay (bool show)
 Sets if the display options overlay should be visible.
 
void setShowViewOptionsOverlay (bool show)
 Sets if the view options overlay should be visible.
 
void loadOrientationMesh ()
 Loads the orientation mesh that is specified in the settings.
 
void loadOrientationMesh (OrientationMeshType mesh)
 Loads a specified orientation mesh.
 
void addToViews (SharedImageSet *is, InteractiveObject *ia)
 Add to views.
 
void addCurvedView (SharedImageSet *is, InteractiveObject *ia)
 Add curved view.
 
bool is2DViewVisible () const
 Returns true if the first 2D view is visible.
 
bool isMPRViewsVisible () const
 Returns true if all MPR views are visible.
 
bool isAnyMPRViewVisible () const
 Returns true if any MPR view is visible.
 
bool is3DViewVisible () const
 Returns true if the first 3D view is visible.
 
bool isAlgorithmViewsVisible () const
 Returns true if all algorithm views are visible.
 
bool isMaximized (const InteractiveView *view) const
 Returns true if specified view is maximized, false otherwise.
 
const InteractiveViewfocusedView () const
 Returns the view that is currently in the focus (if the layout supports that concept)
 
GUI::DisplayAutoLayouterautoLayouter ()
 Returns the underlying DisplayAutoLayouter instance used to layout the views.
 
LayoutMode addCustomLayout (LayoutFunc layout, LayoutFeatures features, const std::string &name="")
 Adds a custom function to provide a layout for the visible views.
 
void removeCustomLayout (LayoutMode mode)
 Removes the custom layout with the specified mode.
 
LayoutFeatures layoutFeatures (LayoutMode mode)
 Returns the features that are supported by the layout or 0 if the layout does not exist.
 
std::string layoutName (LayoutMode mode)
 Returns the name of the layout.
 
LayoutMode layoutMode () const
 Returns the current layout mode.
 
DisplayLayoutConfig createRowLayout (const std::vector< InteractiveView * > &visibleViews) const
 Creates a layout with 2 rows.
 
DisplayLayoutConfig createFocusPlusStackLayout (const std::vector< InteractiveView * > &visibleViews) const
 Creates a layout with the first visible view uses half the space and the remaining views are placed on top of each other on the right.
 
DisplayLayoutConfig createFocusPlusRowsLayout (const std::vector< InteractiveView * > &visibleViews) const
 Creates a layout with the first visible view uses half the space and the remaining views are placed in two rows on the right.
 
DisplayLayoutConfig createSideBySideLayout (const std::vector< InteractiveView * > &visibleViews) const
 Creates a mirrored layout with views from scene 0 on the left and views from scene 1 on the right.
 
DisplayLayoutConfig createAutoLayout (const std::vector< InteractiveView * > &visibleViews)
 Automatically creates an appropiate layout from the number and types of views.
 
void configuration (Properties *p) const override
 Retrieve the properties of this object.
 
void configure (const Properties *p) override
 Set one or multiple properties.
 
void render (bool swapBuffers=true) override
 Deals with view groups before issuing paint.
 
void setPatientInfoFormatter (std::function< std::string(const ImageInfoDataComponent *)> formatter)
 Registers a callback that converts ImageInfoDataComponent into the patient info string displayed as an overlay.
 
void setPatientInfoFormatString (std::string fmt)
 Sets the format string used to produce the patient info overlay.
 
void setViewOrder (std::vector< InteractiveView * > viewOrder)
 Set a custom view order to be used by the display layout.
 
std::vector< InteractiveView * > viewOrder () const
 Returns the custom order of the views shown in the display layout.
 
void swapViewOrder (const InteractiveView *view1, const InteractiveView *view2)
 Swaps the position of the two given views in the display layout.
 
void moveViewToTopRow (const InteractiveView *view)
 Moves the given view to the top row for display layouts that support LayoutFeatures::FeaturesTopBottomRow.
 
void moveViewToBottomRow (const InteractiveView *view)
 Moves the given view to the bottom row for display layouts that support LayoutFeatures::FeaturesTopBottomRow.
 
- Public Member Functions inherited from DisplayWidget
 DisplayWidget (bool initialize=true, QWindow *parent=nullptr)
 Creates a new empty DisplayWidget.
 
 ~DisplayWidget () override
 Deletes all views.
 
void init ()
 Initialize the OpenGL context of this DisplayWidget.
 
void deinit ()
 Mark the display as deinitialized so that it will no longer perform any rendering.
 
void setBackgroundColor (const QColor &color)
 
QColor backgroundColor () const
 
int numViews () const
 Returns the number of views.
 
int numVisibleViews () const
 Returns the number of visible views if no view is on fullscreen.
 
InteractiveViewviewAt (int i)
 Returns the view with the index i or NULL if the view doesn't exist.
 
const InteractiveViewviewAt (int i) const
 
std::vector< InteractiveView * > views () const
 
InteractiveViewview (int which=0)
 Access an interactive view, returns nullptr if which is out of bounds.
 
bool makeCurrent ()
 Makes the underlying OpenGL context current against the QSurface of the display in the current thread.
 
void doneCurrent ()
 Deactivates any current OpenGL context in the current thread.
 
GUI::DisplayLayoutlayout ()
 
QRect viewport () const
 Returns the rendering viewport.
 
void setCustomViewport (QRect viewport)
 Sets a custom rendering viewport.
 
std::unique_ptr< TypedImage< unsigned char > > captureScreenshot (int width=0, int height=0, bool withAlpha=true)
 Capture the current content of the display into an image.
 
GUI::DisplayBasedisplayBaseAdapter ()
 Return a helper struct implementing the GUI::DisplayBase interface for this DisplayWidget instance.
 
- Public Member Functions inherited from Configurable
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 
- 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.
 

Protected Slots

void onViewVisiblityChanged () override
 A view visibility has changed.
 
void onViewVisiblityChangeRequested (bool visible) override
 A view has requested to change its visibility.
 
void onVisibleDataChanged (const DataList &before, const DataList &now)
 Called on View::visibleDataChanged and will emit DisplayWidgetMulti::visibleDataChanged.
 
void updateViewOrderButtonOverlays ()
 Updates the visibility of the focus button overlays.
 
- Protected Slots inherited from DisplayWidget
virtual void animationFinished ()
 
virtual void recordFrame ()
 
virtual void onViewVisiblityChanged ()
 
virtual void onViewVisiblityChangeRequested (bool visible)
 

Protected Member Functions

void showPatientInfo (InteractiveView *view, const std::vector< SharedImageSet * > &images)
 Show patient info stored in properties.
 
void showPatientInfo (InteractiveView *view, const std::string &patientInfo)
 Show patient info.
 
void updateOrientationMesh (const DataList &visibleData)
 
- Protected Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 

Protected Attributes

std::vector< ImageView2D * > m_view2D
 2D views of 2D images
 
std::vector< ImageView2D * > m_viewSlice
 Slice views of 3D images.
 
std::vector< ImageView3D * > m_view3D
 3D views
 
std::vector< ViewGroup * > m_viewGroups
 View groups.
 
std::vector< InteractiveView * > m_viewAlgorithm
 Views used by algorithms.
 
std::vector< InteractiveView * > m_viewSideBySide
 Views that were added by the SideBySide layout.
 
- Protected Attributes inherited from DisplayWidget
std::vector< InteractiveView * > m_views
 
std::shared_ptr< DataDisplayDispatcher > m_dataDisplayDispatcher
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Additional Inherited Members

- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Member Typedef Documentation

◆ LayoutFunc

Returns a layout configuration containing the visibleViews.

A well behaved LayoutFunc will only contain the visibleViews in the final configuration. It is also valid to ignore this list and return a layout containing other views of the DisplayWidget. This way a controller could enforce a specific fixed layout for a certain workflow. However, this should only be used for specific use cases because the user experience may degrade otherwise (e.g. user cannot hide certain views anymore). If certain view types are not supported at all by the LayoutFunc, the LayoutFeatures should be set accordingly when adding the layout.

See also
addCustomLayout

Member Enumeration Documentation

◆ LayoutFeatures

enum LayoutFeatures : int
Enumerator
Features2DView 

supports show/hide 2D view

FeaturesMPRViews 

supports show/hide MPR views

Features3DView 

supports show/hide 3D view

FeaturesAlgorithmViews 

supports show/hide algorithm views

FeaturesFocus 

supports a view being focused e.g. larger or more prominent than the rest

FeaturesTopBottomRow 

supports a view being move to top/bottom row

◆ DefaultOverlays

enum class DefaultOverlays
strong

Enumeration to select default overlays to add to a view.

Enumerator
FullscreenButton 

Button to maximize/minimize the view.

ViewOrderButton 

Button to move the view to a different position if supported by the view layout.

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.

ScaleOverlays 

Horizontal and vertical ruler overlays showing the image scale.

OrientationMesh 

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

Histogram 

Overlay showing the intensity distribution of the shown image as histogram.

PixelInfo 

Overlay showing pixel information underneath the mouse pointer of the shown image.

FpsCounter 

Overlay showing an estimate of the frames per second of the renderer.

OffscreenIndicator 

Dynamic overlay showing data that is outside of the current view area.

SliceIndex 

Overlay showing the current slice and the total slices for the view orientation.

FocusButton 
Deprecated

◆ ViewFilter

enum ViewFilter

Enumeration used by a couple of convenience functions to define which views to filter during lookup.

Enumerator
AllViews 

Consider all views during lookup.

NoAlgorithmViews 

Consider all views except for algorithm views.

OnlyAlgorithmViews 

Consider only algorithm views during lookup.

Constructor & Destructor Documentation

◆ DisplayWidgetMulti()

DisplayWidgetMulti ( bool initialize = true,
QWindow * parent = 0 )

Creates a new empty DisplayWidgetMulti.

Parameters
initializeFlag whether to fully initialize the DisplayWidget on construction. If you are embedding the DisplayWidget in a Qt window container, you need to postpone initialization to after calling QWidget::createWindowContainer. In this case, set it to false and call DisplayWidget::init() manually.
parentParent Qt window.
Warning
The constructor will throw in case that the GL::ContextManager's main context is not a GlQtContext (see class description).

Member Function Documentation

◆ addView2D() [1/2]

ImageView2D * addView2D ( bool algorithmView = true,
bool defaultOverlays = true )

Convenience method to create and add a 2D view with default settings and returns a pointer to the newly created view.

Parameters
algorithmViewUse this view as an algorithm view
defaultOverlaysFlag whether to add default overlays such as a (hidden) histogram overlay (with a property 'Histogram') and a text overlay including patient information (with a property 'PatientInfo').

◆ addView2D() [2/2]

void addView2D ( ImageView2D * view,
bool algorithmView = true,
bool defaultOverlays = true )

Add an already existing 2D view and pass ownership.

Parameters
viewa view which is to be added (ownership is passed)
algorithmViewUse this view as an algorithm view
defaultOverlaysFlag whether to add the default overlays

◆ addViewGroup3D()

ViewGroup * addViewGroup3D ( bool algorithmView = true,
bool defaultOverlays = true )

Create and add three MPR views, 3D view combined in a ViewGroup.

Note
The layout may not group those views together other than the first added group
Parameters
algorithmViewUse this view as an algorithm view
defaultOverlaysFlag whether to add the default overlays such as a (hidden) histogram overlay (with a property 'Histogram') and a text overlay including patient information (with a property 'PatientInfo'). The default patient information visibility can be configured with the 'patientInfoVisibility' setting. The 3d view include a (hidden) transfer function overlay (with a property 'TransferFunction'). All views include an orientation overlay (with property 'Orientation').

◆ addView() [1/2]

bool addView ( InteractiveView * view,
bool algorithmView,
bool defaultOverlays = true )

Add an already existing view and pass ownership.

If the view is not removed before this object is deleted it will be deleted too.

Parameters
algorithmViewUse this view as an algorithm view
defaultOverlaysFlag whether to add DefaultOverlays::FullscreenButton, DefaultOverlays::ViewOrderButton, as well as optionally DefaultOverlays::DataSelectionButton, DefaultOverlays::ViewOptionsButton, and DefaultOverlays::DisplayOptionsButton if compatible with view.

◆ addView() [2/2]

bool addView ( InteractiveView * view)
inlineoverridevirtual

Add view and pass ownership. If the view is not removed before this object is deleted it will be deleted too.

Reimplemented from DisplayWidget.

◆ removeView()

bool removeView ( InteractiveView * view)
overridevirtual

Remove view used by an algorithm. The user is responsible for deleting the view.

Reimplemented from DisplayWidget.

◆ setVisibleData()

void setVisibleData ( const DataList & data)

Visualize the given data in the first 2D view and the first MPR/3D view group where applicable.

If the current layout mode is LayoutSideBySide it will distribute data of the same type across the first and the second 2D view and MPR/3D view group, respectively. Use InteractiveView::setVisibleData() directly if you need to control in which views the data is shown.

◆ showData()

bool showData ( Data * data)

Appends data to the visible data by calling showData() on the first 2D view and the first MPR/3D view group where applicable.

See also
setVisibleData() for replacing the entire set of shown data.

◆ addSliceManipulator()

Interactive< GlSlice > * addSliceManipulator ( InteractiveView * view)

Create and add interactive object containing slice object and its manipulator to the specified view.

Returns the created object. If the specified view already contains such object, the method returns this existing object. DisplayWidgetMulti is responsible for freeing the memory of manipulator and interactive object itself. The ownership of the GlSlice is not taken over

◆ setShowPatientInformation()

void setShowPatientInformation ( int val)

Set where patient information should be displayed: 0=Nowhere, 1=First view only, 2=All views.

The patient information is displayed in an overlay in the top left corner of a view. If no patient information is the overlay gets automatically hidden.

◆ setShowScaleInformation()

void setShowScaleInformation ( int val)

Set how the scale information overlay should be displayed: 0=None, 1=Horizontal, 2=Vertical, 3=Both.

The horizontal overlay will be displayed at the bottom, the vertical overlay at the left.

◆ setShowDataSelectionButton()

void setShowDataSelectionButton ( bool show,
const DataItemModel * dataModel )

Sets if the views should contain a button to select the visible data of the view.

The available data that can be shown in a view will be retrieved from the dataModel. The dataModel is only required if show is true. Internally a ImFusion::DataViewModel is used to determine which datasets are compatible with a view.

◆ addCustomLayout()

LayoutMode addCustomLayout ( LayoutFunc layout,
LayoutFeatures features,
const std::string & name = "" )

Adds a custom function to provide a layout for the visible views.

The new layout automatically gets assigned the next unused LayoutMode starting from LayoutCustom (e.g. LayoutCustom+2 if there are already two other layouts). The new layout is not used until it is specifically set. The LayoutFeatures are an indicator which UI controls need to be enabled/disabled.

Parameters
layoutFunction that creates and returns a layout.
featuresBitwise OR'ed combination of features the layout supports
nameAn optional name for layout. Should be under 20 characters and not contain the word 'Layout'. If empty it will be set according to the mode (e.g. "Custom 2").
Returns
the mode the new layout was assigned to
See also
LayoutFunc, ViewLayoutWidget

◆ configuration()

void configuration ( Properties * p) const
overridevirtual

Retrieve the properties of this object.

Reimplemented from DisplayWidget.

◆ configure()

void configure ( const Properties * p)
overridevirtual

Set one or multiple properties.

Reimplemented from DisplayWidget.

◆ render()

void render ( bool swapBuffers = true)
overridevirtual

Deals with view groups before issuing paint.

Reimplemented from DisplayWidget.

◆ setPatientInfoFormatString()

void setPatientInfoFormatString ( std::string fmt)

Sets the format string used to produce the patient info overlay.

Placeholders are surrounded by curly {} braces, available placeholders are: patient_name, birthdate, study_date, study_time, modality, patient_sex

Example:

setPatientInfoFormatString("{modality}: {patient_name}({patient_sex}) - {study_date} {study_time}")
void setPatientInfoFormatString(std::string fmt)
Sets the format string used to produce the patient info overlay.

◆ visibleDataChanged

void visibleDataChanged ( const DataList & before,
const DataList & now )
signal

Emitted when any view changes its visible data This is also emitted if the visible data is the same but there are displayed in different views now.

before always contains all datasets that where visible before the current change. now contains the currently visible data.

◆ setFocusView

void setFocusView ( InteractiveView * view)
slot

Moves the view to the focus if the layout supports that.

If the focus view changes, the layout gets reset.

◆ getViewName

QString getViewName ( const InteractiveView * view) const
slot

Returns a human-readable name describing the view.

This name is not meant to be a unique identifier for the corresponding view.

◆ setViewOrder()

void setViewOrder ( std::vector< InteractiveView * > viewOrder)

Set a custom view order to be used by the display layout.

viewOrder must contain only views that are part of this DisplayWidget. Missing views will be appended to the end of the view order in the order they were originally created.

◆ onViewVisiblityChanged

void onViewVisiblityChanged ( )
overrideprotectedslot

A view visibility has changed.

Emits the view*VisibilityChanged signal if necessary.

◆ onViewVisiblityChangeRequested

void onViewVisiblityChangeRequested ( bool visible)
overrideprotectedslot

A view has requested to change its visibility.

The visibility of the view is set as requested and the layout is reset.


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