View Class Reference
[Views]

The interface of all views. More...

#include <view.h>

Inherited by PixelView.

Inheritance diagram for View:

Inheritance graph
[legend]
Collaboration diagram for View:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 View (view_type type)
virtual ~View ()
virtual view_pointer_type clone () const =0
unsigned int getViewID () const
view_type getType () const
virtual void setParent (QWidget *view_parent)
virtual void setDataset (dataset_pointer_type dataset) throw (NullPointerException, InvalidCastException)
virtual void onDataChangedEvent (dataset_attribute_type changed_attribute)
virtual void onDatasetDeletion (dataset_key_type)
virtual void updateView ()=0 throw (NullPointerException)
void registerDataViewMediator (DataViewMediator *data_view_mediator)
void deregisterDataViewMediator ()
SoSeparator * getSceneGraph () const
SoSeparator * getStaticSceneSeparator () const
SoCamera * getStaticCamera () const

Protected Member Functions

 View (View const &src)
virtual void createSceneGraph ()
virtual void notifyDataChangedEvent (dataset_attribute_type changed_attribute)

Protected Attributes

QWidget * view_parent_
DataViewMediatordata_view_mediator_
SoSeparator * root_
SoSeparator * dynamic_sep_
SoSeparator * static_sep_
SoOrthographicCamera * static_camera_
dataset_key_type dataset_key_

Detailed Description

The interface of all views.

This class is the base class for all views. It holds basic properties such as the view type and the parent GUI widget. Furthermore it holds a reference to the data.

Author:
Tobias Gross (tobias.gross@imedgine.org)

Christian Koerner (christian.koerner@imedgine.org)

Alexander Lex (alexander.lex@imedgine.org)

Marc Streit (marc.streit@imedgine.org)

Martin Reininger (martin.reininger@imedgine.org)

Definition at line 52 of file view.h.


Constructor & Destructor Documentation

View view_type  type  ) 
 

Constructor

Definition at line 23 of file view.cpp.

References View::root_.

~View  )  [virtual]
 

Destructor

Definition at line 53 of file view.cpp.

References View::root_.

View View const &  src  )  [protected]
 

Copy constructor

Definition at line 42 of file view.cpp.

References View::root_.


Member Function Documentation

virtual view_pointer_type clone  )  const [pure virtual]
 

Virtual copy constructor

Implemented in ImagePixelView, MetaVolumePixelView, SpatialPixelView, XYSliceView, XZSliceView, and YZSliceView.

void createSceneGraph  )  [protected, virtual]
 

Creates the scene part that is independent of the viewing camera

Reimplemented in ImagePixelView, SlicePixelView, and SpatialPixelView.

Definition at line 112 of file view.cpp.

References View::dynamic_sep_, View::root_, View::static_camera_, and View::static_sep_.

Referenced by SlicePixelView::createSceneGraph(), and ImagePixelView::createSceneGraph().

void deregisterDataViewMediator  ) 
 

Degister the data-view mediator from receiving change events from this view

Definition at line 105 of file view.cpp.

References View::data_view_mediator_.

view_type getType  )  const
 

Get the type of the View. The type is set in the constructor of the inherited views.

Returns:
The type of the View.

Definition at line 70 of file view.cpp.

unsigned int getViewID  )  const
 

Get the ID of the View. Each view owns an unique ID

Returns:
The type of the View

Definition at line 63 of file view.cpp.

void notifyDataChangedEvent dataset_attribute_type  changed_attribute  )  [protected, virtual]
 

Notify that the data the view depends on has changed. The default notification of the data view mediator may overridden in derived classes.

Parameters:
changed_attribute The specification of the the dataset attribute that has been changed.

Definition at line 129 of file view.cpp.

References View::data_view_mediator_, View::dataset_key_, and DataViewMediator::updateDataChanged().

Referenced by MetaVolumePixelView::setFocusPointXDimension(), MetaVolumePixelView::setFocusPointYDimension(), and MetaVolumePixelView::setFocusPointZDimension().

Here is the call graph for this function:

void onDataChangedEvent dataset_attribute_type  changed_attribute  )  [virtual]
 

