Main Page | Packages | Class Hierarchy | Class List | Directories | Class Members

IDVR.OpenGLPreviewCanvas Class Reference

#include <OpenGLPreviewCanvas.h>

Inheritance diagram for IDVR.OpenGLPreviewCanvas:

IDVR.Interfaces.IOpenGLCanvas List of all members.

Detailed Description

GUI class for creating the Preview Canvas window and actually crendering the specific preview..

This class is part of the main application namespace IDVR and contains the definition of the Preview Canvas window.

To provide a preview look of the current specified rendering settings with the current loaded volume data set this class implements both the GUI window management and the actual rendering calculations for the preview.
Due the preview picture should be rendererd as fast as possible the size of the canvas and some basic rendering attrributes (e.g. higher sampling distance, lower gradient threshold) will be adapted to fulfill this important requirement.

Note that the preview canvas window is a seperate small sub window which will be shown next to the main GUI window.

The API documentation for this class shows only the most important member variables and function. Event handling functions and GUI components (e.g. labels, textboxes,...) will not be included but all essential parts of the class are surely documented.

See also:
Neu - the main GUI window class of this application.
Author:
Bernhard Pflugfelder
Version:
1.0
Date:
02-21-2005


Public Member Functions

 OpenGLPreviewCanvas (int n_LoactionX, int n_LocationY, Color n_CanvasBackColor, float n_OpacityThreshold, float n_GradientThreshold, Form *n_ParentForm)
 This is a constructor of this class with specific parameters for correct initialization.
 OpenGLPreviewCanvas (int n_LoactionX, int n_LocationY, Color n_CanvasBackColor, VolumeData *n_Dataset, float n_OpacityThreshold, float n_GradientThreshold, Form *n_ParentForm)
 This is a constructor of this class with specific parameters for correct initialization.
__property void set_OriginalImagePlane (ImagePlane *n_OriginalImagePlane)
 Sets a link to the new original image plane of the main canvas.
__property void set_LightModel (Light *n_LightModel)
 Sets a link to the new light model which will be used for preview rendering.
__property void set_CanvasBackColor (Color n_CanvasBackColor)
 Sets the new light model which will be used for preview rendering.
__property void set_TwoLevelRendering (bool n_TwoLevelRendering)
 Sets the new two-level rendering status which will be used for preview rendering.
__property void set_IDVR (bool n_IDVR)
 Sets the new IDVR rendering status which will be used for preview rendering.
__property void set_Dataset (VolumeData *n_Dataset)
 Sets a link to the current loaded volume data set.
__property void set_OpacityThreshold (float n_OpacityThreshold)
 Sets the new opacity threshold which is essential for early ray termination.
__property void set_GradientThreshold (float n_GradientThreshold)
 Sets the new gradient threshold which is essential for the rendering process.
void clearCanvas (void)
 Clears the preview canvas and sets it to the current background color.
virtual void drawImage (unsigned char n_FrameBuffer __gc[])
 Draws the the color values of the specified array onto the canvas.

Protected Member Functions

void Dispose (Boolean disposing)
 Destroys all GUI components before this current instance will be actually discarded.

Private Member Functions

void InitializeComponent (void)
 The main function to create the all needed GUI components.
void startRenderingProcess (void)
 Starts the actual rendering process for the preview image.

Private Attributes

Lightm_LightModel
 Saves the assigned light model.
ImagePlanem_OriginalImagePlane
 Pointer to the original image plane of the main canvas.
ImagePlanem_PreviewImagePlane
 Saves the preview image plane for the adapted convas attributes.
ClearCanvasGLm_ClearCanvas
 Saves a deletion object for the preview canvas.
DrawModelGLSWm_DrawModel
 Saves a drawing object for the preview canvas.
Color m_CanvasBackColor
 Saves the current background color of the preview canvas.
VolumeDatam_Dataset
 Pointer to the current loaded volume data set.
bool m_TwoLevelRendering
 Saves whether two-level rendering is activated or not.
bool m_IDVR
 Saves whether IDVR rendering is activated or not.
float m_OpacityThreshold
 Saves the current opacity threshold for early ray termination.
float m_GradientThreshold
 Saves the current gradient threshold.
Form * m_ParentForm
 Saves a pointer to the current main GUI windon.


Constructor & Destructor Documentation

IDVR.OpenGLPreviewCanvas.OpenGLPreviewCanvas int  n_LoactionX,
int  n_LocationY,
Color  n_CanvasBackColor,
float  n_OpacityThreshold,
float  n_GradientThreshold,
Form *  n_ParentForm
 

This is a constructor of this class with specific parameters for correct initialization.

It implements the standard initialization of the GUI window and actually start a thread to create and control a specific dialog window.

Parameters:
n_LoactionX the actual x coordinate of the upper left corner of the preview canvas window.
n_LocationY the actual y coordinate of the upper left corner of the preview canvas window.
n_CanvasBackColor the background color of the prieview canvas.
n_OpacityThreshold a opacity threshold which will be used during the rendering process.
n_GradientThreshold a gradient threshold which will be used during the rendering process.
n_ParentForm a direct pointer to the main GUI window.

