![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GUI/DisplayWidgetMulti.h>
Specialized version of DisplayWidget that manages specific views and provides an automatic layout. More...
Inheritance diagram for DisplayWidgetMulti: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. | |
| 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. | |
| 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. | |
| ViewGroup * | addViewGroup3D (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. | |
| ImageView2D * | view2D (int which=0) |
| Access 2D views. | |
| int | number2DViews () const |
| std::vector< ImageView2D * > | views2d () |
| ImageView2D * | viewSlice (int which=0) |
| Access MPR/slice views. | |
| int | numberSliceViews () const |
| std::vector< ImageView2D * > | viewsSlice () |
| ImageView3D * | view3D (int which=0) |
| Access 3D views. | |
| int | number3DViews () const |
| std::vector< ImageView3D * > | views3d () |
| ViewGroup * | viewGroup (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 InteractiveView * | focusedView () const |
| Returns the view that is currently in the focus (if the layout supports that concept) | |
| GUI::DisplayAutoLayouter & | autoLayouter () |
| 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. | |
| InteractiveView * | viewAt (int i) |
| Returns the view with the index i or NULL if the view doesn't exist. | |
| const InteractiveView * | viewAt (int i) const |
| std::vector< InteractiveView * > | views () const |
| InteractiveView * | view (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::DisplayLayout * | layout () |
| 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::DisplayBase & | displayBaseAdapter () |
| 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 | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (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. | |
| SignalReceiver & | operator= (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< Param > | m_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. | |
| using LayoutFunc = std::function<DisplayLayoutConfig(const std::vector<InteractiveView*>& visibleViews)> |
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.
| enum LayoutFeatures : int |
|
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 | |
| enum ViewFilter |
| DisplayWidgetMulti | ( | bool | initialize = true, |
| QWindow * | parent = 0 ) |
Creates a new empty DisplayWidgetMulti.
| initialize | Flag 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. |
| parent | Parent Qt window. |
| 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.
| algorithmView | Use this view as an algorithm view |
| defaultOverlays | Flag 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'). |
| void addView2D | ( | ImageView2D * | view, |
| bool | algorithmView = true, | ||
| bool | defaultOverlays = true ) |
Add an already existing 2D view and pass ownership.
| view | a view which is to be added (ownership is passed) |
| algorithmView | Use this view as an algorithm view |
| defaultOverlays | Flag whether to add the default overlays |
| ViewGroup * addViewGroup3D | ( | bool | algorithmView = true, |
| bool | defaultOverlays = true ) |
Create and add three MPR views, 3D view combined in a ViewGroup.
| algorithmView | Use this view as an algorithm view |
| defaultOverlays | Flag 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'). |
| 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.
| algorithmView | Use this view as an algorithm view |
| defaultOverlays | Flag whether to add DefaultOverlays::FullscreenButton, DefaultOverlays::ViewOrderButton, as well as optionally DefaultOverlays::DataSelectionButton, DefaultOverlays::ViewOptionsButton, and DefaultOverlays::DisplayOptionsButton if compatible with 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.
|
overridevirtual |
Remove view used by an algorithm. The user is responsible for deleting the view.
Reimplemented from DisplayWidget.
| 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.
| 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.
| 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
| 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.
| 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.
| 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.
| 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.
| layout | Function that creates and returns a layout. |
| features | Bitwise OR'ed combination of features the layout supports |
| name | An 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"). |
|
overridevirtual |
Retrieve the properties of this object.
Reimplemented from DisplayWidget.
|
overridevirtual |
Set one or multiple properties.
Reimplemented from DisplayWidget.
|
overridevirtual |
Deals with view groups before issuing paint.
Reimplemented from DisplayWidget.
| 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:
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.
|
slot |
Moves the view to the focus if the layout supports that.
If the focus view changes, the layout gets reset.
|
slot |
Returns a human-readable name describing the view.
This name is not meant to be a unique identifier for the corresponding view.
| 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.
|
overrideprotectedslot |
A view visibility has changed.
Emits the view*VisibilityChanged signal if necessary.
|
overrideprotectedslot |
A view has requested to change its visibility.
The visibility of the view is set as requested and the layout is reset.