React to change of the displayed dataset. The default is to do nothing. Deriving classes may override this behaviour.

Parameters:
changed_attribute The type of dataset attribute that has changed

Reimplemented in ImagePixelView, MetaVolumePixelView, SlicePixelView, SpatialPixelView, XYSliceView, XZSliceView, and YZSliceView.

Definition at line 92 of file view.cpp.

virtual void onDatasetDeletion dataset_key_type   )  [inline, virtual]
 

React to an upcoming deletion an dataset

Reimplemented in SlicePixelView.

Definition at line 118 of file view.h.

void registerDataViewMediator DataViewMediator data_view_mediator  ) 
 

Register the data-view mediator to receive change events from this view

Parameters:
data_view_mediator A pointer to the data-view mediator

Definition at line 98 of file view.cpp.

References View::data_view_mediator_.

void setDataset dataset_pointer_type  dataset  )  throw (NullPointerException, InvalidCastException) [virtual]
 

Set the datasets that the view shows

Parameters:
dataset A pointer to the dataset to set

Reimplemented in ImagePixelView, SlicePixelView, SpatialPixelView, and VolumePixelView.

Definition at line 84 of file view.cpp.

void setParent QWidget *  view_parent  )  [virtual]
 

Set the GUI parent element of this view

Parameters:
view_parent The GUI view parent

Reimplemented in ImagePixelView, MetaVolumePixelView, SlicePixelView, and SpatialPixelView.

Definition at line 77 of file view.cpp.

References View::view_parent_.

Referenced by SpatialPixelView::setParent(), SlicePixelView::setParent(), and ImagePixelView::setParent().

virtual void updateView  )  throw (NullPointerException) [pure virtual]
 

Redraw the contents of the view.

Parameters:
changed_attribute The optional specification of the the dataset attribute that has been changed.

Implemented in ImagePixelView, MetaVolumePixelView, SlicePixelView, SpatialPixelView, XYSliceView, XZSliceView, and YZSliceView.

Referenced by VolumePixelView::unsetSecondDataset().


Member Data Documentation

DataViewMediator* data_view_mediator_ [protected]
 

The mediator between datasets and dependent views

Definition at line 183 of file view.h.

Referenced by View::deregisterDataViewMediator(), VolumePixelView::isLockedWithDataset(), VolumePixelView::lockWithDataset(), View::notifyDataChangedEvent(), View::registerDataViewMediator(), and VolumePixelView::unlockFromDataset().

dataset_key_type dataset_key_ [protected]
 

The unique key of the dataset that this view shows

Definition at line 216 of file view.h.

Referenced by View::notifyDataChangedEvent().

SoSeparator* dynamic_sep_ [protected]
 

Separator that cointains all scene graph nodes that should be dynamic in the scene. That means the viewer can rotate, pan, etc. them.

Definition at line 196 of file view.h.

Referenced by View::createSceneGraph(), SlicePixelView::createSceneGraph(), ImagePixelView::createSceneGraph(), SlicePixelView::getDynamicSceneSeparator(), and ImagePixelView::getDynamicSceneSeparator().

SoSeparator* root_ [protected]
 

The root node of the scene graph

Definition at line 189 of file view.h.

Referenced by View::createSceneGraph(), SpatialPixelView::createSceneGraph(), View::getSceneGraph(), View::View(), and View::~View().

SoOrthographicCamera* static_camera_ [protected]
 

Static camera that is not influenced by the viewer The camera is not needed at the moment - but could been very useful.

Definition at line 210 of file view.h.

Referenced by View::createSceneGraph(), and View::getStaticCamera().

SoSeparator* static_sep_ [protected]
 

Separator that cointains all scene graph nodes that should be static in the scene (independet from the camera)

Definition at line 203 of file view.h.

Referenced by View::createSceneGraph(), and View::getStaticSceneSeparator().

QWidget* view_parent_ [protected]
 

The GUI parent element of the view

Definition at line 177 of file view.h.

Referenced by View::setParent().


The documentation for this class was generated from the following files:
Generated on Sun Aug 13 18:20:06 2006 for iMEDgine by  doxygen 1.4.6