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

vu1112118 Class Reference

#include <specfvr.h>

Inheritance diagram for vu1112118:

Inheritance graph
[legend]
Collaboration diagram for vu1112118:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vu1112118 ()
 ~vu1112118 ()
virtual bool read ()
 Reimplements the read() method to do some extra volume data processing.
virtual bool readRaw (void)
 This method reads volume data stored using the .raw data type.
void render ()
 Implements the abstract render() method of the vuVolume base class.
void setLight (const vuColour31a &light)
 Perform re-illumination of the spectral image with new light source.
void setViewVectors (const vuVector &view, const vuVector &up, const vuVector &right)
 Sets the camera viewing position for the render method.
vu1112118operator= (const vu1112118 &rhs)
void preprocess (void)
 Perform complete preprocessing.
void updateSImage ()
 Update spectral image from extracted transformed slices.
void write_fvr (char *out)
bool read_fvr (ifstream &fin, dword XSize, dword YSize, dword ZSize, dword d_size)
bool doTempFilesExist (string fileName)
void ensureTempDirectory ()
void scaleAndBias (void)
void setDepthCueing (bool flag)
void setIsDiffuseShading (bool flag)
bool isDiffuseShading ()
void reset_refine ()
void doRefresh ()
void setLightDir (const vuVector &lightdir)
void doSpectral (bool doit=true)
 Toggle spectral or conventional FVR.
void resize (int w, int h)
 Adjust to the new size of the render window.
bool keyboard (unsigned char key, int x, int y)
 handle a keyboard event (this belongs into the GUI!)
float getZeroPas ()
void setOversample (float oversample)
void setZeroPad (float zeropad)
float getOversample ()
vuImagegetImage ()

Private Attributes

VolumeSet m_Volumes
float m_ZeroPad
float m_Oversample
SpecFVRNS::Filterm_Filter
int m_ScreenWidth
int m_ScreenHeight
float m_SliceXScale
float m_SliceYScale
float m_Scale
int m_currFilter
vuSpectralImage m_SImage
vuImage m_Image
dword num_div
dword x_pass_add
dword y_pass_add
dword x_stop
dword y_stop
dword x_pass
dword y_pass
dword refined
float m_LightIntensity
bool m_Relight
 perform re-lighting
bool m_DoSpectral
 false=just to conventional FVR
vuVector m_LightDir

Friends

void exit_fun ()

Constructor & Destructor Documentation

vu1112118::vu1112118  ) 
 

Definition at line 28 of file specfvr.cpp.

References doSpectral(), m_DoSpectral, m_Filter, m_Oversample, m_Relight, m_Volumes, m_ZeroPad, vuTFIntensity::resize(), VolumeSet::setFilter(), and SFVR_NCOMPONENTS.

Here is the call graph for this function:

vu1112118::~vu1112118  ) 
 

Definition at line 49 of file specfvr.cpp.


Member Function Documentation

void vu1112118::doRefresh  )  [inline]
 

Definition at line 75 of file specfvr.h.

References VolumeSet::m_Recomp, and m_Volumes.

Referenced by vuSpecFVR::DrawAgain(), vuSpecFVR::glOnMouse(), vuSpecFVR::OnButtonRender(), and vuSpecFVR::OnButtonTransform().

void vu1112118::doSpectral bool  doit = true  ) 
 

Toggle spectral or conventional FVR.

If true a one dimensional ramp transfer function will be generated. Call the function with 'false' before you pass a spectral transfer function.

Definition at line 450 of file specfvr.cpp.

References vuTFIntensity::fromMap(), m_DoSpectral, vuTFIntensity::resize(), and SFVR_NCOMPONENTS.

Referenced by vuSpecFVR::glRender(), vuSpecFVR::OnButtonTransform(), and vu1112118().

Here is the call graph for this function:

bool vu1112118::doTempFilesExist string  fileName  ) 
 

Definition at line 255 of file specfvr.cpp.

Referenced by read().

void vu1112118::ensureTempDirectory  ) 
 

Definition at line 267 of file specfvr.cpp.

References TEMP_PATH.

Referenced by read().

vuImage* vu1112118::getImage  )  [inline]
 

Definition at line 111 of file specfvr.h.

Referenced by vuSpecFVR::getCurrentImage().

float vu1112118::getOversample  )  [inline]
 

Definition at line 107 of file specfvr.h.

float vu1112118::getZeroPas  )  [inline]
 

Definition at line 96 of file specfvr.h.

bool vu1112118::isDiffuseShading  ) 
 

bool vu1112118::keyboard unsigned char  key,
int  x,
int  y
 

handle a keyboard event (this belongs into the GUI!)

Definition at line 176 of file specfvr.cpp.

