Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuSpecFVR Class Reference

A utility window for fourier volume rendering with a spectral color model. More...

#include <vuSpecFVR.h>

Inheritance diagram for vuSpecFVR:

Inheritance graph
[legend]
Collaboration diagram for vuSpecFVR:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuSpecFVR ()
 Constructor.
 ~vuSpecFVR ()
 Destructor.
bool init (const char *DataFile)
void notifyDataChanged ()
 external update trigger, virtual from some parent class
virtual vuCameragetCamera ()
 This function must return a pointer to the camera that is taking the picture of the scene.
virtual vuImagegetCurrentImage ()
 This function must return a pointer to the current vuImage buffer that the method can write to or read from.
virtual void DrawFromImage ()
 This function must take the data vuImage buffer from the last call to getCurrent Image and draw that on the screen.
virtual void DrawAgain ()
 This function must rerender the scene completely.
void handleGUIevent (wxCommandEvent &ev)
 handle some GUI events (idDOSPECULAR, idDRAWPREV)
virtual void addRight (wxSizer *sizer)
 This method adds controls to the bottom of the window.

Static Public Member Functions

const char * getFileType ()
 Returns the type of vu Datafile that the utility works with.

Protected Member Functions

bool glInit ()
 Initializes open gl for the utility.
void glRender ()
void glResize ()
 Resizes the gl viewport and renders the volume.
void glOnMouse (wxMouseEvent &ev)
 Handles mouse commands from the user.
void OnChar (wxKeyEvent &event)
 keyboard handler
void OnSlideLight (wxScrollEvent &event)
 event handler for the light property sliders.
void OnButtonRender (wxCommandEvent &event)
 initiate a refresh of the rendering
void OnButtonTransform (wxCommandEvent &event)
 initiate a refresh of the rendering
void OnButtonLightPos (wxCommandEvent &ev)
 set light direction from current observer to centre of the volume

Private Types

enum  { idDOSPECULAR, idDRAWPREV }

Private Attributes

vu1112118m_Data
 The spectral raycaster owned by the utility.
vuTFDesignSpec m_TFunc
 The transfer function.
vuTFDialogSpec m_TFuncDlg
vuLightDial m_LightDial
wxSlider * m_LightColour
 Slider to control the properties of the light.
wxSlider * m_LightIntensity
 Slider to control the properties of the light.
int m_x
 The width of the window.
int m_y
 The height of the window.
bool m_DrawBBox
 bounging box flag.
vuPreviewWinm_Preview
 This is a handle for a preview box.

Detailed Description

A utility window for fourier volume rendering with a spectral color model.

Definition at line 18 of file vuSpecFVR.h.


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
idDOSPECULAR 
idDRAWPREV 

Definition at line 20 of file vuSpecFVR.h.


Constructor & Destructor Documentation

vuSpecFVR::vuSpecFVR  ) 
 

Constructor.

Definition at line 39 of file vuSpecFVR.cpp.

vuSpecFVR::~vuSpecFVR  ) 
 

Destructor.

Definition at line 50 of file vuSpecFVR.cpp.

References m_Data.


Member Function Documentation

void vuSpecFVR::addRight wxSizer *  sizer  )  [virtual]
 

This method adds controls to the bottom of the window.

Reimplemented from vuBasicUtility.

Definition at line 116 of file vuSpecFVR.cpp.

References idLIGHTPOS, idRENDER, and idTRANSFORM.

void vuSpecFVR::DrawAgain  )  [virtual]
 

This function must rerender the scene completely.

This is so that the key frame animator can set the camera, and then force a redraw by the method.

Implements vuBasicUtility.

Definition at line 289 of file vuSpecFVR.cpp.

References vu1112118::doRefresh(), m_Data, and vuGLCanvas::redraw().

Here is the call graph for this function:

void vuSpecFVR::DrawFromImage  )  [virtual]
 

This function must take the data vuImage buffer from the last call to getCurrent Image and draw that on the screen.

This is so that prerendered video animation can be displayed by the key frame animator by simply setting the vuImage returned by getCurrentImage and then calling this function.

Implements vuBasicUtility.

Definition at line 300 of file vuSpecFVR.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:

vuCamera * vuSpecFVR::getCamera  )  [virtual]
 

This function must return a pointer to the camera that is taking the picture of the scene.

This is so that the key frame animator can read the camera when it needs to take a snapshot and change the camera when it wants the method to rerender the scene from a predetermined camera position.

Implements vuBasicUtility.

Definition at line 277 of file vuSpecFVR.cpp.

References vu1::getCamera(), and m_Data.

Referenced by OnButtonLightPos().

Here is the call graph for this function:

vuImage * vuSpecFVR::getCurrentImage  )  [virtual]
 

This function must return a pointer to the current vuImage buffer that the method can write to or read from.

This is how the key framer will update the screen.

Implements vuBasicUtility.

Definition at line 282 of file vuSpecFVR.cpp.

References vu1112118::getImage(), and m_Data.

Here is the call graph for this function:

const char * vuSpecFVR::getFileType  )  [static]
 

Returns the type of vu Datafile that the utility works with.

Reimplemented from vuBasicUtility.

Definition at line 59 of file vuSpecFVR.cpp.

bool vuSpecFVR::glInit  )  [protected, virtual]
 

Initializes open gl for the utility.

The method calls the initgl() method so it can do the proper initialization.

Reimplemented from vuBasicUtility.

Definition at line 175 of file vuSpecFVR.cpp.

References GL_DEPTH_TEST, GL_LESS, glDepthFunc(), glEnable(), and m_Data.

Here is the call graph for this function:

void vuSpecFVR::glOnMouse wxMouseEvent &  ev  )  [protected, virtual]
 

Handles mouse commands from the user.

The mouse is the main interface between the user and the utility at the moment. This method receives mouse events from the window, and carries out commands.

Reimplemented from vuBasicUtility.

Definition at line 237 of file vuSpecFVR.cpp.

References vuArcBall::attachCamera(), vu1112118::doRefresh(), vu1::getCamera(), vu1112::getCenter(), vuGLCanvas::getHeight(), vuCamera::getPosition(), vuGLCanvas::getWidth(), m_Data, m_LightDial, m_TFuncDlg, m_x, m_y, vuVector::norm(), vuGLCanvas::redraw(), vuArcBall::setWinSize(), vuCamera::translateXYZ(), and vuArcBall::turn().

Here is the call graph for this function:

void vuSpecFVR::glRender  )  [protected, virtual]
 

The method calls the render() method, setting it up to render to the window's gl canvas.

Reimplemented from vuBasicUtility.

Definition at line 194 of file vuSpecFVR.cpp.

References vu1112118::doSpectral(), vuGLCanvas::getHeight(), vuTFIntensity::getLight(), vuGLCanvas::getWidth(), GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_MODELVIEW, GL_PROJECTION, glClear(), glLoadIdentity(), glMatrixMode(), glOrtho(), vuLightDial::isUpdated(), vuTransferDialog::isUpdated(), ns_vu1112112::light, m_Data, m_LightDial, m_TFunc, m_TFuncDlg, vu1112118::render(), vu1112118::setLight(), vu111211::setTransferFunc(), and vuTransferDialog::unsetUpdated().

Here is the call graph for this function:

void vuSpecFVR::glResize  )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 227 of file vuSpecFVR.cpp.

References vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), GLint, glViewport(), m_Data, and vu1112118::resize().

Here is the call graph for this function:

void vuSpecFVR::handleGUIevent wxCommandEvent &  ev  ) 
 

handle some GUI events (idDOSPECULAR, idDRAWPREV)

Definition at line 308 of file vuSpecFVR.cpp.

bool vuSpecFVR::init const char *  DataFile  )  [virtual]
 

Initializes the utility window. A object is created and the volume data is read. The window appears when finished.

Reimplemented from vuBasicUtility.

Definition at line 68 of file vuSpecFVR.cpp.

References vuTFDesign::addColour(), vuTFDesign::addOpacity(), vuTFDesignSpec::generateFunction(), vu1::getErrorMessage(), m_Data, m_TFunc, vu1112118::read(), vuTFDesign::setColourSmoothing(), vu1::setFileName(), and vuTFDesign::setOpacitySmoothing().

Here is the call graph for this function:

void vuSpecFVR::notifyDataChanged  )  [virtual]
 

external update trigger, virtual from some parent class

Reimplemented from vuBasicUtility.

Definition at line 166 of file vuSpecFVR.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:

void vuSpecFVR::OnButtonLightPos wxCommandEvent &  ev  )  [protected]
 

set light direction from current observer to centre of the volume

Definition at line 316 of file vuSpecFVR.cpp.

References getCamera(), vu1112::getCenter(), vuCamera::getPosition(), m_Data, vuVector::makeUnit(), and vu1112118::setLightDir().

Here is the call graph for this function:

void vuSpecFVR::OnButtonRender wxCommandEvent &  event  )  [protected]
 

initiate a refresh of the rendering

Definition at line 144 of file vuSpecFVR.cpp.

References vu1112118::doRefresh(), m_Data, and vuGLCanvas::redraw().

Here is the call graph for this function:

void vuSpecFVR::OnButtonTransform wxCommandEvent &  event  )  [protected]
 

initiate a refresh of the rendering

Definition at line 150 of file vuSpecFVR.cpp.

References vu1112118::doRefresh(), vu1112118::doSpectral(), m_Data, m_TFunc, vu1112118::preprocess(), vuGLCanvas::redraw(), and vu111211::setTransferFunc().

Here is the call graph for this function:

void vuSpecFVR::OnChar wxKeyEvent &  event  )  [protected, virtual]
 

keyboard handler

Reimplemented from vuBasicUtility.

Definition at line 160 of file vuSpecFVR.cpp.

References vu1112118::keyboard(), m_Data, and vuGLCanvas::redraw().

Here is the call graph for this function:

void vuSpecFVR::OnSlideLight wxScrollEvent &  event  )  [protected]
 

event handler for the light property sliders.

Definition at line 133 of file vuSpecFVR.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:


Member Data Documentation

vu1112118* vuSpecFVR::m_Data [private]
 

The spectral raycaster owned by the utility.

Definition at line 87 of file vuSpecFVR.h.

Referenced by DrawAgain(), getCamera(), getCurrentImage(), glInit(), glOnMouse(), glRender(), glResize(), init(), OnButtonLightPos(), OnButtonRender(), OnButtonTransform(), OnChar(), and ~vuSpecFVR().

bool vuSpecFVR::m_DrawBBox [private]
 

bounging box flag.

Draw a bounding box (using OpenGL) instead of blitting the scene view. OLD because of vuPreviewWin.

Definition at line 107 of file vuSpecFVR.h.

wxSlider* vuSpecFVR::m_LightColour [private]
 

Slider to control the properties of the light.

Calls the event handler OnSlideLight().

Definition at line 97 of file vuSpecFVR.h.

vuLightDial vuSpecFVR::m_LightDial [private]
 

Definition at line 92 of file vuSpecFVR.h.

Referenced by glOnMouse(), and glRender().

wxSlider * vuSpecFVR::m_LightIntensity [private]
 

Slider to control the properties of the light.

Calls the event handler OnSlideLight().

Definition at line 97 of file vuSpecFVR.h.

vuPreviewWin* vuSpecFVR::m_Preview [private]
 

This is a handle for a preview box.

Definition at line 110 of file vuSpecFVR.h.

vuTFDesignSpec vuSpecFVR::m_TFunc [private]
 

The transfer function.

This is not yet used because the TF don't yet operate on spectral colours.

Reimplemented from vuBasicUtility.

Definition at line 90 of file vuSpecFVR.h.

Referenced by glRender(), init(), and OnButtonTransform().

vuTFDialogSpec vuSpecFVR::m_TFuncDlg [private]
 

Definition at line 91 of file vuSpecFVR.h.

Referenced by glOnMouse(), and glRender().

int vuSpecFVR::m_x [private]
 

The width of the window.

Definition at line 100 of file vuSpecFVR.h.

Referenced by glOnMouse().

int vuSpecFVR::m_y [private]
 

The height of the window.

Definition at line 102 of file vuSpecFVR.h.

Referenced by glOnMouse().


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:22:02 2004 for vuVolume by  doxygen 1.3.9.1