#include <vuCellProjector.h>
Inheritance diagram for vuCellProjector:
Public Member Functions | |
vuCellProjector () | |
Constructor. | |
~vuCellProjector () | |
Destructor. | |
void | addRight (wxSizer *sizer) |
Adds some controls to a right hand panel in utility window. | |
bool | init (const char *DataFile) |
Initializes the cellProjector utility. | |
void | notifyDataChanged () |
Updates the view by calling m_glCanvas->redraw(). | |
void | DrawAgain () |
Rerenders the screen from the current camera position. | |
void | DrawFromImage () |
Draws on the screen the image contained in the image buffer. | |
vuImage * | getCurrentImage () |
This will return a pointer to the image buffer that is being used by the method to draw images to... | |
vuCamera * | getCamera () |
This will return a poiunter to the camera that this class is using (note that this may be derived from vuCamera...). | |
bool | IsReRendering () |
This will return whether or not the cellProjector is rerendering to the screen. | |
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 openGL for the cellProjector utility. | |
void | glRender () |
Calls on the cellProjectorter to render the volume. | |
void | glResize () |
Resizes the gl viewport and renders the volume. | |
void | glOnMouse (wxMouseEvent &ev) |
Handles additional mouse commands from the user. | |
vu1 * | getVolume () |
Returns a parent pointer to the current algorithm. | |
void | OnChar (wxKeyEvent &event) |
Overwritten keyboard handler from vuBasicUtility. | |
void | onCheckBoxIsSort () |
Controls whether the cell projector sorts and triangulates its tets. | |
void | onListBoxSubdivScheme () |
Controls which subdivision scheme to use. | |
void | onButtonRender () |
When user presses this button, renders the data set with current settings. | |
void | addCheckBoxIsSort (wxSizer *sizer) |
Add checkbox for whether to sort and triangulate data set. | |
void | addListBoxSubdivScheme (wxSizer *sizer) |
Add listbox for subdiv scheme. | |
void | addButtonRender (wxSizer *sizer) |
Adds a button for whether or not to render the data set. | |
Private Attributes | |
vu111211a * | m_Data |
The cellProjector 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 cellProjector. | |
vuTFDesign | m_TFunc |
the transfer function | |
vuTransferDialog | m_TFDialog |
The dialog to edit the transfer function. | |
int | m_x |
The x click position of the mouse. | |
int | m_y |
The y click position of the mouse. | |
wxCheckBox * | m_checkBoxIsSort |
Whether or not to perform sorting and triangulation. | |
wxListBox * | m_listBoxSubdivScheme |
List of subdivision algorithms currently available. |
This class is a utility window wrapper for Steve's general cellProjectorter. This cellProjectorter 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 41 of file vuCellProjector.h.
|
Constructor.
Definition at line 47 of file vuCellProjector.cpp. |
|
Destructor.
Definition at line 61 of file vuCellProjector.cpp. References m_Data. |
|
Adds a button for whether or not to render the data set. Since the cell projector is so slow, it is desirable to allow the user to rotate to a desired location, then render. Definition at line 545 of file vuCellProjector.cpp. References idButtonRender. Referenced by addRight(). |
|
Add checkbox for whether to sort and triangulate data set.
Definition at line 498 of file vuCellProjector.cpp. References idCheckBoxIsSort, m_checkBoxIsSort, m_Data, and vu111211a::m_isSort. Referenced by addRight(). |
|
Add listbox for subdiv scheme.
Definition at line 517 of file vuCellProjector.cpp. References idListBoxSubdivScheme, m_Data, m_listBoxSubdivScheme, and vu111211a::m_subdivScheme. Referenced by addRight(). |
|
Adds some controls to a right hand panel in utility window.
Reimplemented from vuBasicUtility. Definition at line 80 of file vuCellProjector.cpp. References addButtonRender(), addCheckBoxIsSort(), and addListBoxSubdivScheme(). |
Here is the call graph for this function:
|
Rerenders the screen from the current camera position.
Implements vuBasicUtility. Definition at line 146 of file vuCellProjector.cpp. References vuGLCanvas::redraw(). Referenced by OnChar(). |
Here is the call graph for this function:
|
Draws on the screen the image contained in the image buffer. Can't have const qualifier coz the original pure virtual function doesn't have it and if this does the compilor will choke. Overridden virtual functions have to have the exact same scope, prototype and qualifiers in order for polymorphism to work. Implements vuBasicUtility. Definition at line 156 of file vuCellProjector.cpp. References vu111211a::drawPic(), and m_Data. |
Here is the call graph for this function:
|
This will return a poiunter to the camera that this class is using (note that this may be derived from vuCamera...).
Implements vuBasicUtility. Definition at line 177 of file vuCellProjector.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 167 of file vuCellProjector.cpp. References vu111211a::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 70 of file vuCellProjector.cpp. |
|
Returns a parent pointer to the current algorithm.
Reimplemented from vuBasicUtility. Definition at line 401 of file vuCellProjector.cpp. |
|
Initializes openGL for the cellProjector utility. The method calls the CellProjector initGL() method so it can do the proper initialization. Reimplemented from vuBasicUtility. Definition at line 208 of file vuCellProjector.cpp. References GL_LIGHT0, GL_LIGHT_MODEL_TWO_SIDE, GL_LIGHTING, GL_TRUE, glClearColor(), glEnable(), GLfloat, glLightModeli(), vu111211a::initOpenGL(), and m_Data. |
Here is the call graph for this function:
|
Handles additional mouse commands from the user. onMouse() is the one that vuBasicUtility asks client programmers to override, not glOnMouse. But vuBasicUtility::glOnMouse doesn't work. Reimplemented from vuBasicUtility. Definition at line 346 of file vuCellProjector.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 cellProjectorter to render the volume. The method calls the cellProjectorter render() method, setting it up to render to the window's gl canvas. Reimplemented from vuBasicUtility. Definition at line 239 of file vuCellProjector.cpp. References vu1112::getDim1Size(), vu1112::getDim2Size(), vu1112::getDim3Size(), vuCamera::getLookAtVector(), vuCamera::getRightVector(), vuCamera::getUpVector(), GL_COLOR_BUFFER_BIT, GL_MODELVIEW, glClear(), glLoadIdentity(), glMatrixMode(), glTranslatef(), vuCamera::gluLookAt(), m_Camera, m_Data, m_TFunc, vu111211a::render(), vu111211::setTransferFunc(), and vu111211a::setViewVectors(). |
Here is the call graph for this function:
|
Resizes the gl viewport and renders the volume.
Reimplemented from vuBasicUtility. Definition at line 277 of file vuCellProjector.cpp. References dword, vu1112::getDim1Size(), vu1112::getDim2Size(), vu1112::getDim3Size(), vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), GL_MODELVIEW, GL_PROJECTION, GLfloat, GLint, glLoadIdentity(), glMatrixMode(), glOrtho(), glViewport(), m_Data, m_ViewScale, and max. Referenced by glOnMouse(). |
Here is the call graph for this function:
|
Initializes the cellProjector utility. Initializes the utility window. A cellProjector object is created and the volume data is read. The window appears when finished. Reimplemented from vuBasicUtility. Definition at line 92 of file vuCellProjector.cpp. References vuTFDesign::generateFunction(), vu1::getErrorMessage(), vuTFDesign::loadTF(), m_Data, m_TFunc, vu111211a::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 cellProjector is rerendering to the screen.
Reimplemented from vuBasicUtility. Definition at line 188 of file vuCellProjector.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 136 of file vuCellProjector.cpp. References vuGLCanvas::redraw(). |
Here is the call graph for this function:
|
When user presses this button, renders the data set with current settings.
Definition at line 485 of file vuCellProjector.cpp. |
|
Overwritten keyboard handler from vuBasicUtility. If data size is 8, the keys 0~4 will display 5 tets If data size is 12, the keys 0~9 will display the 10 tets. onKeyboard should be the one overridden, according to vuBasicUtility. But vuBasicUtility::OnChar doesn't work. Reimplemented from vuBasicUtility. Definition at line 413 of file vuCellProjector.cpp. References DrawAgain(), dword, m_Data, vu1::m_DataSize, vu111211a::m_state, vu111211a::m_subdivScheme, vu111211a::m_tetIndex, and SIX_FOLD. |
Here is the call graph for this function:
|
Controls whether the cell projector sorts and triangulates its tets.
Definition at line 457 of file vuCellProjector.cpp. References vu111211a::m_isSort. |
|
Controls which subdivision scheme to use.
Definition at line 471 of file vuCellProjector.cpp. |
|
This will set the state of rerendering to be the same as isit.
Reimplemented from vuBasicUtility. Definition at line 198 of file vuCellProjector.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 171 of file vuCellProjector.h. Referenced by glOnMouse(), and glRender(). |
|
Whether or not to perform sorting and triangulation. For render-timing comparative purposes. Definition at line 192 of file vuCellProjector.h. Referenced by addCheckBoxIsSort(). |
|
The cellProjector owned by the utility.
Definition at line 168 of file vuCellProjector.h. Referenced by addCheckBoxIsSort(), addListBoxSubdivScheme(), DrawFromImage(), getCurrentImage(), glInit(), glRender(), glResize(), init(), IsReRendering(), OnChar(), setIsReRendering(), and ~vuCellProjector(). |
|
List of subdivision algorithms currently available. 5-fold, 6-fold, more to come later. Should become auto-scrollable if a lot of entries go in here. Definition at line 199 of file vuCellProjector.h. Referenced by addListBoxSubdivScheme(). |
|
The dialog to edit the transfer function.
Definition at line 180 of file vuCellProjector.h. Referenced by glOnMouse(). |
|
the transfer function
Reimplemented from vuBasicUtility. Definition at line 177 of file vuCellProjector.h. Referenced by glRender(), and init(). |
|
The zoom magnification of the cellProjector.
Definition at line 174 of file vuCellProjector.h. Referenced by glOnMouse(), and glResize(). |
|
The x click position of the mouse.
Definition at line 183 of file vuCellProjector.h. Referenced by glOnMouse(). |
|
The y click position of the mouse.
Definition at line 185 of file vuCellProjector.h. Referenced by glOnMouse(). |