References VolumeSet::computeSlice(), m_currFilter, VolumeSet::m_Recomp, m_Scale, m_Volumes, num_div, refined, VolumeSet::rotateSliceX(), VolumeSet::rotateSliceY(), VolumeSet::rotateSliceZ(), VolumeSet::setFilter(), VolumeSet::setSliceScale(), updateSImage(), x_pass, x_stop, y_pass, and y_stop.

Referenced by Keyboard(), and vuSpecFVR::OnChar().

Here is the call graph for this function:

vu1112118& vu1112118::operator= const vu1112118 rhs  ) 
 

void vu1112118::preprocess void   ) 
 

Perform complete preprocessing.

This includes remapping the vud byte-volume to different spectral bands using the transfer function, zero-padding the volumes, transforming them to frequ. domain.

Definition at line 377 of file specfvr.cpp.

References VolumeSet::buildColourVolumes(), byte, m_currFilter, m_Oversample, VolumeSet::m_Recomp, m_Scale, m_ScreenHeight, m_ScreenWidth, m_Volumes, m_ZeroPad, vuTFIntensity::normalizeAlphaToOne(), num_div, refined, reset_refine(), VolumeSet::setFilter(), VolumeSet::setSliceScale(), x_pass_add, and y_pass_add.

Referenced by vuSpecFVR::OnButtonTransform(), read(), and readRaw().

Here is the call graph for this function:

bool vu1112118::read  )  [virtual]
 

Reimplements the read() method to do some extra volume data processing.

Reimplemented from vu11121.

Definition at line 286 of file specfvr.cpp.

References doTempFilesExist(), ensureTempDirectory(), m_currFilter, m_Oversample, m_Volumes, m_ZeroPad, preprocess(), VolumeSet::read(), vu11121::read(), and TEMP_PATH.

Referenced by vuSpecFVR::init(), and main().

Here is the call graph for this function:

bool vu1112118::read_fvr ifstream &  fin,
dword  XSize,
dword  YSize,
dword  ZSize,
dword  d_size
 

bool vu1112118::readRaw void   )  [virtual]
 

This method reads volume data stored using the .raw data type.

Definition at line 340 of file specfvr.cpp.

References byte, dword, and preprocess().

Here is the call graph for this function:

void vu1112118::render  )  [virtual]
 

Implements the abstract render() method of the vuVolume base class.

Reimplemented from vu11121.

Definition at line 111 of file specfvr.cpp.

References vuImage::blit(), VolumeSet::computeSlice(), vuSpectralImage::getRGBImage(), GL_COLOR_BUFFER_BIT, GL_FLOAT, GL_LUMINANCE, GL_UNPACK_ALIGNMENT, glClear(), glColor3f(), glDrawPixels(), glPixelStorei(), glPixelZoom(), glRasterPos2i(), m_DoSpectral, m_Image, VolumeSet::m_Recomp, m_Relight, m_SImage, m_SliceXScale, m_SliceYScale, m_Volumes, reset_refine(), VolumeSet::setCamera(), updateSImage(), x_pass, x_stop, y_pass, and y_stop.

Referenced by Display(), and vuSpecFVR::glRender().

Here is the call graph for this function:

void vu1112118::reset_refine  ) 
 

Definition at line 57 of file specfvr.cpp.

References VolumeSet::clearSlice(), m_Volumes, refined, x_pass, x_stop, y_pass, and y_stop.

Referenced by preprocess(), and render().

Here is the call graph for this function:

void vu1112118::resize int  w,
int  h
 

Adjust to the new size of the render window.

Definition at line 157 of file specfvr.cpp.

References GL_MODELVIEW, GL_PROJECTION, glLoadIdentity(), glMatrixMode(), GLsizei, glViewport(), vuSpectralImage::init(), vuImage::init(), m_Image, m_ScreenHeight, m_ScreenWidth, m_SImage, m_SliceXScale, m_SliceYScale, and m_Volumes.

Referenced by vuSpecFVR::glResize(), main(), and Reshape().

Here is the call graph for this function:

void vu1112118::scaleAndBias void   ) 
 

void vu1112118::setDepthCueing bool  flag  ) 
 

void vu1112118::setIsDiffuseShading bool  flag  ) 
 

void vu1112118::setLight const vuColour31a light  ) 
 

Perform re-illumination of the spectral image with new light source.

Definition at line 444 of file specfvr.cpp.

References m_Relight, m_SImage, and vuSpectralImage::set_light().

Referenced by vuSpecFVR::glRender(), Keyboard(), and main().

Here is the call graph for this function:

void vu1112118::setLightDir const vuVector lightdir  )  [inline]
 

Definition at line 79 of file specfvr.h.

References m_LightDir.

Referenced by vuSpecFVR::OnButtonLightPos().

void vu1112118::setOversample float  oversample  )  [inline]
 

Definition at line 100 of file specfvr.h.

References m_Oversample.