IDVR.OpenGLPreviewCanvas.OpenGLPreviewCanvas int  n_LoactionX,
int  n_LocationY,
Color  n_CanvasBackColor,
VolumeData n_Dataset,
float  n_OpacityThreshold,
float  n_GradientThreshold,
Form *  n_ParentForm
 

This is a constructor of this class with specific parameters for correct initialization.

It implements the standard initialization of the GUI window and actually start a thread to create and control a specific dialog window.

Parameters:
n_LoactionX the actual x coordinate of the upper left corner of the preview canvas window.
n_LocationY the actual y coordinate of the upper left corner of the preview canvas window.
n_CanvasBackColor the background color of the prieview canvas.
n_Dataset a link to the current loaded volume data set.
n_OpacityThreshold a opacity threshold which will be used during the rendering process.
n_GradientThreshold a gradient threshold which will be used during the rendering process.
n_ParentForm a direct pointer to the main GUI window.


Member Function Documentation

void OpenGLPreviewCanvas::clearCanvas void   ) 
 

Clears the preview canvas and sets it to the current background color.

void IDVR.OpenGLPreviewCanvas.Dispose Boolean  disposing  )  [protected]
 

Destroys all GUI components before this current instance will be actually discarded.

Parameters:
disposing is a flag variable which is true if the instance have to be discarded.

void OpenGLPreviewCanvas::drawImage unsigned char n_FrameBuffer  __gc[]  )  [virtual]
 

Draws the the color values of the specified array onto the canvas.

Parameters:
n_FrameBuffer the resulting RGB color values.

void IDVR.OpenGLPreviewCanvas.InitializeComponent void   )  [private]
 

The main function to create the all needed GUI components.

Furthermore, the linking of those created GUI components (e.g. labels, textboxes,...) to the current container is implemented. After the correct linking all GUI items will be shown on the screen.

Note:
This function must not be changed in a code editor because otherwise the GUI builder could be working incorrectly.

void OpenGLPreviewCanvas::set_CanvasBackColor Color  n_CanvasBackColor  ) 
 

Sets the new light model which will be used for preview rendering.

Parameters:
n_CanvasBackColor the background color of the prieview canvas.

void OpenGLPreviewCanvas::set_Dataset VolumeData *  n_Dataset  ) 
 

Sets a link to the current loaded volume data set.

Parameters:
n_Dataset a link to the current loaded volume data set.

void OpenGLPreviewCanvas::set_GradientThreshold float  n_GradientThreshold  ) 
 

Sets the new gradient threshold which is essential for the rendering process.

Parameters:
n_GradientThreshold the new value of the gradient threshold.

void OpenGLPreviewCanvas::set_IDVR bool  n_IDVR  ) 
 

Sets the new IDVR rendering status which will be used for preview rendering.

Parameters:
n_IDVR the status of IDVR rendering.

void OpenGLPreviewCanvas::set_LightModel Light *  n_LightModel  ) 
 

Sets a link to the new light model which will be used for preview rendering.

Parameters:
n_LightModel a link to the new light model.

void OpenGLPreviewCanvas::set_OpacityThreshold float  n_OpacityThreshold  ) 
 

Sets the new opacity threshold which is essential for early ray termination.

Parameters:
n_OpacityThreshold the new value of the opacity threshold.

void OpenGLPreviewCanvas::set_OriginalImagePlane ImagePlane *  n_OriginalImagePlane  ) 
 

Sets a link to the new original image plane of the main canvas.

Parameters:
n_OriginalImagePlane a link to the new original (main) image plane.

void OpenGLPreviewCanvas::set_TwoLevelRendering bool  n_TwoLevelRendering  ) 
 

Sets the new two-level rendering status which will be used for preview rendering.

Parameters:
n_TwoLevelRendering teh status of two-level rendering.

void OpenGLPreviewCanvas::startRenderingProcess void   )  [private]
 

Starts the actual rendering process for the preview image.


Member Data Documentation

ClearCanvasGL* IDVR.OpenGLPreviewCanvas.m_ClearCanvas [private]
 

Saves a deletion object for the preview canvas.

This deletion object is implemented with OpenGL and clears the preview panel.

DrawModelGLSW* IDVR.OpenGLPreviewCanvas.m_DrawModel [private]
 

Saves a drawing object for the preview canvas.

This drawing object is implemented with OpenGL and draws the preview results onto the preview panel.

Light* IDVR.OpenGLPreviewCanvas.m_LightModel [private]
 

Saves the assigned light model.

The instance includes all needed light model settings


The documentation for this class was generated from the following files:
Generated on Sat Apr 9 11:50:59 2005 for RayCaster wiht Importance Driven Volume Rendering (IDVR) by  doxygen 1.4.1