ImedgineImageViewer Class Reference
[Views]

The viewer used to display pixel images. More...

#include <imedgine_image_viewer.h>

Inherits ImedgineViewer.

Inheritance diagram for ImedgineImageViewer:

Inheritance graph
[legend]
Collaboration diagram for ImedgineImageViewer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ImedgineImageViewer (ImagePixelView *image_view, QWidget *parent, const char *name=NULL)
virtual ~ImedgineImageViewer ()
virtual SbBool processSoEvent (const SoEvent *const ev)
bool convertCoordsFromScreenToTexture (SbVec2s const &screen_coords, SbVec2s &texture_coords)
void convertCoordsFromTextureToWorld (SbVec2s const &texture_coords, SbVec2f &space_coords)
void updateDatasetStatusInfo ()
ImagePixelViewgetImagePixelView () const

Protected Member Functions

SbVec3f convertCoordsFromWorldToSpace (SbVec2s screen_coords) throw (NullPointerException)

Protected Attributes

ImagePixelViewimage_view_
view_mode_type view_mode_
SoSeparator * popup_button_sep_
SoCube * popup_button_
SoSeparator * status_info_sep_
SoText2 * slice_status_info_text_
SoTransform * dataset_status_info_transform_
SoText2 * dataset_status_info_text_
SoSeparator * region_of_interest_sep_
ROIBaseregion_of_interest_
std::auto_ptr< SoMouseButtonEvent > last_button_click_event_
SbVec2s last_position_
SoQtPopupMenu * popup_menu
SbTime double_click_check_time_
bool left_mouse_button_pressed_
SbVec2s left_mouse_button_press_location_
double mouse_movement_scaling_factor_

Detailed Description

The viewer used to display pixel images.

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 imedgine_image_viewer.h.


Constructor & Destructor Documentation

ImedgineImageViewer ImagePixelView image_view,
QWidget *  parent,
const char *  name = NULL
 

Constructor

Definition at line 36 of file imedgine_image_viewer.cpp.

References ImedgineImageViewer::dataset_status_info_text_, ImedgineImageViewer::dataset_status_info_transform_, ImagePixelView::getDynamicSceneSeparator(), ImagePixelView::getMaxPixelValue(), ImagePixelView::getMinPixelValue(), View::getStaticSceneSeparator(), ImedgineImageViewer::image_view_, ImedgineImageViewer::mouse_movement_scaling_factor_, ImedgineImageViewer::popup_button_, ImedgineImageViewer::popup_button_sep_, ImedgineImageViewer::region_of_interest_sep_, and ImedgineImageViewer::status_info_sep_.

Here is the call graph for this function:

~ImedgineImageViewer  )  [virtual]
 

Destructor

Definition at line 116 of file imedgine_image_viewer.cpp.


Member Function Documentation

bool convertCoordsFromScreenToTexture SbVec2s const &  screen_coords,
SbVec2s &  texture_coords
 

Convert the screen coordinates (which are pixel coordinates) to texture coordinatens (of the current slice). The method uses ray picking for getting the texture coordinates which are hit by the ray.

Parameters:
screen_coords The screen coordinates in pixel
texture_coords The result of the ray picking action in texture coordinates
Returns:
Bool that indicates if a object is hit. Returns false if nothing is hit by the ray.

Definition at line 354 of file imedgine_image_viewer.cpp.

References ImagePixelView::getRenderArea(), ImagePixelView::getSize(), ImedgineImageViewer::image_view_, X_DIMENSION, and Y_DIMENSION.

Here is the call graph for this function:

void convertCoordsFromTextureToWorld SbVec2s const &  texture_coords,
SbVec2f &  space_coords
 

Convert texture coordinates (of the current slice) to world space coordinates.

Parameters:
texture_coords Texture coordinates (of the current slice)
space_coords The result of the conversion in world space coordinates.

Definition at line 387 of file imedgine_image_viewer.cpp.

References ImagePixelView::getSize(), ImedgineImageViewer::image_view_, X_DIMENSION, and Y_DIMENSION.

Here is the call graph for this function:

SbVec3f convertCoordsFromWorldToSpace SbVec2s  screen_coords  )  throw (NullPointerException) [protected]
 

Converts screen coordinates (in pixel) to world space coordinates.

Parameters:
screen_coords Pixel coordinates in the render area.
Returns:
World space coordinates of the 2D screen coordinates.

Definition at line 416 of file imedgine_image_viewer.cpp.

References X_DIMENSION, and Y_DIMENSION.

ImagePixelView* getImagePixelView  )  const [inline]
 

Returns the displayed view

Returns:
The internal view object

Definition at line 114 of file imedgine_image_viewer.h.

References ImedgineImageViewer::image_view_.

SbBool processSoEvent const SoEvent *const   ev  )  [virtual]
 

Overload the event handling of the examiner viewer. All the event handling for the 2D slice views happens here.

Parameters:
ev A const pointer to the caught event

