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

vuShearWarp Class Reference

A utility window for shear-warp. More...

#include <vuShearWarp.h>

Inheritance diagram for vuShearWarp:

Inheritance graph
[legend]
Collaboration diagram for vuShearWarp:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuShearWarp ()
 Constructor.
 ~vuShearWarp ()
 Destructor.
bool init (const char *DataFile)
virtual void addBottom (wxSizer *sizer)
 This method adds controls to the bottom of the window.
virtual void addLeft (wxSizer *sizer)
 This method adds controls to the left part of the window.
virtual void DrawAgain ()
 This function must rerender the scene completely.
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 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.

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 OnButtonTransferFunction (wxCommandEvent &event)
void OnButtonApplyViewing (wxCommandEvent &event)
void OnRadioBoxProjection (wxCommandEvent &event)
void OnScrollPerspective (wxCommandEvent &event)
void OnCheckBoxFastClassification (wxCommandEvent &event)
void OnCheckBoxSpecular (wxCommandEvent &event)
void OnCheckBoxWarpOpenGL (wxCommandEvent &event)

Private Attributes

vu111211Am_Data
 The shear-warp owned by the utility.
wxTextCtrl * viewXTextCtrl
 Text-fields for X-, Y- and Z-Coordinates of the viewing vector.
wxTextCtrl * viewYTextCtrl
wxTextCtrl * viewZTextCtrl
wxTextCtrl * upXTextCtrl
 Text-fields for X-, Y- and Z-Coordinates of the up vector.
wxTextCtrl * upYTextCtrl
wxTextCtrl * upZTextCtrl
wxButton * applyViewingButton
 Button for applying the viewing settings.
wxCheckBox * fastClassCheckBox
 CheckBox for turning on/off fast classification.
wxCheckBox * specularCheckBox
 CheckBox for turning on/off specular light.
wxRadioBox * projectionRadioBox
 2 Radio Boxes for choosing beetween orthogonal and perspective projection
vuCamera m_Camera
 A camera class for storing the user's current view.
float m_ViewScale
 The zoom magnification of the shear-warp.
vuTFDesign m_TFunc
 The transfer function to be applied to the shear-warp.
wxSlider * m_LightColour
wxSlider * m_LightIntensity
int m_x
 The width of the window.
int m_y
 The height of the window.

Detailed Description

A utility window for shear-warp.

Derived from vuSplat Utility.

Definition at line 16 of file vuShearWarp.h.


Constructor & Destructor Documentation

vuShearWarp::vuShearWarp  ) 
 

Constructor.

Definition at line 37 of file vuShearWarp.cpp.

vuShearWarp::~vuShearWarp  ) 
 

Destructor.

Definition at line 46 of file vuShearWarp.cpp.

References m_Data.


Member Function Documentation

void vuShearWarp::addBottom wxSizer *  sizer  )  [virtual]
 

This method adds controls to the bottom of the window.

Reimplemented from vuBasicUtility.

Definition at line 314 of file vuShearWarp.cpp.

void vuShearWarp::addLeft wxSizer *  sizer  )  [virtual]
 

This method adds controls to the left part of the window.

Reimplemented from vuBasicUtility.

Definition at line 170 of file vuShearWarp.cpp.

References applyViewingButton, fastClassCheckBox, idAPPLYVIEWING, idFAST_CLASSIFICATION, idPROJECTION, idSCROLL, idSPECULAR, idTRANSFERFUNCTION, idWARP_OPENGL, projectionRadioBox, specularCheckBox, upXTextCtrl, upYTextCtrl, upZTextCtrl, viewXTextCtrl, viewYTextCtrl, and viewZTextCtrl.

void vuShearWarp::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 51 of file vuShearWarp.cpp.

void vuShearWarp::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 54 of file vuShearWarp.cpp.

vuCamera * vuShearWarp::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 57 of file vuShearWarp.cpp.

vuImage * vuShearWarp::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 61 of file vuShearWarp.cpp.

const char * vuShearWarp::getFileType  )  [static]
 

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

Reimplemented from vuBasicUtility.

Definition at line 68 of file vuShearWarp.cpp.

bool vuShearWarp::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 321 of file vuShearWarp.cpp.

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

Referenced by glResize().

