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

vuFVR Class Reference

Created September 2002 By Martin Spindler. More...

#include <vuFVR.h>

Inheritance diagram for vuFVR:

Inheritance graph
[legend]
Collaboration diagram for vuFVR:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuFVR ()
 Constructor.
 ~vuFVR ()
 Destructor.
bool init (const char *DataFile)
virtual void notifyDataChanged ()
 Updates the view by calling m_glCanvas->redraw().
virtual void addRight (wxSizer *sizer)
 Rerenders the screen from the current camera position.
virtual void DrawAgain ()
 This function must rerender the scene completely.
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...).
virtual bool IsReRendering ()
 This will return whether or not the FVR is rerendering to the screen.
virtual void setIsReRendering (bool isit)
 This will set the state of rerendering to be the same as isit.

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 FVR utility.
void glRender ()
 Calls on the FVR to render the volume.
void glResize ()
 Resizes the gl viewport and renders the volume.
void glOnMouse (wxMouseEvent &ev)
 Handles mouse commands from the user.
void onKeyboard (wxKeyEvent &event)
 Keyboard handler.
void OnCheckBoxDepthCueing (wxCommandEvent &event)
 Callbacks for User Interface.
void OnCheckBoxDiffuseShading (wxCommandEvent &event)
void OnChoiceFilter (wxCommandEvent &event)
void setTitle (const char *_title)

Private Attributes

Filterm_Filter
vu1112117m_Data
 The FVR 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 FVR.
vuTFDesign m_TFunc
 the transfer function
vuTransferDialog m_TFDialog
 The dialog to edit the transfer function.
int m_x
 Last Mouse Position x.
int m_y
 Last Mouse Position y.
vuCamera m_CameraLight
float m_scaleX
float m_scaleY
bool m_isRefineSlice
wxCheckBox * m_CBdepthCueing
 Graphical User Interface Elements.
wxCheckBox * m_CBdiffuseShading
wxChoice * m_CHOICEfilter

Detailed Description

Created September 2002 By Martin Spindler.

Definition at line 16 of file vuFVR.h.


Constructor & Destructor Documentation

vuFVR::vuFVR  ) 
 

Constructor.

Definition at line 29 of file vuFVR.cpp.

vuFVR::~vuFVR  ) 
 

Destructor.

Definition at line 40 of file vuFVR.cpp.

References m_Data, and m_Filter.


Member Function Documentation

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

Rerenders the screen from the current camera position.

Reimplemented from vuBasicUtility.

Definition at line 131 of file vuFVR.cpp.

References idDEPTH_CUEING, idDIFFUSE_SHADING, idFILTER, m_CBdepthCueing, m_CBdiffuseShading, m_CHOICEfilter, and NULL.

void vuFVR::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 106 of file vuFVR.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:

void vuFVR::DrawFromImage  )  [virtual]
 

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

Implements vuBasicUtility.

Definition at line 111 of file vuFVR.cpp.

vuCamera * vuFVR::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 122 of file vuFVR.cpp.

vuImage * vuFVR::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 117 of file vuFVR.cpp.

References vu1112117::getBuffer(), and m_Data.

Here is the call graph for this function:

const char * vuFVR::getFileType  )  [static]
 

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

Reimplemented from vuBasicUtility.

Definition at line 50 of file vuFVR.cpp.

bool vuFVR::glInit  )  [protected, virtual]
 

Initializes open gl for the FVR utility.

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

Reimplemented from vuBasicUtility.

Definition at line 226 of file vuFVR.cpp.

References vu1112117::initOpenGL(), and m_Data.

Here is the call graph for this function:

void vuFVR::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 309 of file vuFVR.cpp.

References vuCamera::getLookAtVector(), vuCamera::getPosition(), vuCamera::getRightVector(), vuCamera::getUpVector(), vuCamera::gluLookAt(), m_Camera, m_CameraLight, m_Data, m_isRefineSlice, m_TFDialog, m_TFunc, m_x, m_y, vuVector::norm(), vuGLCanvas::redraw(), vuCamera::rotateAboutRight(), vuCamera::rotateAboutUp(), vu1::setIsReRendering(), vu1112117::setLightPosition(), vu111211::setTransferFunc(), vu1112117::setViewVectors(), and vuCamera::translateXYZ().

Here is the call graph for this function:

void vuFVR::glRender  )  [protected, virtual]
 

Calls on the FVR to render the volume.

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

Reimplemented from vuBasicUtility.

Definition at line 240 of file vuFVR.cpp.

References vu1112117::clearSlices(), vu1112117::computeSlice(), vu1112117::drawImageFromSlices(), vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_MODELVIEW, GL_PROJECTION, glClear(), glLoadIdentity(), glMatrixMode(), glPixelZoom(), vu1112117::IsPostProcessing(), vu1::IsReRendering(), m_Data, m_scaleX, m_scaleY, vu1112117::refineSlice(), vu1112117::render(), vu1112117::setIsPostProcessing(), and vu1::setIsReRendering().

Here is the call graph for this function:

void vuFVR::glResize  )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 297 of file vuFVR.cpp.

References vuGLCanvas::getHeight(), vu1112117::getSliceWidth(), vuGLCanvas::getWidth(), GLint, glViewport(), m_Data, m_scaleX, and m_scaleY.

Here is the call graph for this function:

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

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

Reimplemented from vuBasicUtility.

Definition at line 74 of file vuFVR.cpp.

