Computer Assited Medical Intervention Tool Kit
version 4.1
|
The views manager. More...
#include <MedicalImageViewer.h>
Inherits camitk::Viewer.
Public Types | |
enum | LayoutVisibility { VIEWER_ALL, VIEWER_3D, VIEWER_AXIAL, VIEWER_CORONAL, VIEWER_SAGITTAL, VIEWER_ARBITRARY } |
describes the possible currently displayed InteractiveViewer More... | |
Public Slots | |
void | synchronizeSelection () |
called when an internal InteractiveViewers has emitted a selectionChanged signal More... | |
Public Member Functions | |
void | setVisibleViewer (LayoutVisibility) |
called to change the layout, i.e. which viewer is visible More... | |
~MedicalImageViewer () override | |
destructor More... | |
Viewer inherited | |
unsigned int | numberOfViewedComponent () override |
void | refresh (Viewer *whoIsAsking=nullptr) override |
refresh the view (can be interesting to know which other viewer is calling this) More... | |
QWidget * | getWidget (QWidget *parent=nullptr) override |
get the viewer widget. More... | |
QObject * | getPropertyObject () override |
get the propertyObject (only the 3D Scene one) More... | |
QMenu * | getMenu () override |
get the viewer menu More... | |
QToolBar * | getToolBar () override |
get the viewer toolbar More... | |
virtual void | setToolbarAutoVisibility (bool) |
force toolbar visibility. More... | |
Public Member Functions inherited from camitk::Viewer | |
virtual void | refreshInterfaceNode (Component *comp) |
Update the whole tree of the representation of the Component. More... | |
Viewer (QString name) | |
default constructor More... | |
~Viewer () override=default | |
default destructor More... | |
Static Public Member Functions | |
static MedicalImageViewer * | getInstance () |
get singleton instance More... | |
Protected Member Functions | |
MedicalImageViewer () | |
Protected construtor (singleton) More... | |
Protected Member Functions inherited from camitk::Viewer | |
void | clearSelection () |
clear the selection More... | |
void | selectionChanged (ComponentList &compSet) |
The selection has changed to the given ComponentList. More... | |
void | selectionChanged (Component *comp) |
the selection has changed to be just one comp More... | |
Private Member Functions | |
void | updateLayout () |
set the current visibility of the different viewer More... | |
Private Attributes | |
bool | autoUpdateToolbarVisibility |
if true, the toolbar automatically updated More... | |
unsigned int | displayedTopLevelComponents |
number of top-level component that are currently displayed More... | |
QFrame * | frame |
the main widget More... | |
QGridLayout * | frameLayout |
The main layout. More... | |
QVBoxLayout * | topLeftLayout |
the layout for the arbitrary/axial at the top left position of frameLayout More... | |
QMenu * | viewerMenu |
the QMenu for the MedicalImageViewer More... | |
QMap< LayoutVisibility, Viewer * > | viewers |
contains all InteractiveViewer instance (access them by LayoutVisibility) More... | |
QList< LayoutVisibility > | viewerVisibility |
viewer visibility enum More... | |
LayoutVisibility | visibleLayout |
which viewer(s) is/are currently visible More... | |
Static Private Attributes | |
static MedicalImageViewer * | singleton = nullptr |
the default instance (singleton) More... | |
Additional Inherited Members | |
Signals inherited from camitk::Viewer | |
void | selectionChanged () |
this signal is emitted when the current selection was changed by the viewer More... | |
The views manager.
MedicalImageViewer is a viewer that can display from 1 to 4 InteractiveViewer that represents the axial, coronal, sagittal and 3D view of the same medical image. The views used the default InteractiveViewers singletons.
This class follow the "singleton" design pattern, see getInstance(). Singleton is enforced/recommanded so that actions can directly use the show*Viewer() methods
describes the possible currently displayed InteractiveViewer
Enumerator | |
---|---|
VIEWER_ALL | All InteractiveViewer are visible. |
VIEWER_3D | Only the 3D InteractiveViewer are visible. |
VIEWER_AXIAL | Only the axial InteractiveViewer are visible. |
VIEWER_CORONAL | Only the coronal InteractiveViewer are visible. |
VIEWER_SAGITTAL | Only the sagittal InteractiveViewer are visible. |
VIEWER_ARBITRARY | Only the arbitrary InteractiveViewer are visible. |
|
override |
destructor
References frame.
|
protected |
Protected construtor (singleton)
References autoUpdateToolbarVisibility, displayedTopLevelComponents, frame, frameLayout, VIEWER_3D, viewerMenu, and visibleLayout.
Referenced by getInstance().
|
static |
get singleton instance
References MedicalImageViewer(), and singleton.
|
overridevirtual |
get the viewer menu
Reimplemented from camitk::Viewer.
References camitk::Application::getAction(), camitk::Action::getQAction(), VIEWER_ALL, viewerMenu, viewers, and viewerVisibility.
|
overridevirtual |
get the propertyObject (only the 3D Scene one)
Reimplemented from camitk::Viewer.
References camitk::InteractiveViewer::get3DViewer(), and camitk::InteractiveViewer::getPropertyObject().
|
overridevirtual |
get the viewer toolbar
Reimplemented from camitk::Viewer.
References VIEWER_3D, and viewers.
Referenced by setToolbarAutoVisibility(), and updateLayout().
|
overridevirtual |
get the viewer widget.
parent | the parent widget for the viewer widget |
Implements camitk::Viewer.
References frame, frameLayout, camitk::InteractiveViewer::get3DViewer(), camitk::InteractiveViewer::getArbitraryViewer(), camitk::InteractiveViewer::getAxialViewer(), camitk::InteractiveViewer::getCoronalViewer(), camitk::InteractiveViewer::getSagittalViewer(), camitk::Viewer::selectionChanged(), synchronizeSelection(), topLeftLayout, updateLayout(), VIEWER_3D, VIEWER_ALL, VIEWER_ARBITRARY, VIEWER_AXIAL, VIEWER_CORONAL, VIEWER_SAGITTAL, viewers, and viewerVisibility.
|
overridevirtual |
returns the number of Component that are displayed by this viewer
Implements camitk::Viewer.
References VIEWER_ALL, viewers, and viewerVisibility.
Referenced by refresh().
|
overridevirtual |
refresh the view (can be interesting to know which other viewer is calling this)
Implements camitk::Viewer.
References displayedTopLevelComponents, camitk::InteractiveViewer::getAxialViewer(), camitk::InteractiveViewer::getCoronalViewer(), camitk::InteractiveViewer::getSagittalViewer(), camitk::Application::getTopLevelComponents(), numberOfViewedComponent(), camitk::Viewer::refresh(), updateLayout(), VIEWER_3D, VIEWER_ALL, viewers, and visibleLayout.
|
virtual |
force toolbar visibility.
The toolbar is normally updated automatically on layout update (see updateLayout()) and is visible if all the 3D scene is visible (which is the default visualization state). Calling this method with false will avoid this automatic update.
By default the toolbar is automatically update
References autoUpdateToolbarVisibility, and getToolBar().
void camitk::MedicalImageViewer::setVisibleViewer | ( | LayoutVisibility | visibleViewer | ) |
called to change the layout, i.e. which viewer is visible
References updateLayout(), and visibleLayout.
|
slot |
called when an internal InteractiveViewers has emitted a selectionChanged signal
References camitk::Viewer::refresh(), camitk::Viewer::selectionChanged(), and viewers.
Referenced by getWidget().
|
private |
set the current visibility of the different viewer
References autoUpdateToolbarVisibility, frame, getToolBar(), VIEWER_3D, VIEWER_ALL, VIEWER_ARBITRARY, VIEWER_AXIAL, VIEWER_CORONAL, VIEWER_SAGITTAL, viewers, viewerVisibility, and visibleLayout.
Referenced by getWidget(), refresh(), and setVisibleViewer().
|
private |
if true, the toolbar automatically updated
Referenced by MedicalImageViewer(), setToolbarAutoVisibility(), and updateLayout().
|
private |
number of top-level component that are currently displayed
Referenced by MedicalImageViewer(), and refresh().
|
private |
the main widget
Referenced by getWidget(), MedicalImageViewer(), updateLayout(), and ~MedicalImageViewer().
|
private |
The main layout.
Referenced by getWidget(), and MedicalImageViewer().
|
staticprivate |
the default instance (singleton)
Referenced by getInstance().
|
private |
the layout for the arbitrary/axial at the top left position of frameLayout
Referenced by getWidget().
|
private |
the QMenu for the MedicalImageViewer
Referenced by getMenu(), and MedicalImageViewer().
|
private |
contains all InteractiveViewer instance (access them by LayoutVisibility)
Referenced by getMenu(), getToolBar(), getWidget(), numberOfViewedComponent(), refresh(), synchronizeSelection(), and updateLayout().
|
private |
viewer visibility enum
Referenced by getMenu(), getWidget(), numberOfViewedComponent(), and updateLayout().
|
private |
which viewer(s) is/are currently visible
Referenced by MedicalImageViewer(), refresh(), setVisibleViewer(), and updateLayout().