Reimplemented from ImedgineViewer.

Definition at line 125 of file imedgine_image_viewer.cpp.

References ImedgineImageViewer::last_button_click_event_, ImedgineImageViewer::last_position_, ImedgineViewer::processSoEvent(), ImedgineImageViewer::view_mode_, and Y_DIMENSION.

Here is the call graph for this function:

void updateDatasetStatusInfo  ) 
 

Update the status information of the dataset that is currently represented in the render area. This status information consists of the dataset keys (names) of the loaded dataset. In case of a hybrid view (this means two dataset are rendered at the same time) both dataset keys are shown.

Definition at line 406 of file imedgine_image_viewer.cpp.

References ImedgineImageViewer::dataset_status_info_text_, ImagePixelView::getDatasetKey(), and ImedgineImageViewer::image_view_.

Here is the call graph for this function:


Member Data Documentation

SoText2* dataset_status_info_text_ [protected]
 

The text that contains the dataset status information (i.e. the names). In case of a second dataset loaded two dataset names are held.

Definition at line 175 of file imedgine_image_viewer.h.

Referenced by ImedgineImageViewer::ImedgineImageViewer(), and ImedgineImageViewer::updateDatasetStatusInfo().

SoTransform* dataset_status_info_transform_ [protected]
 

Transformation of the dataset status information to the desired position. At the moment the upper right corner of the render area.

Definition at line 168 of file imedgine_image_viewer.h.

Referenced by ImedgineImageViewer::ImedgineImageViewer().

SbTime double_click_check_time_ [protected]
 

Time stamp of the last mouse click. The time is important for recognizing double clicks.

Definition at line 213 of file imedgine_image_viewer.h.

ImagePixelView* image_view_ [protected]
 

A pointer to the slice view that is rendered in the viewer (render area).

Definition at line 131 of file imedgine_image_viewer.h.

Referenced by ImedgineImageViewer::convertCoordsFromScreenToTexture(), ImedgineImageViewer::convertCoordsFromTextureToWorld(), ImedgineImageViewer::getImagePixelView(), ImedgineImageViewer::ImedgineImageViewer(), and ImedgineImageViewer::updateDatasetStatusInfo().

std::auto_ptr<SoMouseButtonEvent> last_button_click_event_ [protected]
 

Event of the last button click. This is used for the user interaction handling.

Definition at line 194 of file imedgine_image_viewer.h.

Referenced by ImedgineImageViewer::processSoEvent().

SbVec2s last_position_ [protected]
 

Pixel coordinates of the last event that is caught.

Definition at line 200 of file imedgine_image_viewer.h.

Referenced by ImedgineImageViewer::processSoEvent().

SbVec2s left_mouse_button_press_location_ [protected]
 

The pixel coordinates of the last left mouse button click.

Definition at line 225 of file imedgine_image_viewer.h.

bool left_mouse_button_pressed_ [protected]
 

Flag that indicates if the left mouse button is pressed at the moment.

Definition at line 219 of file imedgine_image_viewer.h.

double mouse_movement_scaling_factor_ [protected]
 

The scaling factor used to compensate resolution differences between different datasets. Using this factor e.g. with intensity/level changes will result in the same amount of change independent of the pixel stride of the dataset

Definition at line 233 of file imedgine_image_viewer.h.

Referenced by ImedgineImageViewer::ImedgineImageViewer().

SoCube* popup_button_ [protected]
 

The cube on that the popup button texture is rendered.

Definition at line 149 of file imedgine_image_viewer.h.

Referenced by ImedgineImageViewer::ImedgineImageViewer().

SoSeparator* popup_button_sep_ [protected]
 

Seperator that contains all popup relevant scene graph nodes.

Definition at line 143 of file imedgine_image_viewer.h.

Referenced by ImedgineImageViewer::ImedgineImageViewer().

SoQtPopupMenu* popup_menu [protected]
 

A pointer to the popup menu

Definition at line 206 of file imedgine_image_viewer.h.

ROIBase* region_of_interest_ [protected]
 

A pointer to the ROI.

Definition at line 187 of file imedgine_image_viewer.h.

SoSeparator* region_of_interest_sep_ [protected]
 

Separator node that cointains the region of interests.

Definition at line 181 of file imedgine_image_viewer.h.

Referenced by ImedgineImageViewer::ImedgineImageViewer().

SoText2* slice_status_info_text_ [protected]
 

The text that contains the slice number status information.

Definition at line 161 of file imedgine_image_viewer.h.

SoSeparator* status_info_sep_ [protected]
 

Seperator that contains all status information nodes.

Definition at line 155 of file imedgine_image_viewer.h.

Referenced by ImedgineImageViewer::ImedgineImageViewer().

view_mode_type view_mode_ [protected]
 

Holds the current view mode that controls the user interaction.

Definition at line 137 of file imedgine_image_viewer.h.

Referenced by ImedgineImageViewer::processSoEvent().


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