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

vu1112111 Class Reference

Implements a general splatter for this leaf of the tree. More...

#include <splat.h>

Inheritance diagram for vu1112111:

Inheritance graph
[legend]
Collaboration diagram for vu1112111:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vu1112111 ()
 Default constructor creating an empty instance.
 vu1112111 (const vu1112111 &inst)
 Copy constructor which does a deep copy.
virtual ~vu1112111 ()
 Destructor.
vu1112111operator= (const vu1112111 &rhs)
 Assignment operator which does a deep copy.
void setViewVectors (const vuVector &view, const vuVector &up, const vuVector &right)
 Sets the camera viewing position for the render method.
void setFootprintSize (dword size)
 Sets the size of the splatting footprint.
dword getFootprintSize () const
 Returns the size of the splatting footprint.
void initOpenGL (void)
 Initializes open gl for rendering the volume data.
void render ()
 Implements the abstract render() method of the vuVolume base class.
void drawPic ()
vuImagegetBuffer ()
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.

Private Member Functions

void preprocess (void)
 Preprocesses volume data for rendering once it's been read.
void computeSplat (void)
 Compute the splatting texture.
double nelsonSplat (double r)
 Computes splatting values using the Nelson algorithm.
void drawSplatOrtho (float *pos)
 Draws a splat at the given position using orthogonal view.
void drawSplatPerspective (float *pos)
 Draws a splat at the given position using perspective view.

Private Attributes

vuNormalTable m_NTable
floatm_Normals
vuImage m_ImgBuffer
GLubytem_Footprint
dword m_FPSize
GLuint m_GLSplat
vuVector m_View
vuVector m_Shift0
vuVector m_Shift1
vuVector m_Shift2

Detailed Description

Implements a general splatter for this leaf of the tree.

This class renders the volume using a general splatting method. The point of this splatter is to provide a general viewer that can be used for all purposes. The most efficient splatters change the volume data to speed up rendering, and therefore cannot be used with multiple transfer functions. The function of this splatter is to leave the volume data as is, while rendering as fast as possible. This allows users to apply different transfer functions, and to write and look at the data after rendering it.

Todo:
Find some way to add the ios::nocreate flag or some equivalent to this code so that we have similar behaviour in IRIX as we do Linux or Windows.

Definition at line 46 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.h.


Constructor & Destructor Documentation

vu1112111::vu1112111  ) 
 

Default constructor creating an empty instance.

Definition at line 19 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References computeSplat(), m_Footprint, m_FPSize, m_GLSplat, and m_Normals.

Here is the call graph for this function:

vu1112111::vu1112111 const vu1112111 inst  ) 
 

Copy constructor which does a deep copy.

Definition at line 34 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References byte, computeSplat(), dword, m_FPSize, m_Normals, and m_NTable.

Here is the call graph for this function:

vu1112111::~vu1112111  )  [virtual]
 

Destructor.

Definition at line 56 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References glDeleteTextures(), and m_GLSplat.

Here is the call graph for this function:


Member Function Documentation

void vu1112111::computeSplat void   )  [private]
 

Compute the splatting texture.

Definition at line 766 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References dword, glDeleteTextures(), GLubyte, m_Footprint, m_FPSize, m_GLSplat, and nelsonSplat().

Referenced by operator=(), and vu1112111().

Here is the call graph for this function:

void vu1112111::drawPic  ) 
 

Definition at line 726 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References vuImage::get_rgb(), vuImage::getHeight(), vuImage::getWidth(), GL_BACK, GL_BLEND, GL_FRONT, glDisable(), glDrawBuffer(), glDrawPixels(), glEnable(), glFinish(), and m_ImgBuffer.

Referenced by vuSplat::DrawFromImage().

Here is the call graph for this function:

void vu1112111::drawSplatOrtho float pos  )  [private]
 

Draws a splat at the given position using orthogonal view.

Definition at line 948 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References vuVector::getData(), glTexCoord2fv(), glVertex3fv(), texcoord0, texcoord1, texcoord2, and texcoord3.

Referenced by render().

Here is the call graph for this function:

void vu1112111::drawSplatPerspective float pos  )  [private]
 

Draws a splat at the given position using perspective view.

Definition at line 973 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

vuImage * vu1112111::getBuffer  ) 
 

Definition at line 756 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

Referenced by vuSplat::getCurrentImage().

dword vu1112111::getFootprintSize  )  const
 

Returns the size of the splatting footprint.

Definition at line 124 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References dword.

void vu1112111::initOpenGL void   ) 
 

Initializes open gl for rendering the volume data.

