#include <vuSplat.h>
Inheritance diagram for vuSplat:
Public Member Functions | |
vuSplat () | |
Constructor. | |
~vuSplat () | |
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 vuImage * | getCurrentImage () |
This will return a pointer to the image buffer that is being used by the method to draw images to... | |
virtual vuCamera * | getCamera () |
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 splatter 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 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 | |
vu1112111 * | m_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. | |
vuTFDesign | m_TFunc |
the transfer function | |
vuTransferDialog | m_TFDialog |
The dialog to edit the transfer function. | |
int | m_x |
The width of the window. | |
int | m_y |
The height of the window. |
This class is a utility window wrapper for Steve's general splatter. This splatter is part of the vuVolume tree, and is meant to be as general as possible. (see the included header files). The utility displays an OpenGL window which lets users rotate the object, zoom it, as well as edit the transfer function. All these commands are done using the mouse.
The class is a good example of a general vuGui utility. It can be used as a model for building other utilities.
Definition at line 36 of file vuSplat.h.
|
Constructor.
Definition at line 25 of file vuSplat.cpp. |
|
Destructor.
Definition at line 35 of file vuSplat.cpp. References m_Data. |
|
Rerenders the screen from the current camera position.
Implements vuBasicUtility. Definition at line 102 of file vuSplat.cpp. References vuGLCanvas::redraw(). |
Here is the call graph for this function:
|
Draws on the screen the image contained in the image buffer.
Implements vuBasicUtility. Definition at line 108 of file vuSplat.cpp. References vu1112111::drawPic(), and m_Data. |
Here is the call graph for this function:
|
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 120 of file vuSplat.cpp. |
|
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 114 of file vuSplat.cpp. References vu1112111::getBuffer(), and m_Data. |
Here is the call graph for this function:
|
Returns the type of vu Datafile that the utility works with.
Reimplemented from vuBasicUtility. Definition at line 44 of file vuSplat.cpp. |
|
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 130 of file vuSplat.cpp. References GL_LIGHT0, GL_LIGHT_MODEL_TWO_SIDE, GL_LIGHTING, GL_TRUE, glClearColor(), glEnable(), glLightModeli(), vu1112111::initOpenGL(), and m_Data. |
Here is the call graph for this function:
|
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 219 of file vuSplat.cpp. References vuCamera::getPosition(), glResize(), m_Camera, 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:
|
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 149 of file vuSplat.cpp. References vu1112::getDim1Size(), vu1112::getDim2Size(), vu1112::getDim3Size(), vuCamera::getLookAtVector(), vuTFIntensity::getNComponents(), vuCamera::getRightVector(), vuCamera::getUpVector(), GL_COLOR_BUFFER_BIT, glClear(), glLoadIdentity(), glTranslatef(), vuCamera::gluLookAt(), m_Camera, m_Data, m_TFunc, vu1112111::render(), vu111211::setTransferFunc(), and vu1112111::setViewVectors(). |
Here is the call graph for this function:
|
Resizes the gl viewport and renders the volume.
Reimplemented from vuBasicUtility. Definition at line 189 of file vuSplat.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:
|
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 53 of file vuSplat.cpp. References vuTFDesign::addColour(), vuTFDesign::addOpacity(), vuTFDesign::generateFunction(), vu1::getErrorMessage(), m_Data, m_TFunc, vu1112111::read(), vuTFDesign::setColourSmoothing(), vu1::setFileName(), vuTFDesign::setOpacitySmoothing(), and vu111211::setTransferFunc(). |
Here is the call graph for this function:
|
This will return whether or not the splatter is rerendering to the screen.
Reimplemented from vuBasicUtility. Definition at line 269 of file vuSplat.cpp. References vu1::IsReRendering(), and m_Data. |
Here is the call graph for this function:
|
Updates the view by calling m_glCanvas->redraw().
Reimplemented from vuBasicUtility. Definition at line 180 of file vuSplat.cpp. References vuGLCanvas::redraw(). |
Here is the call graph for this function:
|
This will set the state of rerendering to be the same as isit.
Reimplemented from vuBasicUtility. Definition at line 275 of file vuSplat.cpp. References m_Data, and vu1::setIsReRendering(). |
Here is the call graph for this function:
|
A camera class for storing the user's current view.
Definition at line 101 of file vuSplat.h. Referenced by glOnMouse(), and glRender(). |
|
The splatter owned by the utility.
Definition at line 99 of file vuSplat.h. Referenced by DrawFromImage(), getCurrentImage(), glInit(), glRender(), glResize(), init(), IsReRendering(), setIsReRendering(), and ~vuSplat(). |
|
The dialog to edit the transfer function.
Definition at line 107 of file vuSplat.h. Referenced by glOnMouse(). |
|
the transfer function
Reimplemented from vuBasicUtility. Definition at line 105 of file vuSplat.h. Referenced by glRender(), and init(). |
|
The zoom magnification of the splatter.
Definition at line 103 of file vuSplat.h. Referenced by glOnMouse(), and glResize(). |
|
The width of the window.
Definition at line 110 of file vuSplat.h. Referenced by glOnMouse(). |
|
The height of the window.
Definition at line 112 of file vuSplat.h. Referenced by glOnMouse(). |