![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GUI/RadiologyViewGroup.h>
Convenience class to setup a set of views typically available in radiology workstations. More...
Inheritance diagram for RadiologyViewGroup:Convenience class to setup a set of views typically available in radiology workstations.
This class will create a total of 5 views and add them to the parent display passed during construction:
In addition it provides a series of convenience functionality for these views:
The relationship between RadiologyViewGroup and its views is bi-directional: you can call SliceView::viewGroup() and VolumeView::viewGroup() to query its siblings.
Since it is such a common use case, the Display interface provides a virtual member function Display::mainViewGroup() to be implemented by subclasses. This enables generic code to show data on the main views if available.
Public Types | |
| enum class | Link { None = 0 , Everything = 0xFFFF , ZoomFactor = 1 << 0 , ZoomMode = 1 << 1 , Interpolation = 1 << 2 , Flip = 1 << 3 , BlendingMode = 1 << 4 , BlendingFactor = 1 << 5 } |
| Enumeration of properties that can be linked between the axial, sagittal, and coronal MPR views. More... | |
Public Member Functions | |
| RadiologyViewGroup (Display &display) | |
| SliceIndicator & | mprIndicators () |
| Returns the SliceIndicator instance used to visualize the position/extent of the MPR views in all other MPR and 3D views. | |
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. | |
Access to the views | |
| std::vector< View * > | views () const |
| Returns all views of this view group. | |
| std::vector< SliceView * > | mprViews () |
| Returns the three MPR views of this group. | |
| std::vector< View * > | dataViews (const Data *dataset) const |
| Returns all views that currently have dataset as their visible data. | |
| SliceView & | view2d () |
| Returns the SliceView for showing 2D data. | |
| SliceView & | viewAxial () |
| Returns the axial MPR SliceView for showing 3D data. | |
| SliceView & | viewSagittal () |
| Returns the sagittal MPR SliceView for showing 3D data. | |
| SliceView & | viewCoronal () |
| Returns the coronal MPR SliceView for showing 3D data. | |
| VolumeView & | view3d () |
| Returns the VolumeView for showing 3D data. | |
Show/hide datasets in this view group | |
| int | showData (Data *dataset) |
| Appends data to the visible data on all compatible views of this group by calling showData() on them. | |
| void | hideData (const Data *dataset) |
| Removes data from the set of visible data by calling hideData() on all specified views comprising this group. | |
| void | replaceData (Data *which, Data *with) |
| Replaces all occurrence of which in the set of visible data with with in all views comprising this group. | |
| void | setVisibleData (const DataList &datasets) |
| Replace the visible data of all views with the one in datasets. | |
| DataList | visibleData () const |
| Returns the union of the currently visible data in all views comprising this group. | |
Show/hide ViewObjects and GlObjects in this view group | |
| void | addObject (ViewObject *object) |
| Convenience function to add object to all views of this view group. | |
| void | addObject (GlObject *object) |
| Convenience function to add object to all views of this view group. | |
| void | removeObject (ViewObject *object) |
| Convenience function to remove object from all views of this view group. | |
| void | removeObject (GlObject *object) |
| Convenience function to remove object from all views of this view group. | |
Conduct actions on the views | |
| void | reset (Flags< SliceView::ResetOptions > sliceResetOptions=SliceView::ResetOptions::Everything, Flags< VolumeView::ResetOptions > volumeResetOptions=VolumeView::ResetOptions::Everything) |
| Performs a reset of all views comprising this group according to the given reset options by calling SliceView::reset() / VolumeView::reset(). | |
| void | centerOnData (const Data &dataset, bool suppressAnimation=false) |
| Reset view matrices of MPR and 3D views so that they are centered on the provided dataset. | |
| void | centerOnLocation (const vec3 &point, std::optional< vec3 > axialViewNormal=std::nullopt, bool suppressAnimation=false) |
| Center the three MPR views and the volume view on the given point optionally also adjusting the rotational part. | |
| void | setMprViewMatrices (const mat4 &matrix, bool suppressAnimation=false) |
| Sets the matrix of each MPR view according to their original plane. | |
| void | alignMprViewsToVoxelGrid (bool suppressAnimation=false) |
| Aligns all MPR views to the main axes of the first shown volume. | |
| std::optional< vec3 > | intersectionCenter () const |
Return the world coordinate where all three slice views intersect or nullopt in case no intersection exists. | |
MPR view linking | |
| Flags< Link > | mprLinks () const |
| Returns the set of properties that should be linked between the three MPR views. | |
| void | setMprLinks (Flags< Link > value) |
| Sets the set of properties that should be linked between the three MPR views. | |
Additional Inherited Members | |
Protected Member Functions inherited from SignalReceiver | |
| void | disconnectAll () |
| Disconnects all existing connections. | |
|
strong |
Enumeration of properties that can be linked between the axial, sagittal, and coronal MPR views.
| Enumerator | |
|---|---|
| None | Synchronize none of the below. |
| Everything | Synchronize all of the below. |
| ZoomFactor | Synchronize SliceView::zoomFactor() |
| ZoomMode | Synchronize SliceView::zoomMode() |
| Interpolation | Synchronize SliceView::interpolationMode() |
| Flip | Synchronize SliceView::flipY() |
| BlendingMode | Synchronize SliceView::blendingMode() |
| BlendingFactor | Synchronize SliceView::blendingFactor() |
| int showData | ( | Data * | dataset | ) |
Appends data to the visible data on all compatible views of this group by calling showData() on them.
| void setMprViewMatrices | ( | const mat4 & | matrix, |
| bool | suppressAnimation = false ) |
Sets the matrix of each MPR view according to their original plane.
The rotation part of matrix sets the rotation of the axial view, the sagittal and coronal views according to their GlSliceView::originalPlaneMatrix(). The tranlational part of matrix defines the intersection point of the three MPR views.