Here is the call graph for this function:

void vuShearWarp::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 534 of file vuShearWarp.cpp.

References vu111211A::classify(), vu111211A::getFastClassification(), vuCamera::getPosition(), vuTransferDialog::getTransferFunc(), glResize(), m_Camera, m_Data, m_TFunc, m_ViewScale, m_x, m_y, vuVector::norm(), vuGLCanvas::redraw(), vuCamera::rotateAboutRight(), vuCamera::rotateAboutUp(), vu111211A::runlengthEncode(), vu111211::setTransferFunc(), vuCamera::translateXYZ(), and vu111211A::zoom().

Here is the call graph for this function:

void vuShearWarp::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 341 of file vuShearWarp.cpp.

References vuCamera::getLookAtVector(), vuCamera::getRightVector(), vuCamera::getUpVector(), m_Camera, m_Data, vu111211A::render(), and vu111211A::setViewVectors().

Here is the call graph for this function:

void vuShearWarp::glResize  )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 359 of file vuShearWarp.cpp.

References vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), glInit(), GLint, glViewport(), m_Data, and vu111211A::setCanvasSize().

Referenced by glOnMouse(), init(), and OnButtonTransferFunction().

Here is the call graph for this function:

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

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

Reimplemented from vuBasicUtility.

Definition at line 76 of file vuShearWarp.cpp.

References vuTFDesign::addOpacity(), buffer, vuTFDesign::generateFunction(), vu111211A::getDimensions(), vu1::getErrorMessage(), vu1::getFileName(), glResize(), m_Data, m_TFunc, vu111211A::read(), vuTFDesign::setColourSmoothing(), vu1::setFileName(), vuTFDesign::setOpacitySmoothing(), vu111211::setTransferFunc(), and vuBasicUtility::useOpenGL().

Here is the call graph for this function:

void vuShearWarp::OnButtonApplyViewing wxCommandEvent &  event  )  [protected]
 

Definition at line 427 of file vuShearWarp.cpp.

References vuVector::cross, vuCamera::getLookAtVector(), vuCamera::getRightVector(), vuCamera::getUpVector(), m_Camera, m_Data, vuVector::makeUnit(), vuGLCanvas::redraw(), vu111211A::render(), vuCamera::setLookAtVector(), vuCamera::setUpVector(), vu111211A::setViewVectors(), upXTextCtrl, upYTextCtrl, upZTextCtrl, viewXTextCtrl, viewYTextCtrl, and viewZTextCtrl.

Here is the call graph for this function:

void vuShearWarp::OnButtonTransferFunction wxCommandEvent &  event  )  [protected]
 

Definition at line 493 of file vuShearWarp.cpp.

References vuTransferDialog::getTransferFunc(), glResize(), m_Data, m_TFunc, vuGLCanvas::redraw(), vu111211A::render(), vu111211A::runlengthEncode(), and vu111211::setTransferFunc().

Here is the call graph for this function:

void vuShearWarp::OnCheckBoxFastClassification wxCommandEvent &  event  )  [protected]
 

Definition at line 371 of file vuShearWarp.cpp.

References fastClassCheckBox, m_Data, projectionRadioBox, and vu111211A::setFastClassification().

Here is the call graph for this function:

void vuShearWarp::OnCheckBoxSpecular wxCommandEvent &  event  )  [protected]
 

Definition at line 415 of file vuShearWarp.cpp.

References m_Data, and vu111211A::setSpecular().

Here is the call graph for this function:

void vuShearWarp::OnCheckBoxWarpOpenGL wxCommandEvent &  event  )  [protected]
 

Definition at line 389 of file vuShearWarp.cpp.

References m_Data, and vu111211A::setOrthogonalWarpOpenGL().

Here is the call graph for this function:

void vuShearWarp::OnRadioBoxProjection wxCommandEvent &  event  )  [protected]
 

Definition at line 512 of file vuShearWarp.cpp.

References fastClassCheckBox, m_Data, projectionRadioBox, vuGLCanvas::redraw(), vu111211A::render(), and vu111211A::setViewing().

Here is the call graph for this function:

void vuShearWarp::OnScrollPerspective wxCommandEvent &  event  )  [protected]
 

Definition at line 402 of file vuShearWarp.cpp.

