Computer Assited Medical Intervention Tool Kit  version 5.0
MedicalImageViewer Class Reference

All-in-one medical image viewer. More...

#include <MedicalImageViewer.h>

+ Inheritance diagram for MedicalImageViewer:
+ Collaboration diagram for MedicalImageViewer:

Public Types

enum  LayoutVisibility {
  VIEWER_ALL, VIEWER_3D, VIEWER_AXIAL, VIEWER_CORONAL,
  VIEWER_SAGITTAL, VIEWER_ARBITRARY
}
 
- Public Types inherited from camitk::Viewer
enum  ViewerType { EMBEDDED, DOCKED }
 

Public Slots

void synchronizeSelection ()
 called when an internal InteractiveViewers has emitted a selectionChanged signal More...
 

Public Member Functions

LayoutVisibility getVisibleViewer () const
 get the current layout value More...
 
Q_INVOKABLE MedicalImageViewer (QString)
 
 Q_ENUM (LayoutVisibility)
 
void setVisibleViewer (LayoutVisibility)
 called to change the layout, i.e. which viewer is visible More...
 
virtual ~MedicalImageViewer () override
 destructor More...
 
Viewer inherited
void refresh (Viewer *whoIsAsking=nullptr) override
 
QWidget * getWidget () 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
QStringList getComponents ()
 get the list of Component class manages by this viewer (default is set to "Component", i.e. More...
 
QString getDescription () const
 get the name of the viewer More...
 
QDockWidget * getDockWidget ()
 Get the QDockWidget* where this viewer is currently docked (or nullptr if it is not docked anywhere or if the viewer is of type EMBEDDED) More...
 
QLayout * getEmbedder ()
 Get the QLayout* where this viewer is currently embedded (or nullptr if it is not embedded anywhere or if the viewer is of type DOCKED) More...
 
virtual QPixmap getIcon ()
 get the viewer icon More...
 
QString getName () const
 get the name of the viewer More...
 
bool getToolBarVisibility ()
 get the current value of the toolbar visibility More...
 
ViewerType getType ()
 get the viewer layout More...
 
 Q_ENUM (ViewerType) Viewer(QString name
 default constructor More...
 
virtual void refresh (Viewer *whoIsAsking=nullptr)=0
 refresh the view (can be interesting to know which other viewer is calling this) More...
 
bool setDockWidget (QDockWidget *)
 If the viewer type is DOCKED, dock the widget inside the given dock widget (do nothing if the type is EMBEDDED or if the viewer has already been docked before) Note that once set, the dock widget cannot be modified. More...
 
bool setEmbedder (QLayout *)
 If the viewer type is EMBEDDED, embed the viewer widget in the given layout (do nothing if the type is DOCKED) Note that you can call this method any time you want to move the viewer's widget to another layout (but there is only one embedder at a time) More...
 
void setToolBarVisibility (bool)
 set the visibility of the toolbar in the main window (true by default). More...
 
void setType (ViewerType)
 set the viewer layout (the type can be changed dynamically to fit the developer's purpose) More...
 
void setVisible (bool)
 set the visibility of the viewer (show or hide its widget) More...
 
virtual ~Viewer () override
 default destructor 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 * northEastLayout
 
QVBoxLayout * northWestLayout
 The four corners of the main layout. More...
 
QVBoxLayout * southEastLayout
 
QVBoxLayout * southWestLayout
 
QMenu * viewerMenu
 the QMenu for the MedicalImageViewer More...
 
QMap< LayoutVisibility, Viewer * > viewers
 contains all InteractiveViewer instance (access them by LayoutVisibility) More...
 
QList< LayoutVisibilityviewerVisibility
 viewer visibility enum More...
 
LayoutVisibility visibleLayout
 which viewer(s) is/are currently visible 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...
 
- Public Attributes inherited from camitk::Viewer
ViewerType type = EMBEDDED)
 this viewer's layout More...
 
- Protected Member Functions inherited from camitk::Viewer
void clearSelection ()
 clear the selection More...
 
void selectionChanged (Component *comp)
 the selection has changed to be just one comp More...
 
void selectionChanged (ComponentList &compSet)
 The selection has changed to the given ComponentList. More...
 
void setComponents (QStringList)
 set the list of component class names managed by this viewer More...
 
void setDescription (QString)
 set the viewer's description More...
 
void setIcon (QPixmap icon)
 set the default icon for the viewer extension More...
 

Detailed Description

All-in-one medical image viewer.

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 Interactive Viewers defined in the interactivesliceviewer and interactivegeometryviewer viewer extensions.

If this viewer extension is loaded, the default instance of this viewer can be accessed directly by Application::getViewer("Medical Image Viewer").

The medical image viewer
See also
camitk::Viewer

Member Enumeration Documentation

◆ LayoutVisibility

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.

Constructor & Destructor Documentation

◆ MedicalImageViewer()

MedicalImageViewer::MedicalImageViewer ( QString  name)

References autoUpdateToolbarVisibility, displayedTopLevelComponents, frame, frameLayout, camitk::Viewer::setDescription(), VIEWER_3D, viewerMenu, and visibleLayout.

+ Here is the call graph for this function:

◆ ~MedicalImageViewer()

MedicalImageViewer::~MedicalImageViewer ( )
overridevirtual

destructor

References viewerMenu.

Member Function Documentation

◆ getMenu()

QMenu * MedicalImageViewer::getMenu ( )
overridevirtual

get the viewer menu

Reimplemented from camitk::Viewer.

References VIEWER_ALL, viewerMenu, viewers, and viewerVisibility.

◆ getPropertyObject()

QObject * MedicalImageViewer::getPropertyObject ( )
overridevirtual

get the propertyObject (only the 3D Scene one)

Reimplemented from camitk::Viewer.

◆ getToolBar()

QToolBar * MedicalImageViewer::getToolBar ( )
overridevirtual

get the viewer toolbar

Reimplemented from camitk::Viewer.

References VIEWER_3D, and viewers.

◆ getVisibleViewer()

MedicalImageViewer::LayoutVisibility MedicalImageViewer::getVisibleViewer ( ) const

get the current layout value

References visibleLayout.

◆ getWidget()

QWidget * MedicalImageViewer::getWidget ( )
overridevirtual

get the viewer widget.

the layout for the arbitrary/axial at the top left position of frameLayout

Implements camitk::Viewer.

References CAMITK_ERROR, frame, frameLayout, northEastLayout, northWestLayout, camitk::Viewer::selectionChanged(), southEastLayout, southWestLayout, synchronizeSelection(), updateLayout(), VIEWER_3D, VIEWER_ALL, VIEWER_ARBITRARY, VIEWER_AXIAL, VIEWER_CORONAL, VIEWER_SAGITTAL, viewers, and viewerVisibility.

+ Here is the call graph for this function:

◆ Q_ENUM()

MedicalImageViewer::Q_ENUM ( LayoutVisibility  )

◆ refresh()

void MedicalImageViewer::refresh ( Viewer whoIsAsking = nullptr)
override

refresh the view (can be interesting to know which other viewer is calling this)

References displayedTopLevelComponents, updateLayout(), VIEWER_3D, VIEWER_ALL, viewers, and visibleLayout.

+ Here is the call graph for this function:

◆ setToolbarAutoVisibility()

void MedicalImageViewer::setToolbarAutoVisibility ( bool  toolbarAutoVisibility)
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 camitk::Viewer::setToolBarVisibility().

Referenced by ActionStateMachine::initMainWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setVisibleViewer()

void MedicalImageViewer::setVisibleViewer ( LayoutVisibility  visibleViewer)

called to change the layout, i.e. which viewer is visible

References updateLayout(), and visibleLayout.

Referenced by Show3DViewer::apply(), ShowSagittalViewer::apply(), ShowCoronalViewer::apply(), ShowAxialViewer::apply(), ShowArbitraryViewer::apply(), ShowAllViewers::apply(), and AnglesAndTranslationAction::update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ synchronizeSelection

void MedicalImageViewer::synchronizeSelection ( )
slot

called when an internal InteractiveViewers has emitted a selectionChanged signal

References camitk::Viewer::selectionChanged(), and viewers.

Referenced by getWidget().

+ Here is the caller graph for this function:

◆ updateLayout()

void MedicalImageViewer::updateLayout ( )
private

set the current visibility of the different viewer

References autoUpdateToolbarVisibility, camitk::Viewer::setToolBarVisibility(), VIEWER_3D, VIEWER_ALL, VIEWER_ARBITRARY, VIEWER_AXIAL, VIEWER_CORONAL, VIEWER_SAGITTAL, viewers, viewerVisibility, and visibleLayout.

Referenced by getWidget(), refresh(), and setVisibleViewer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ autoUpdateToolbarVisibility

bool MedicalImageViewer::autoUpdateToolbarVisibility
private

if true, the toolbar automatically updated

Referenced by MedicalImageViewer(), setToolbarAutoVisibility(), and updateLayout().

◆ displayedTopLevelComponents

unsigned int MedicalImageViewer::displayedTopLevelComponents
private

number of top-level component that are currently displayed

Referenced by MedicalImageViewer(), and refresh().

◆ frame

QFrame* MedicalImageViewer::frame
private

the main widget

Referenced by getWidget(), and MedicalImageViewer().

◆ frameLayout

QGridLayout* MedicalImageViewer::frameLayout
private

The main layout.

Referenced by getWidget(), and MedicalImageViewer().

◆ northEastLayout

QVBoxLayout* MedicalImageViewer::northEastLayout
private

Referenced by getWidget().

◆ northWestLayout

QVBoxLayout* MedicalImageViewer::northWestLayout
private

The four corners of the main layout.

Referenced by getWidget().

◆ southEastLayout

QVBoxLayout* MedicalImageViewer::southEastLayout
private

Referenced by getWidget().

◆ southWestLayout

QVBoxLayout* MedicalImageViewer::southWestLayout
private

Referenced by getWidget().

◆ viewerMenu

QMenu* MedicalImageViewer::viewerMenu
private

◆ viewers

QMap<LayoutVisibility, Viewer*> MedicalImageViewer::viewers
private

contains all InteractiveViewer instance (access them by LayoutVisibility)

Referenced by getMenu(), getToolBar(), getWidget(), refresh(), synchronizeSelection(), and updateLayout().

◆ viewerVisibility

QList<LayoutVisibility> MedicalImageViewer::viewerVisibility
private

viewer visibility enum

Referenced by getMenu(), getWidget(), and updateLayout().

◆ visibleLayout

LayoutVisibility MedicalImageViewer::visibleLayout
private

which viewer(s) is/are currently visible

Referenced by getVisibleViewer(), MedicalImageViewer(), refresh(), setVisibleViewer(), and updateLayout().


The documentation for this class was generated from the following files: