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

vuSpecSplat Class Reference

A utility window for the spectral splatter. More...

#include <vuSpecSplat.h>

Inheritance diagram for vuSpecSplat:

Inheritance graph
[legend]
Collaboration diagram for vuSpecSplat:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuSpecSplat ()
 Constructor.
 ~vuSpecSplat ()
 Destructor.
bool init (const char *DataFile)
 Initializes the splatter utility.
virtual void notifyDataChanged ()
 Updates the view by calling m_glCanvas->redraw().
virtual void DrawAgain ()
 Rerenders the screen from the current camera position.
virtual void DrawFromImage ()
 Draws on the screen the image contained in the image buffer.
virtual vuImagegetCurrentImage ()
 This will return a pointer to the image buffer that is being used by the method to draw images to...
virtual vuCameragetCamera ()
 This will return a poiunter to the camera that the method is using (note that this may be derived from vuCamera...).

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 splatter utility.
void glRender ()
 Calls on the splatter to render the volume.
void glResize ()
 Resizes the gl viewport and renders the volume.
void glOnMouse (wxMouseEvent &ev)
 Handles mouse commands from the user.

Private Attributes

vu1112115m_Data
 The splatter owned by the utility.
vuCamera m_Camera
 A camera class for storing the user's current view.
float m_ViewScale
 The zoom magnification of the splatter.
vuTFDesignSpec m_TFunc
 the transfer function
vuTFDialogSpec m_TFDialog
 The dialog to edit the transfer function.
vuLightDial m_LightDial
 The light dialer.
int m_x
 The width of the window.
int m_y
 The height of the window.

Detailed Description

A utility window for the spectral splatter.

Definition at line 16 of file vuSpecSplat.h.


Constructor & Destructor Documentation

vuSpecSplat::vuSpecSplat  ) 
 

Constructor.

Definition at line 26 of file vuSpecSplat.cpp.

vuSpecSplat::~vuSpecSplat  ) 
 

Destructor.

Definition at line 37 of file vuSpecSplat.cpp.

References m_Data.


Member Function Documentation

void vuSpecSplat::DrawAgain  )  [virtual]
 

Rerenders the screen from the current camera position.

Implements vuBasicUtility.

Definition at line 232 of file vuSpecSplat.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:

void vuSpecSplat::DrawFromImage  )  [virtual]
 

Draws on the screen the image contained in the image buffer.

Implements vuBasicUtility.

Definition at line 238 of file vuSpecSplat.cpp.

References vu1112115::drawPic(), and m_Data.

Here is the call graph for this function:

vuCamera * vuSpecSplat::getCamera  )  [virtual]
 

This will return a poiunter to the camera that the method is using (note that this may be derived from vuCamera...).

Implements vuBasicUtility.

Definition at line 250 of file vuSpecSplat.cpp.

vuImage * vuSpecSplat::getCurrentImage  )  [virtual]
 

This will return a pointer to the image buffer that is being used by the method to draw images to...

Implements vuBasicUtility.

Definition at line 244 of file vuSpecSplat.cpp.

References vu1112115::getBuffer(), and m_Data.

Here is the call graph for this function:

const char * vuSpecSplat::getFileType  )  [static]
 

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

Reimplemented from vuBasicUtility.

Definition at line 46 of file vuSpecSplat.cpp.

bool vuSpecSplat::glInit  )  [protected, virtual]
 

Initializes open gl for the splatter utility.

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

Reimplemented from vuBasicUtility.

Definition at line 100 of file vuSpecSplat.cpp.

References GL_LIGHT0, GL_LIGHT_MODEL_TWO_SIDE, GL_LIGHTING, GL_TRUE, glClearColor(), glEnable(), glLightModeli(), vu1112115::initOpenGL(), and m_Data.

Here is the call graph for this function:

void vuSpecSplat::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 185 of file vuSpecSplat.cpp.

References vuCamera::getPosition(), glResize(), m_Camera, m_LightDial, m_TFDialog, m_ViewScale, m_x, m_y, vuVector::norm(), vuGLCanvas::redraw(), vuCamera::rotateAboutRight(), vuCamera::rotateAboutUp(), and vuCamera::translateXYZ().

Here is the call graph for this function:

void vuSpecSplat::glRender  )  [protected, virtual]
 

Calls on the splatter to render the volume.

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

Reimplemented from vuBasicUtility.

Definition at line 119 of file vuSpecSplat.cpp.

References vu1112::getDim1Size(), vu1112::getDim2Size(), vu1112::getDim3Size(), vuCamera::getLookAtVector(), vuCamera::getRightVector(), vuCamera::getUpVector(), GL_COLOR_BUFFER_BIT, glClear(), glLoadIdentity(), glTranslatef(), vuCamera::gluLookAt(), m_Camera, m_Data, m_TFunc, vu1112115::render(), vu111211::setTransferFunc(), and vu1112115::setViewVectors().

Here is the call graph for this function:

void vuSpecSplat::glResize  )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 155 of file vuSpecSplat.cpp.

References dword, vu1112::getDim1Size(), vu1112::getDim2Size(), vu1112::getDim3Size(), vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), GL_LIGHT0, GL_MODELVIEW, GL_POSITION, GL_PROJECTION, GLint, glLightfv(), glLoadIdentity(), glMatrixMode(), glOrtho(), glViewport(), m_Data, m_ViewScale, and max.

Referenced by glOnMouse().

Here is the call graph for this function:

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

Initializes the splatter utility.

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

Reimplemented from vuBasicUtility.

Definition at line 55 of file vuSpecSplat.cpp.

References vuTFDesignSpec::generateFunction(), vu1::getErrorMessage(), m_Data, m_TFunc, vu1112115::read(), vu1::setFileName(), and vu111211::setTransferFunc().

Here is the call graph for this function:

void vuSpecSplat::notifyDataChanged  )  [virtual]
 

Updates the view by calling m_glCanvas->redraw().

Reimplemented from vuBasicUtility.

Definition at line 145 of file vuSpecSplat.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:


Member Data Documentation

vuCamera vuSpecSplat::m_Camera [private]
 

A camera class for storing the user's current view.

Definition at line 74 of file vuSpecSplat.h.

Referenced by glOnMouse(), and glRender().

vu1112115* vuSpecSplat::m_Data [private]
 

The splatter owned by the utility.

Definition at line 72 of file vuSpecSplat.h.

Referenced by DrawFromImage(), getCurrentImage(), glInit(), glRender(), glResize(), init(), and ~vuSpecSplat().

vuLightDial vuSpecSplat::m_LightDial [private]
 

The light dialer.

Definition at line 82 of file vuSpecSplat.h.

Referenced by glOnMouse().

vuTFDialogSpec vuSpecSplat::m_TFDialog [private]
 

The dialog to edit the transfer function.

Definition at line 80 of file vuSpecSplat.h.

Referenced by glOnMouse().

vuTFDesignSpec vuSpecSplat::m_TFunc [private]
 

the transfer function

Reimplemented from vuBasicUtility.

Definition at line 78 of file vuSpecSplat.h.

Referenced by glRender(), and init().

float vuSpecSplat::m_ViewScale [private]
 

The zoom magnification of the splatter.

Definition at line 76 of file vuSpecSplat.h.

Referenced by glOnMouse(), and glResize().

int vuSpecSplat::m_x [private]
 

The width of the window.

Definition at line 85 of file vuSpecSplat.h.

Referenced by glOnMouse().

int vuSpecSplat::m_y [private]
 

The height of the window.

Definition at line 87 of file vuSpecSplat.h.

Referenced by glOnMouse().


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