References vu111211A::getMaxSize(), vu111211A::getMinEyeDistance(), m_Data, vuGLCanvas::redraw(), vu111211A::render(), and vu111211A::setEyeDistance().

Here is the call graph for this function:


Member Data Documentation

wxButton* vuShearWarp::applyViewingButton [private]
 

Button for applying the viewing settings.

Definition at line 88 of file vuShearWarp.h.

Referenced by addLeft().

wxCheckBox* vuShearWarp::fastClassCheckBox [private]
 

CheckBox for turning on/off fast classification.

Definition at line 90 of file vuShearWarp.h.

Referenced by addLeft(), OnCheckBoxFastClassification(), and OnRadioBoxProjection().

vuCamera vuShearWarp::m_Camera [private]
 

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

Definition at line 96 of file vuShearWarp.h.

Referenced by glOnMouse(), glRender(), and OnButtonApplyViewing().

vu111211A* vuShearWarp::m_Data [private]
 

The shear-warp owned by the utility.

Definition at line 78 of file vuShearWarp.h.

Referenced by glInit(), glOnMouse(), glRender(), glResize(), init(), OnButtonApplyViewing(), OnButtonTransferFunction(), OnCheckBoxFastClassification(), OnCheckBoxSpecular(), OnCheckBoxWarpOpenGL(), OnRadioBoxProjection(), OnScrollPerspective(), and ~vuShearWarp().

wxSlider* vuShearWarp::m_LightColour [private]
 

Definition at line 102 of file vuShearWarp.h.

wxSlider * vuShearWarp::m_LightIntensity [private]
 

Definition at line 102 of file vuShearWarp.h.

vuTFDesign vuShearWarp::m_TFunc [private]
 

The transfer function to be applied to the shear-warp.

Reimplemented from vuBasicUtility.

Definition at line 100 of file vuShearWarp.h.

Referenced by glOnMouse(), init(), and OnButtonTransferFunction().

float vuShearWarp::m_ViewScale [private]
 

The zoom magnification of the shear-warp.

Definition at line 98 of file vuShearWarp.h.

Referenced by glOnMouse().

int vuShearWarp::m_x [private]
 

The width of the window.

Definition at line 105 of file vuShearWarp.h.

Referenced by glOnMouse().

int vuShearWarp::m_y [private]
 

The height of the window.

Definition at line 107 of file vuShearWarp.h.

Referenced by glOnMouse().

wxRadioBox* vuShearWarp::projectionRadioBox [private]
 

2 Radio Boxes for choosing beetween orthogonal and perspective projection

Definition at line 94 of file vuShearWarp.h.

Referenced by addLeft(), OnCheckBoxFastClassification(), and OnRadioBoxProjection().

wxCheckBox* vuShearWarp::specularCheckBox [private]
 

CheckBox for turning on/off specular light.

Definition at line 92 of file vuShearWarp.h.

Referenced by addLeft().

wxTextCtrl* vuShearWarp::upXTextCtrl [private]
 

Text-fields for X-, Y- and Z-Coordinates of the up vector.

Definition at line 84 of file vuShearWarp.h.

Referenced by addLeft(), and OnButtonApplyViewing().

wxTextCtrl* vuShearWarp::upYTextCtrl [private]
 

Definition at line 85 of file vuShearWarp.h.

Referenced by addLeft(), and OnButtonApplyViewing().

wxTextCtrl* vuShearWarp::upZTextCtrl [private]
 

Definition at line 86 of file vuShearWarp.h.

Referenced by addLeft(), and OnButtonApplyViewing().

wxTextCtrl* vuShearWarp::viewXTextCtrl [private]
 

Text-fields for X-, Y- and Z-Coordinates of the viewing vector.

Definition at line 80 of file vuShearWarp.h.

Referenced by addLeft(), and OnButtonApplyViewing().

wxTextCtrl* vuShearWarp::viewYTextCtrl [private]
 

Definition at line 81 of file vuShearWarp.h.

Referenced by addLeft(), and OnButtonApplyViewing().

wxTextCtrl* vuShearWarp::viewZTextCtrl [private]
 

Definition at line 82 of file vuShearWarp.h.

Referenced by addLeft(), and OnButtonApplyViewing().


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