#include <SheetSplat.h>
Inheritance diagram for vu1512112:
Public Member Functions | |
vu1512112 () | |
Default constructor creating an empty instance. | |
virtual | ~vu1512112 () |
Destructor. | |
vu1512112 & | operator= (const vu1512112 &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 (float size) |
Sets the size of the splatting footprint. | |
float | getFootprintSize () const |
Returns the size of the splatting footprint. | |
void | setSliceWidth (const float size) |
sets the width of a slice | |
float | getSliceWidth () const |
Returns the width of a slice. | |
void | initOpenGL (void) |
Initializes open gl for rendering the volume data. | |
void | render () |
Implements the abstract render() method of the vuVolume base class. | |
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. | |
vuVector | getCenter () |
bool | setImageSize (int width, int height) |
void | setBGColour (float r, float g, float b) |
void | doRefresh () |
recalculate image otherwise the existing framebuffer will be blitted to the screen | |
Private Member Functions | |
void | run (int whatsup, void *data) |
overrides a virtual from vuThread allowing distributed rendering | |
void | preprocess (void) |
Preprocesses volume data for rendering once it's been read. | |
void | initSheets (float dist0, float ddist) |
allocates setup number of sheets without memory for entries | |
void | prepareSheets () |
allocates setup number of sheets without memory for entries | |
void | clearSheets () |
frees memory of bins | |
void | sortByDistance () |
sort voxels by distance uses the eye position of the camera, dimensions of the dataset, thickness of the slices and radius of splatting kernel to determine maximal number of slices | |
void | drawSlice (RGBABuffer &sheet, int n) |
draws one slice to the back-buffer | |
void | drawSlices () |
void | showHistogram () |
Private Attributes | |
float | m_SplatRadius |
size of a splat | |
float | m_SliceWidth |
width of a slice | |
dword | m_SpS_2 |
((slices per splat) / 2)_ | |
float | m_SplatCrop |
depth tolerance below which splat in slice is ignored | |
int | m_NSlices |
number of slices | |
dword ** | m_Slices |
index bucket for each slice ([0] is N of elements) | |
float * | m_SliceDist |
distance of each single slice | |
float * | m_SplatPos |
projected coordinates with distance in 3rd component | |
bool | m_Exclude [256] |
exclude intensities from rendering | |
vuVector * | m_Normals |
stores three normal components per voxel | |
float * | m_Shading |
stores two shading coefficients per voxel first is diffuse l*n, second is specular (r*v)^shin | |
SplatSlicer | m_Splat |
int | m_FBWidth |
int | m_FBHeight |
RGBABuffer | m_FrameBuffer |
RGBABuffer | m_SheetBuffer |
vuVector | m_Center |
float | m_BGColour [4] |
background colour | |
vuColourRGBa | m_LightSpecular |
specular colour with alpha weight | |
float | m_LightDiffuse |
weight for diffuse relection | |
float | m_LightAmbient |
weight for ambient | |
unsigned int | m_LightShininess |
exponent for shininess | |
vuVector | m_LightDir |
direction for parallel light | |
int | m_CurrentSheet |
vuMutex | m_FBMutex |
bool | m_DataPrepared |
bool | m_Refresh |
calculate new image |
Definition at line 23 of file SheetSplat.h.
|
Default constructor creating an empty instance.
Definition at line 50 of file SheetSplat.cpp. References m_DataPrepared, m_LightAmbient, m_LightDiffuse, m_LightDir, m_LightShininess, m_LightSpecular, m_Normals, m_Shading, m_SliceDist, m_Slices, m_SplatPos, setBGColour(), setFootprintSize(), setImageSize(), setSliceWidth(), SHSP_SHEETWIDTH, and SHSP_SPLATRADIUS. |
Here is the call graph for this function:
|
Destructor.
Definition at line 78 of file SheetSplat.cpp. References clearSheets(). |
Here is the call graph for this function:
|
frees memory of bins
Definition at line 454 of file SheetSplat.cpp. References m_SliceDist, and m_Slices. Referenced by initSheets(), sortByDistance(), and ~vu1512112(). |
|
recalculate image otherwise the existing framebuffer will be blitted to the screen
Definition at line 67 of file SheetSplat.h. References m_Refresh. Referenced by vuBCCSheetSplatter::OnButtonRender(). |
|
draws one slice to the back-buffer
Definition at line 611 of file SheetSplat.cpp. References FrameBuffer< N >::addColourWithM1subM2(), byte, vuColour< S >::clampTo01(), dword, vuCamera::getHeight(), SplatSlicer::getSpla(), vuCamera::getWidth(), m_Shading, m_SliceDist, m_Slices, m_Splat, m_SplatPos, and RGBABuffer. Referenced by drawSlices(). |
Here is the call graph for this function:
|
Definition at line 319 of file SheetSplat.cpp. References FrameBuffer< N >::blendUnder(), FrameBuffer< N >::clear(), drawSlice(), vuMutex::lock(), m_CurrentSheet, m_FBHeight, m_FBMutex, m_FBWidth, m_FrameBuffer, RGBABuffer, FrameBuffer< N >::setSize(), and vuMutex::unlock(). |
Here is the call graph for this function:
|
Definition at line 58 of file SheetSplat.h. Referenced by vuBCCSheetSplatter::glOnMouse(), and vuBCCSheetSplatter::glRender(). |
|
Returns the size of the splatting footprint.
Definition at line 104 of file SheetSplat.cpp. |
|
Returns the width of a slice.
Definition at line 121 of file SheetSplat.cpp. |
|
Initializes open gl for rendering the volume data.
Definition at line 424 of file SheetSplat.cpp. Referenced by vuBCCSheetSplatter::glInit(). |
|
allocates setup number of sheets without memory for entries
Definition at line 428 of file SheetSplat.cpp. References clearSheets(), dword, m_SliceDist, and m_Slices. Referenced by sortByDistance(). |
Here is the call graph for this function:
|
Assignment operator which does a deep copy.
Definition at line 91 of file SheetSplat.cpp. References vu1512::operator=(). |
Here is the call graph for this function:
|
allocates setup number of sheets without memory for entries
Definition at line 442 of file SheetSplat.cpp. References dword, and m_Slices. Referenced by sortByDistance(). |
|
Preprocesses volume data for rendering once it's been read.
Definition at line 249 of file SheetSplat.cpp. References dword, m_DataPrepared, m_Normals, and vuVector::makeUnit(). |
Here is the call graph for this function:
|
Reimplements the read() method to do some extra volume data processing.
Reimplemented from vu15121. Definition at line 149 of file SheetSplat.cpp. References vuCamera::getPosition(), vu1512::getVoxelPosition(), m_Center, m_Normals, m_Shading, m_SplatPos, preprocess(), vuVector::print(), vu15121::read(), vuCamera::setPosition(), and vuCamera::translateXYZ(). Referenced by vuBCCSheetSplatter::init(). |
Here is the call graph for this function:
|
This method reads volume data stored using the .raw data type.
Definition at line 194 of file SheetSplat.cpp. References byte, dword, vuCamera::getPosition(), vu1512::getVoxelPosition(), m_Center, m_Normals, m_Shading, m_SplatPos, preprocess(), vuVector::print(), vuCamera::setPosition(), and vuCamera::translateXYZ(). |
Here is the call graph for this function:
|
Implements the abstract render() method of the vuVolume base class.
Implements vu1. Definition at line 335 of file SheetSplat.cpp. References SplatSlicer::buildSplat(), byte, FrameBuffer< N >::clear(), drawSlices(), fbtype, FrameBuffer< N >::getData(), vuCamera::getHeight(), vuCamera::getWidth(), GL_RGB, GL_UNPACK_ALIGNMENT, GL_UNSIGNED_BYTE, glDrawPixels(), glPixelStorei(), glRasterPos2f(), m_BGColour, m_CurrentSheet, m_Exclude, m_FBHeight, m_FrameBuffer, m_Refresh, m_Splat, m_SplatRadius, SHSP_SPLATSTDSCALE, sortByDistance(), and vuThread::startThread(). Referenced by vuBCCSheetSplatter::glRender(). |
Here is the call graph for this function:
|
overrides a virtual from vuThread allowing distributed rendering
Implements vuThread. Definition at line 310 of file SheetSplat.cpp. References drawSlices(). |
Here is the call graph for this function:
|
Definition at line 302 of file SheetSplat.cpp. References m_BGColour. Referenced by vu1512112(). |
|
Sets the size of the splatting footprint.
Definition at line 113 of file SheetSplat.cpp. References m_SliceWidth, m_SplatRadius, m_SpS_2, and size. Referenced by vuBCCSheetSplatter::OnChangeSplatSize(), and vu1512112(). |
|
Definition at line 408 of file SheetSplat.cpp. References FrameBuffer< N >::clear(), m_BGColour, m_FBHeight, m_FBWidth, m_FrameBuffer, vuCamera::setHeight(), FrameBuffer< N >::setSize(), and vuCamera::setWidth(). Referenced by vuBCCSheetSplatter::glResize(), and vu1512112(). |
Here is the call graph for this function:
|
sets the width of a slice
Definition at line 128 of file SheetSplat.cpp. References m_SliceWidth, m_SplatCrop, m_SplatRadius, m_SpS_2, and size. Referenced by vuBCCSheetSplatter::OnChangeSliceWidth(), and vu1512112(). |
|
Sets the camera viewing position for the render method.
Implements vu1. Definition at line 140 of file SheetSplat.cpp. |
|
Definition at line 176 of file SheetSplat.cpp. |
|
sort voxels by distance uses the eye position of the camera, dimensions of the dataset, thickness of the slices and radius of splatting kernel to determine maximal number of slices
Definition at line 466 of file SheetSplat.cpp. References clearSheets(), vuVector::dot, dword, vuVector::getData(), vuCamera::getPosition(), vu1512::getVoxelPosition(), initSheets(), m_Exclude, m_LightDiffuse, m_LightDir, m_LightShininess, m_Normals, m_NSlices, m_Shading, m_Slices, m_SliceWidth, m_SplatPos, m_SplatRadius, m_SpS_2, vuVector::makeUnit(), pow(), and prepareSheets(). Referenced by render(). |
Here is the call graph for this function:
|
background colour
Definition at line 119 of file SheetSplat.h. Referenced by render(), setBGColour(), and setImageSize(). |
|
Definition at line 118 of file SheetSplat.h. |
|
Definition at line 127 of file SheetSplat.h. Referenced by drawSlices(), and render(). |
|
Definition at line 130 of file SheetSplat.h. Referenced by preprocess(), and vu1512112(). |
|
exclude intensities from rendering
Definition at line 108 of file SheetSplat.h. Referenced by render(), and sortByDistance(). |
|
Definition at line 115 of file SheetSplat.h. Referenced by drawSlices(), render(), and setImageSize(). |
|
Definition at line 128 of file SheetSplat.h. Referenced by drawSlices(). |
|
Definition at line 115 of file SheetSplat.h. Referenced by drawSlices(), and setImageSize(). |
|
Definition at line 116 of file SheetSplat.h. Referenced by drawSlices(), render(), and setImageSize(). |
|
weight for ambient
Definition at line 123 of file SheetSplat.h. Referenced by vu1512112(). |
|
weight for diffuse relection
Definition at line 122 of file SheetSplat.h. Referenced by sortByDistance(), and vu1512112(). |
|
direction for parallel light
Definition at line 125 of file SheetSplat.h. Referenced by sortByDistance(), and vu1512112(). |
|
exponent for shininess
Definition at line 124 of file SheetSplat.h. Referenced by sortByDistance(), and vu1512112(). |
|
specular colour with alpha weight
Definition at line 121 of file SheetSplat.h. Referenced by vu1512112(). |
|
stores three normal components per voxel
Definition at line 110 of file SheetSplat.h. Referenced by preprocess(), read(), readRaw(), sortByDistance(), and vu1512112(). |
|
number of slices
Definition at line 104 of file SheetSplat.h. Referenced by sortByDistance(). |
|
calculate new image
Definition at line 131 of file SheetSplat.h. Referenced by doRefresh(), and render(). |
|
stores two shading coefficients per voxel first is diffuse l*n, second is specular (r*v)^shin
Definition at line 113 of file SheetSplat.h. Referenced by drawSlice(), read(), readRaw(), sortByDistance(), and vu1512112(). |
|
Definition at line 117 of file SheetSplat.h. |
|
distance of each single slice
Definition at line 106 of file SheetSplat.h. Referenced by clearSheets(), drawSlice(), initSheets(), and vu1512112(). |
|
index bucket for each slice ([0] is N of elements)
Definition at line 105 of file SheetSplat.h. Referenced by clearSheets(), drawSlice(), initSheets(), prepareSheets(), sortByDistance(), and vu1512112(). |
|
width of a slice
Definition at line 101 of file SheetSplat.h. Referenced by setFootprintSize(), setSliceWidth(), and sortByDistance(). |
|
Definition at line 114 of file SheetSplat.h. Referenced by drawSlice(), and render(). |
|
depth tolerance below which splat in slice is ignored
Definition at line 103 of file SheetSplat.h. Referenced by setSliceWidth(). |
|
projected coordinates with distance in 3rd component
Definition at line 107 of file SheetSplat.h. Referenced by drawSlice(), read(), readRaw(), sortByDistance(), and vu1512112(). |
|
size of a splat
Definition at line 100 of file SheetSplat.h. Referenced by render(), setFootprintSize(), setSliceWidth(), and sortByDistance(). |
|
((slices per splat) / 2)_
Definition at line 102 of file SheetSplat.h. Referenced by setFootprintSize(), setSliceWidth(), and sortByDistance(). |