Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Slots | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
camitk::MedicalImageViewer Class Reference

The views manager. More...

#include <MedicalImageViewer.h>

+ Inheritance diagram for camitk::MedicalImageViewer:

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

Public Member Functions

void setVisibleViewer (LayoutVisibility)
 called to change the layout, i.e. which viewer is visible
virtual ~MedicalImageViewer ()
 destructor
Viewer inherited
virtual unsigned int numberOfViewedComponent ()
virtual void refresh (Viewer *whoIsAsking=NULL)
 refresh the view (can be interesting to know which other viewer is calling this)
virtual QWidget * getWidget (QWidget *parent=NULL)
 get the viewer widget.
virtual QObject * getPropertyObject ()
 get the propertyObject (only the 3D Scene one)
virtual QMenu * getMenu ()
 get the viewer menu
virtual QToolBar * getToolBar ()
 get the viewer toolbar
- Public Member Functions inherited from camitk::Viewer
virtual void refreshInterfaceNode (Component *comp)
 Update the whole tree of the representation of the Component.
 Viewer (QString name)
 default constructor
virtual ~Viewer ()
 default destructor

Static Public Member Functions

static MedicalImageViewergetInstance ()
 get singleton instance

Protected Member Functions

 MedicalImageViewer ()
 Protected construtor (singleton)
- Protected Member Functions inherited from camitk::Viewer
void clearSelection ()
 clear the selection
void selectionChanged (ComponentList &compSet)
 The selection has changed to the given ComponentList.
void selectionChanged (Component *comp)
 the selection has changed to be just one comp

Private Member Functions

void updateLayout ()
 set the current visibility of the different viewer

Private Attributes

unsigned int displayedTopLevelComponents
 number of top-level component that are currently displayed
QFrame * frame
 the main widget
QGridLayout * frameLayout
 The main layout.
QVBoxLayout * topLeftLayout
 the layout for the arbitrary/axial at the top left position of frameLayout
QMenu * viewerMenu
 the QMenu for the MedicalImageViewer
QMap< LayoutVisibility, Viewer * > viewers
 contains all InteractiveViewer instance (access them by LayoutVisibility)
QList< LayoutVisibilityviewerVisibility
 viewer visibility enum
LayoutVisibility visibleLayout
 which viewer(s) is/are currently visible

Static Private Attributes

static MedicalImageViewersingleton = NULL
 the default instance (singleton)

Additional Inherited Members

- Signals inherited from camitk::Viewer
void selectionChanged ()
 this signal is emitted when the current selection was changed by the viewer

Detailed Description

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

Member Enumeration Documentation

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

camitk::MedicalImageViewer::~MedicalImageViewer ( )
virtual

destructor

References frame.

camitk::MedicalImageViewer::MedicalImageViewer ( )
protected

Protected construtor (singleton)

References displayedTopLevelComponents, frame, frameLayout, VIEWER_3D, viewerMenu, and visibleLayout.

Referenced by getInstance().

Member Function Documentation

MedicalImageViewer * camitk::MedicalImageViewer::getInstance ( )
static

get singleton instance

References MedicalImageViewer(), and singleton.

QMenu * camitk::MedicalImageViewer::getMenu ( )
virtual
QObject * camitk::MedicalImageViewer::getPropertyObject ( )
virtual

get the propertyObject (only the 3D Scene one)

Reimplemented from camitk::Viewer.

References camitk::InteractiveViewer::get3DViewer().

QToolBar * camitk::MedicalImageViewer::getToolBar ( )
virtual

get the viewer toolbar

Reimplemented from camitk::Viewer.

References VIEWER_3D, and viewers.

Referenced by updateLayout().

QWidget * camitk::MedicalImageViewer::getWidget ( QWidget *  parent = NULL)
virtual
unsigned int camitk::MedicalImageViewer::numberOfViewedComponent ( )
virtual

returns the number of Component that are displayed by this viewer

Implements camitk::Viewer.

References VIEWER_ALL, viewers, and viewerVisibility.

Referenced by refresh().

void camitk::MedicalImageViewer::refresh ( Viewer whoIsAsking = NULL)
virtual
void camitk::MedicalImageViewer::setVisibleViewer ( LayoutVisibility  visibleViewer)

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

References updateLayout(), and visibleLayout.

void camitk::MedicalImageViewer::synchronizeSelection ( )
slot

called when an internal InteractiveViewers has emitted a selectionChanged signal

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

Referenced by getWidget().

void camitk::MedicalImageViewer::updateLayout ( )
private

set the current visibility of the different viewer

References frame, getToolBar(), VIEWER_3D, VIEWER_ALL, VIEWER_ARBITRARY, VIEWER_AXIAL, VIEWER_CORONAL, VIEWER_SAGITTAL, viewers, viewerVisibility, and visibleLayout.

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

Member Data Documentation

unsigned int camitk::MedicalImageViewer::displayedTopLevelComponents
private

number of top-level component that are currently displayed

Referenced by MedicalImageViewer(), and refresh().

QFrame* camitk::MedicalImageViewer::frame
private
QGridLayout* camitk::MedicalImageViewer::frameLayout
private

The main layout.

Referenced by getWidget(), and MedicalImageViewer().

MedicalImageViewer * camitk::MedicalImageViewer::singleton = NULL
staticprivate

the default instance (singleton)

Referenced by getInstance().

QVBoxLayout* camitk::MedicalImageViewer::topLeftLayout
private

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

Referenced by getWidget().

QMenu* camitk::MedicalImageViewer::viewerMenu
private

the QMenu for the MedicalImageViewer

Referenced by getMenu(), and MedicalImageViewer().

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

contains all InteractiveViewer instance (access them by LayoutVisibility)

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

QList<LayoutVisibility> camitk::MedicalImageViewer::viewerVisibility
private

viewer visibility enum

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

LayoutVisibility camitk::MedicalImageViewer::visibleLayout
private

which viewer(s) is/are currently visible

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


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