References FVR_NS::d0_c0_1ef(), vu1::getErrorMessage(), m_CameraLight, m_Data, m_Filter, m_isRefineSlice, vu1112117::read(), vu1::setFileName(), vu1112117::setFilter(), vu1112117::setIsDepthCueing(), vu1112117::setIsDiffuseShading(), vuCamera::setPosition(), vu1112117::setSliceScale(), and setTitle().

Here is the call graph for this function:

bool vuFVR::IsReRendering  )  [virtual]
 

This will return whether or not the FVR is rerendering to the screen.

Reimplemented from vuBasicUtility.

Definition at line 435 of file vuFVR.cpp.

References vu1::IsReRendering(), and m_Data.

Here is the call graph for this function:

void vuFVR::notifyDataChanged  )  [virtual]
 

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

Reimplemented from vuBasicUtility.

Definition at line 288 of file vuFVR.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:

void vuFVR::OnCheckBoxDepthCueing wxCommandEvent &  event  )  [protected]
 

Callbacks for User Interface.

Definition at line 174 of file vuFVR.cpp.

References m_CBdepthCueing, m_Data, vuGLCanvas::redraw(), vu1112117::setIsDepthCueing(), and vu1::setIsReRendering().

Here is the call graph for this function:

void vuFVR::OnCheckBoxDiffuseShading wxCommandEvent &  event  )  [protected]
 

Definition at line 181 of file vuFVR.cpp.

References m_CBdiffuseShading, m_Data, vuGLCanvas::redraw(), vu1112117::setIsDiffuseShading(), and vu1::setIsReRendering().

Here is the call graph for this function:

void vuFVR::OnChoiceFilter wxCommandEvent &  event  )  [protected]
 

Definition at line 188 of file vuFVR.cpp.

void vuFVR::onKeyboard wxKeyEvent &  event  )  [protected, virtual]
 

Keyboard handler.

Reimplemented from vuBasicUtility.

Definition at line 383 of file vuFVR.cpp.

References vu1112117::clearSlices(), data, vu1112117::getAmbientColour(), vu1112117::getDiffuseColour(), m_Data, vuGLCanvas::redraw(), vu1112117::refineSlice(), vu1112117::setAmbientColour(), vu1112117::setDiffuseColour(), vu1112117::setIsPostProcessing(), and vu1::setIsReRendering().

Here is the call graph for this function:

void vuFVR::setIsReRendering bool  isit  )  [virtual]
 

This will set the state of rerendering to be the same as isit.

Reimplemented from vuBasicUtility.

Definition at line 439 of file vuFVR.cpp.

References m_Data, and vu1::setIsReRendering().

Here is the call graph for this function:

void vuFVR::setTitle const char *  _title  )  [protected]
 

Definition at line 59 of file vuFVR.cpp.

References vuString::c_str(), vu1112::getDim1Size(), vu1112::getDim2Size(), vu1112::getDim3Size(), and m_Data.

Referenced by init().

Here is the call graph for this function:


Member Data Documentation

vuCamera vuFVR::m_Camera [private]
 

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

Definition at line 94 of file vuFVR.h.

Referenced by glOnMouse().

vuCamera vuFVR::m_CameraLight [private]
 

Definition at line 111 of file vuFVR.h.

Referenced by glOnMouse(), and init().

wxCheckBox* vuFVR::m_CBdepthCueing [private]
 

Graphical User Interface Elements.

Definition at line 121 of file vuFVR.h.

Referenced by addRight(), and OnCheckBoxDepthCueing().

wxCheckBox* vuFVR::m_CBdiffuseShading [private]
 

Definition at line 122 of file vuFVR.h.

Referenced by addRight(), and OnCheckBoxDiffuseShading().

wxChoice* vuFVR::m_CHOICEfilter [private]
 

Definition at line 123 of file vuFVR.h.

Referenced by addRight().

vu1112117* vuFVR::m_Data [private]
 

The FVR owned by the utility.

Definition at line 92 of file vuFVR.h.

Referenced by getCurrentImage(), glInit(), glOnMouse(), glRender(), glResize(), init(), IsReRendering(), OnCheckBoxDepthCueing(), OnCheckBoxDiffuseShading(), onKeyboard(), setIsReRendering(), setTitle(), and ~vuFVR().

Filter* vuFVR::m_Filter [private]
 

Definition at line 90 of file vuFVR.h.

Referenced by init(), and ~vuFVR().

bool vuFVR::m_isRefineSlice [private]
 

Definition at line 118 of file vuFVR.h.

Referenced by glOnMouse(), and init().

float vuFVR::m_scaleX [private]
 

Definition at line 115 of file vuFVR.h.

Referenced by glRender(), and glResize().

float vuFVR::m_scaleY [private]
 

Definition at line 116 of file vuFVR.h.

Referenced by glRender(), and glResize().

vuTransferDialog vuFVR::m_TFDialog [private]
 

The dialog to edit the transfer function.

Definition at line 100 of file vuFVR.h.

Referenced by glOnMouse().

vuTFDesign vuFVR::m_TFunc [private]
 

the transfer function

Reimplemented from vuBasicUtility.

Definition at line 98 of file vuFVR.h.

Referenced by glOnMouse().

float vuFVR::m_ViewScale [private]
 

The zoom magnification of the FVR.

Definition at line 96 of file vuFVR.h.

int vuFVR::m_x [private]
 

Last Mouse Position x.

Definition at line 107 of file vuFVR.h.

Referenced by glOnMouse().

int vuFVR::m_y [private]
 

Last Mouse Position y.

Definition at line 109 of file vuFVR.h.

Referenced by glOnMouse().


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