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

vuSlicer Class Reference

A utility window for the slicer. More...

#include <vuSlicer.h>

Inheritance diagram for vuSlicer:

Inheritance graph
[legend]
Collaboration diagram for vuSlicer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

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 OnChar (wxKeyEvent &event)
 Keyboard handler.
void OnSlideSlice (wxScrollEvent &event)
 event handler for the slice slider.

Private Attributes

vu1112116m_Data
 The spectral raycaster owned by the utility.
vuTFDesign m_TFunc
 The transfer function.
wxSlider * m_SliceSlider
 Slider to select a slice Calls the event handler OnSlideSlice().
int m_x
 mouse x
int m_y
 mouse y

Detailed Description

A utility window for the slicer.

Definition at line 12 of file vuSlicer.h.


Constructor & Destructor Documentation

vuSlicer::vuSlicer  ) 
 

Constructor.

Definition at line 27 of file vuSlicer.cpp.

vuSlicer::~vuSlicer  ) 
 

Destructor.

Definition at line 36 of file vuSlicer.cpp.

References m_Data.


Member Function Documentation

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

This method adds controls to the bottom of the window.

Reimplemented from vuBasicUtility.

Definition at line 100 of file vuSlicer.cpp.

References idSLIDESLICE, m_SliceSlider, and SLIDER_MAX.

void vuSlicer::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 259 of file vuSlicer.cpp.

void vuSlicer::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 270 of file vuSlicer.cpp.

vuCamera * vuSlicer::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 247 of file vuSlicer.cpp.

vuImage * vuSlicer::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 252 of file vuSlicer.cpp.

const char * vuSlicer::getFileType  )  [static]
 

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

Reimplemented from vuBasicUtility.

Definition at line 45 of file vuSlicer.cpp.

bool vuSlicer::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 117 of file vuSlicer.cpp.

References vu1112116::initOpenGL(), and m_Data.

Here is the call graph for this function:

void vuSlicer::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 149 of file vuSlicer.cpp.

References vuGLCanvas::getHeight(), vu1112116::getPosition(), vuTransferDialog::getTransferFunc(), vu1112116::getValue(), vu1112116::isInside(), m_Data, m_TFunc, m_x, m_y, vuGLCanvas::redraw(), vu1112116::setPosition(), and vu111211::setTransferFunc().

Here is the call graph for this function:

void vuSlicer::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 128 of file vuSlicer.cpp.

References m_Data, and vu1112116::render().

Here is the call graph for this function:

void vuSlicer::glResize  )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 139 of file vuSlicer.cpp.

References vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), m_Data, vuGLCanvas::redraw(), and vu1112116::setImageSize().

Here is the call graph for this function:

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

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

Reimplemented from vuBasicUtility.

Definition at line 54 of file vuSlicer.cpp.

References vuTFDesign::addColour(), vuTFDesign::addOpacity(), vuTFDesign::generateFunction(), vu1::getErrorMessage(), m_Data, m_TFunc, vu1112116::read(), vuTFDesign::setColourSmoothing(), vu1::setFileName(), vuTFDesign::setOpacitySmoothing(), and vu111211::setTransferFunc().

Here is the call graph for this function:

void vuSlicer::OnChar wxKeyEvent &  event  )  [protected, virtual]
 

Keyboard handler.

Overridden from vuBasicUtility. As implemented so far 'V' will write out file viewpoint.def containing current viewpoint information and 'v' will read in this file to restore viewpoint.

Reimplemented from vuBasicUtility.

Definition at line 219 of file vuSlicer.cpp.

References vu1112::getDim3Size(), vu1112116::getPosition(), vu1112116::getValue(), vu1112116::isInside(), m_Data, m_SliceSlider, vuGLCanvas::redraw(), vu1112116::setPosition(), and SLIDER_MAX.

Here is the call graph for this function:

void vuSlicer::OnSlideSlice wxScrollEvent &  event  )  [protected]
 

event handler for the slice slider.

Definition at line 200 of file vuSlicer.cpp.

References vu1112::getDim3Size(), vu1112116::getPosition(), vu1112116::getValue(), vu1112116::isInside(), m_Data, m_SliceSlider, vuGLCanvas::redraw(), and vu1112116::setPosition().

Here is the call graph for this function:


Member Data Documentation

vu1112116* vuSlicer::m_Data [private]
 

The spectral raycaster owned by the utility.

Definition at line 70 of file vuSlicer.h.

Referenced by glInit(), glOnMouse(), glRender(), glResize(), init(), OnChar(), OnSlideSlice(), and ~vuSlicer().

wxSlider* vuSlicer::m_SliceSlider [private]
 

Slider to select a slice Calls the event handler OnSlideSlice().

Definition at line 76 of file vuSlicer.h.

Referenced by addRight(), OnChar(), and OnSlideSlice().

vuTFDesign vuSlicer::m_TFunc [private]
 

The transfer function.

Reimplemented from vuBasicUtility.

Definition at line 72 of file vuSlicer.h.

Referenced by glOnMouse(), and init().

int vuSlicer::m_x [private]
 

mouse x

Definition at line 79 of file vuSlicer.h.

Referenced by glOnMouse().

int vuSlicer::m_y [private]
 

mouse y

Definition at line 81 of file vuSlicer.h.

Referenced by glOnMouse().


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