Definition at line 861 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References GL_ALPHA, GL_ALPHA_TEST, GL_AMBIENT_AND_DIFFUSE, GL_BLEND, GL_BLUE, GL_CLAMP, GL_COLOR_MATERIAL, GL_COMBINER0_NV, GL_CULL_FACE, GL_DEPTH_TEST, GL_DISCARD_NV, GL_FALSE, GL_FILL, GL_FRONT, GL_FRONT_AND_BACK, GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_MODULATE, GL_NICEST, GL_NONE, GL_NUM_GENERAL_COMBINERS_NV, GL_ONE_MINUS_SRC_ALPHA, GL_PERSPECTIVE_CORRECTION_HINT, GL_PRIMARY_COLOR_NV, GL_REGISTER_COMBINERS_NV, GL_RGB, GL_SECONDARY_COLOR_NV, GL_SHININESS, GL_SMOOTH, GL_SPARE0_NV, GL_SPECULAR, GL_SRC_ALPHA, GL_TEXTURE0_ARB, GL_TEXTURE_2D, GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_UNSIGNED_BYTE, GL_UNSIGNED_IDENTITY_NV, GL_UNSIGNED_INVERT_NV, GL_VARIABLE_A_NV, GL_VARIABLE_B_NV, GL_VARIABLE_C_NV, GL_VARIABLE_D_NV, GL_VARIABLE_E_NV, GL_VARIABLE_F_NV, GL_ZERO, glBindTexture(), glBlendFunc(), glColorMaterial(), glCombinerInputNV(), glCombinerOutputNV(), glCombinerParameteriNV(), glDisable(), glEnable(), glFinalCombinerInputNV(), GLfloat, glGenTextures(), glHint(), glMaterialf(), glMaterialfv(), glPolygonMode(), glShadeModel(), glTexEnvi(), glTexParameteri(), m_Footprint, m_FPSize, and m_GLSplat.

Referenced by vuSplat::glInit().

Here is the call graph for this function:

double vu1112111::nelsonSplat double  r  )  [private]
 

Computes splatting values using the Nelson algorithm.

Definition at line 806 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

Referenced by computeSplat().

vu1112111 & vu1112111::operator= const vu1112111 rhs  ) 
 

Assignment operator which does a deep copy.

Definition at line 71 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References byte, computeSplat(), dword, m_FPSize, m_Normals, m_NTable, and vu1112::operator=().

Here is the call graph for this function:

void vu1112111::preprocess void   )  [private]
 

Preprocesses volume data for rendering once it's been read.

Definition at line 198 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References vuNormalTable::addToCollection(), vuNormalTable::computeTable(), dword, vuNormalTable::findNearest(), vuNormalTable::initCollection(), m_Normals, and m_NTable.

Referenced by read(), and readRaw().

Here is the call graph for this function:

bool vu1112111::read  )  [virtual]
 

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

Reimplemented from vu11121.

Definition at line 133 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References byte, m_Normals, preprocess(), and vu11121::read().

Referenced by vuSplat::init().

Here is the call graph for this function:

bool vu1112111::readRaw void   )  [virtual]
 

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

Definition at line 154 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References byte, dword, m_Normals, and preprocess().

Here is the call graph for this function:

void vu1112111::render  )  [virtual]
 

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

Reimplemented from vu11121.

Definition at line 321 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References drawSplatOrtho(), dword, GL_QUADS, glBegin(), glColor4fv(), glEnd(), glNormal3fv(), vu1::IsReRendering(), m_Normals, m_NTable, and m_View.

Referenced by vuSplat::glRender().

Here is the call graph for this function:

void vu1112111::setFootprintSize dword  size  ) 
 

Sets the size of the splatting footprint.

Definition at line 115 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References m_FPSize, and size.

void vu1112111::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 103 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.cpp.

References m_Shift0, m_Shift1, m_Shift2, and m_View.

Referenced by vuSplat::glRender().


Member Data Documentation

GLubyte* vu1112111::m_Footprint [private]
 

Definition at line 110 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.h.

Referenced by computeSplat(), initOpenGL(), and vu1112111().

dword vu1112111::m_FPSize [private]
 

Definition at line 111 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.h.

Referenced by computeSplat(), initOpenGL(), operator=(), setFootprintSize(), and vu1112111().

GLuint vu1112111::m_GLSplat [private]
 

Definition at line 112 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.h.

Referenced by computeSplat(), initOpenGL(), vu1112111(), and ~vu1112111().

vuImage vu1112111::m_ImgBuffer [private]
 

Definition at line 108 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.h.

Referenced by drawPic().

float* vu1112111::m_Normals [private]
 

Definition at line 105 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.h.

Referenced by operator=(), preprocess(), read(), readRaw(), render(), and vu1112111().

vuNormalTable vu1112111::m_NTable [private]
 

Definition at line 100 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.h.

Referenced by operator=(), preprocess(), render(), and vu1112111().

vuVector vu1112111::m_Shift0 [private]
 

Definition at line 115 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.h.

Referenced by setViewVectors().

vuVector vu1112111::m_Shift1 [private]
 

Definition at line 116 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.h.

Referenced by setViewVectors().

vuVector vu1112111::m_Shift2 [private]
 

Definition at line 117 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.h.

Referenced by setViewVectors().

vuVector vu1112111::m_View [private]
 

Definition at line 114 of file Regular/Unimodal/3d/1B/Intensity/Splat/splat.h.

Referenced by render(), and setViewVectors().


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