Referenced by main().

void vu1112118::setViewVectors const vuVector view,
const vuVector up,
const vuVector right
[virtual]
 

Sets the camera viewing position for the render method.

Reimplemented from vu11121.

Definition at line 69 of file specfvr.cpp.

References vuVector::makeUnit().

Here is the call graph for this function:

void vu1112118::setZeroPad float  zeropad  )  [inline]
 

Definition at line 103 of file specfvr.h.

References m_ZeroPad.

Referenced by main().

void vu1112118::updateSImage  ) 
 

Update spectral image from extracted transformed slices.

Definition at line 140 of file specfvr.cpp.

References vuSpectralImage::create_black_mask(), vuSpectralImage::get_xy_data(), VolumeSet::m_NVolumes, m_Relight, m_SImage, and m_Volumes.

Referenced by keyboard(), and render().

Here is the call graph for this function:

void vu1112118::write_fvr char *  out  ) 
 

Definition at line 403 of file specfvr.cpp.

References m_Volumes, and VolumeSet::write_fvr().

Here is the call graph for this function:


Friends And Related Function Documentation

void exit_fun  )  [friend]
 

Definition at line 23 of file specfvr.cpp.


Member Data Documentation

int vu1112118::m_currFilter [private]
 

Definition at line 128 of file specfvr.h.

Referenced by keyboard(), preprocess(), and read().

bool vu1112118::m_DoSpectral [private]
 

false=just to conventional FVR

Definition at line 147 of file specfvr.h.

Referenced by doSpectral(), render(), and vu1112118().

SpecFVRNS::Filter* vu1112118::m_Filter [private]
 

Definition at line 120 of file specfvr.h.

Referenced by vu1112118().

vuImage vu1112118::m_Image [private]
 

Definition at line 131 of file specfvr.h.

Referenced by render(), and resize().

vuVector vu1112118::m_LightDir [private]
 

Definition at line 149 of file specfvr.h.

Referenced by setLightDir().

float vu1112118::m_LightIntensity [private]
 

Definition at line 145 of file specfvr.h.

float vu1112118::m_Oversample [private]
 

Definition at line 118 of file specfvr.h.

Referenced by preprocess(), read(), setOversample(), and vu1112118().

bool vu1112118::m_Relight [private]
 

perform re-lighting

Definition at line 146 of file specfvr.h.

Referenced by render(), setLight(), updateSImage(), and vu1112118().

float vu1112118::m_Scale [private]
 

Definition at line 126 of file specfvr.h.

Referenced by keyboard(), and preprocess().

int vu1112118::m_ScreenHeight [private]
 

Definition at line 123 of file specfvr.h.

Referenced by preprocess(), and resize().

int vu1112118::m_ScreenWidth [private]
 

Definition at line 122 of file specfvr.h.

Referenced by preprocess(), and resize().

vuSpectralImage vu1112118::m_SImage [private]
 

Definition at line 130 of file specfvr.h.

Referenced by render(), resize(), setLight(), and updateSImage().

float vu1112118::m_SliceXScale [private]
 

Definition at line 124 of file specfvr.h.

Referenced by render(), and resize().

float vu1112118::m_SliceYScale [private]
 

Definition at line 125 of file specfvr.h.

Referenced by render(), and resize().

VolumeSet vu1112118::m_Volumes [private]
 

Definition at line 116 of file specfvr.h.

Referenced by doRefresh(), keyboard(), preprocess(), read(), render(), reset_refine(), resize(), updateSImage(), vu1112118(), and write_fvr().

float vu1112118::m_ZeroPad [private]
 

Definition at line 117 of file specfvr.h.

Referenced by preprocess(), read(), setZeroPad(), and vu1112118().

dword vu1112118::num_div [private]
 

Definition at line 134 of file specfvr.h.

Referenced by keyboard(), and preprocess().

dword vu1112118::refined [private]
 

Definition at line 143 of file specfvr.h.

Referenced by keyboard(), preprocess(), and reset_refine().

dword vu1112118::x_pass [private]
 

Definition at line 140 of file specfvr.h.

Referenced by keyboard(), render(), and reset_refine().

dword vu1112118::x_pass_add [private]
 

Definition at line 135 of file specfvr.h.

Referenced by preprocess().

dword vu1112118::x_stop [private]
 

Definition at line 138 of file specfvr.h.

Referenced by keyboard(), render(), and reset_refine().

dword vu1112118::y_pass [private]
 

Definition at line 141 of file specfvr.h.

Referenced by keyboard(), render(), and reset_refine().

dword vu1112118::y_pass_add [private]
 

Definition at line 136 of file specfvr.h.

Referenced by preprocess().

dword vu1112118::y_stop [private]
 

Definition at line 139 of file specfvr.h.

Referenced by keyboard(), render(), and reset_refine().


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