SlicePixelView Class Reference
[Views]

The interface for all three types of slice views (XY, XZ, YZ) of three dimensional voxel datasets. More...

#include <slice_pixel_view.h>

Inherits VolumePixelView.

Inherited by XYSliceView, XZSliceView, and YZSliceView.

Inheritance diagram for SlicePixelView:

Inheritance graph
[legend]
Collaboration diagram for SlicePixelView:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SlicePixelView (view_type type)
virtual ~SlicePixelView ()
virtual void setDataset (dataset_pointer_type dataset) throw (NullPointerException, InvalidCastException)
void setSecondDataset (dataset_pointer_type second_dataset) throw (NullPointerException, InvalidCastException)
void unsetSecondDataset ()
virtual void onDatasetDeletion (dataset_key_type dataset_key)
virtual void setParent (QWidget *view_parent) throw (NullPointerException)
void updateView () throw (NullPointerException)
virtual void onDataChangedEvent (dataset_attribute_type changed_attribute) throw (NullPointerException)
virtual void setFocusPoint2D (index_type dim_1, index_type dim_2)=0
virtual void setSliceIndex (index_type slice_index)=0
virtual index_type getSliceIndex () const =0
virtual SbVec2s getSliceResolution () const =0
virtual index_type getNumSlices () const =0
virtual SbVec2s getSecondSliceResolution () const =0
ImedgineSliceViewergetRenderArea ()
SoSeparator * getDynamicSceneSeparator () const
SoMaterial * getSliceDatasetMaterial ()
SoMaterial * getSliceSecondDatasetMaterial ()
SoCube * getSlicePlane ()

Protected Member Functions

 SlicePixelView (SlicePixelView const &src)
virtual void createSceneGraph ()
virtual void drawCrosshair ()=0

Protected Attributes

std::auto_ptr< ImedgineSliceViewerrender_area_
 The viewer that displays the slices.
SoOrthographicCamera * dynamic_camera_
SoSeparator * slice_separator_
SoCube * slice_plane_
 Plane (cube depth = 0) on which the texture is rendered.
SoCube * second_slice_plane_
 Plane on which the second datasets' texture is rendered.
SoTexture2 * current_image_texture_
 Slice texture that is extracted from the dataset.
SoTexture2 * current_second_image_texture_
 Slice texture that is extracted from the second dataset.
SoMaterial * slice_dataset_material_
SoMaterial * slice_second_dataset_material_
SoSeparator * crosshair_sep_
SoBaseColor * crosshair_color_
 Color of the crosshair.
SoCoordinate3 * crosshair_coords_
 Point coordinates of the crosshair.
SoLineSet * crosshair_lines_
 Lines to draw the crosshair.

Detailed Description

The interface for all three types of slice views (XY, XZ, YZ) of three dimensional voxel datasets.

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 55 of file slice_pixel_view.h.


Constructor & Destructor Documentation

SlicePixelView view_type  type  ) 
 

Constructor

Definition at line 23 of file slice_pixel_view.cpp.

References SlicePixelView::createSceneGraph().

Here is the call graph for this function:

~SlicePixelView  )  [virtual]
 

Destructor

Definition at line 39 of file slice_pixel_view.cpp.

SlicePixelView SlicePixelView const &  src  )  [protected]
 

Copy constructor

Definition at line 31 of file slice_pixel_view.cpp.

References SlicePixelView::createSceneGraph().

Here is the call graph for this function:


Member Function Documentation

void createSceneGraph  )  [protected, virtual]
 

All scene graph nodes are created here. The method will be called in the constructor and the copy constructor (for view copies).

Reimplemented from View.

Definition at line 45 of file slice_pixel_view.cpp.

References View::createSceneGraph(), SlicePixelView::crosshair_color_, SlicePixelView::crosshair_coords_, SlicePixelView::crosshair_lines_, SlicePixelView::crosshair_sep_, SlicePixelView::current_image_texture_, SlicePixelView::dynamic_camera_, View::dynamic_sep_, SlicePixelView::slice_dataset_material_, SlicePixelView::slice_plane_, and SlicePixelView::slice_separator_.

Referenced by SlicePixelView::SlicePixelView().

Here is the call graph for this function:

virtual void drawCrosshair  )  [protected, pure virtual]
 

Draws the crosshair position at current focus position. This method is to be implemented differently by the concrete slice view implemenations in deriving classes.

Implemented in XYSliceView, XZSliceView, and YZSliceView.

virtual index_type getNumSlices  )  const [pure virtual]
 

Return the number of slices. The result depends of the view type.

Returns:
The total number of slices.

Implemented in XYSliceView, XZSliceView, and YZSliceView.

Referenced by ImedgineSliceViewer::updateSliceSliderPosition().

ImedgineSliceViewer* getRenderArea  )  [inline]
 

Get the viewer that displays the slice images

Returns:
The render area of this view

Definition at line 183 of file slice_pixel_view.h.

References SlicePixelView::render_area_.

Referenced by ImedgineSliceViewer::convertCoordsFromScreenToTexture().

virtual SbVec2s getSecondSliceResolution  )  const [pure virtual]
 

Return the 2D resolution of the second dataset (which is used for the hybrid view).

Returns:
2D vector that contains the resolution

Implemented in XYSliceView, XZSliceView, and YZSliceView.

virtual index_type getSliceIndex  )  const [pure virtual]
 

Return the slice index of the dataset.

Returns:
Index of the slice in the dataset

Implemented in XYSliceView, XZSliceView, and YZSliceView.

virtual SbVec2s getSliceResolution  )  const [pure virtual]
 

Return the 2D resolution of the dataset.

Returns:
2D vector that contains the resolution

Implemented in XYSliceView, XZSliceView, and YZSliceView.

Referenced by ImedgineSliceViewer::convertCoordsFromScreenToTexture(), and ImedgineSliceViewer::convertCoordsFromTextureToWorld().

void onDataChangedEvent dataset_attribute_type  changed_attribute  )  throw (NullPointerException) [virtual]
 

React to a change of dataset. In case of a different focus point redraw the crosshair and load a new slice.

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

Reimplemented from View.

Reimplemented in XYSliceView, XZSliceView, and YZSliceView.

Definition at line 211 of file slice_pixel_view.cpp.

void onDatasetDeletion dataset_key_type  dataset_key  )  [virtual]
 

React to an upcoming deletion an dataset. If the dataset to delete is the secondary dataset of this view (the view is hybrid) than reset the dataset and update the slice texture not to show the slices of the second dataset anymore

Parameters:
dataset_key The key of the dataset that will be deleted

Reimplemented from View.

Definition at line 179 of file slice_pixel_view.cpp.

References VolumePixelView::second_volume_dataset_.

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

Set the dataset to display the slices from

Parameters:
dataset The dataset to set

Reimplemented from VolumePixelView.

Definition at line 99 of file slice_pixel_view.cpp.

References VolumePixelView::setDataset(), X_DIMENSION, and Y_DIMENSION.

Here is the call graph for this function:

virtual void setFocusPoint2D index_type  dim_1,
index_type  dim_2
[pure virtual]
 

Update the 2D focus point of that slice in the dataset and fire the dataset changed event of type DATASET_ATTRIBUTE_FOCUS_POINT.

Parameters:
dim_1 First dimension of the 2D focus point
dim_2 Second dimension of the 2D focus point

Implemented in XYSliceView, XZSliceView, and YZSliceView.

void setParent QWidget *  view_parent  )  throw (NullPointerException) [virtual]
 

Set the GUI parent element of this view

Parameters:
view_parent The GUI view parent

Reimplemented from View.

Definition at line 80 of file slice_pixel_view.cpp.

References View::setParent().

Here is the call graph for this function:

void setSecondDataset dataset_pointer_type  second_dataset  )  throw (NullPointerException, InvalidCastException)
 

Set the second dataset that the hybrid view uses

Parameters:
dataset A pointer to the dataset to set

Reimplemented from VolumePixelView.

Definition at line 124 of file slice_pixel_view.cpp.

References VolumePixelView::setSecondDataset(), X_DIMENSION, and Y_DIMENSION.

Referenced by ImedgineSliceViewer::menuSelection().

Here is the call graph for this function:

virtual void setSliceIndex index_type  slice_index  )  [pure virtual]
 

Set the slice index in the dataset and fire the dataset changed event of type DATASET_ATTRIBUTE_FOCUS_POINT.

Parameters:
slice_index Index of the slice in the dataset

Implemented in XYSliceView, XZSliceView, and YZSliceView.

void unsetSecondDataset  ) 
 

Unset the second dataset that the hybrid view uses

Reimplemented from VolumePixelView.

Definition at line 165 of file slice_pixel_view.cpp.

References SlicePixelView::current_second_image_texture_, SlicePixelView::second_slice_plane_, SlicePixelView::slice_dataset_material_, SlicePixelView::slice_second_dataset_material_, SlicePixelView::slice_separator_, and VolumePixelView::unsetSecondDataset().

Referenced by ImedgineSliceViewer::menuSelection().

Here is the call graph for this function:

void updateView  )  throw (NullPointerException) [virtual]
 

Re-render the current dataset

Implements View.

Reimplemented in XYSliceView, XZSliceView, and YZSliceView.

Definition at line 196 of file slice_pixel_view.cpp.

References SlicePixelView::render_area_.

Referenced by YZSliceView::updateView(), XZSliceView::updateView(), and XYSliceView::updateView().


Member Data Documentation

SoSeparator* crosshair_sep_ [protected]
 

Crosshair separator that cointains all releavant scene graph nodes for the crosshair

Definition at line 255 of file slice_pixel_view.h.

Referenced by SlicePixelView::createSceneGraph().

SoOrthographicCamera* dynamic_camera_ [protected]
 

Orthorgraphic camera that views the scene and that is taken by the ImdegineViewer to navigate in the scene.

Definition at line 225 of file slice_pixel_view.h.

Referenced by SlicePixelView::createSceneGraph().

SoSeparator* slice_separator_ [protected]
 

Separator that cointains the plane and the texture of the slice

Definition at line 230 of file slice_pixel_view.h.

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


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