Core Class Reference

Core Class. More...

#include <Core.h>

Collaboration diagram for Core:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Core ()
 Konstruktor.
 ~Core ()
 Destruktor.
bool initOpenGL (void *handle, int sizex, int sizey)
 initializes OpenGL Rendering Context
void renderScene ()
 renders the Scene
void resizeOpenGL (int sizex, int sizey)
 resizes the OpenGL Output-Size
void loadVolume (std::string fileName)
 loads some VolumeData
void setSclicingDirection (axisDirections aD)
 sets the slicing direction in 2d-Mode
int getVolumeWidth ()
 returns the width of the currently loaded Volume
int getVolumeHeight ()
 returns the height of the currently loaded Volume
int getVolumeDepth ()
 returns the depth of the currently loaded Volume
void setSliceNumber (int sliceNr)
 sets the actual viewed Slice
int getHistLength ()
 returns the length of the Histogram
std::vector< int > getHist ()
 returns the Histogram
std::vector
< TransferFunctionManager::InterpolationNode
getInterpolationNodes ()
 returns all Interpolation Nodes from the Transferfunction
void setInterpolationNode (int index, byte r, byte g, byte b, byte alpha, int value)
 resets a selected Interpolation Node
void updateLookUp ()
 updates the LookUp (TransferFunction)
void addInterpolationNode (byte r, byte g, byte b, byte alpha, int value)
 adds a InterpolationNode
void setTransferActive (bool isActive)
 sets if the Transferfunction is active
void removeInterpolationNode (int index)
 removes a InterpolationNode
void setViewMode (viewMode vM)
 2d or 3d Viewing
void setRaycastMode (RaycastMode rM)
 sets the Raycast-Modes
void rotateCamera (float xRotation, float yRotation)
 rotates the Camera
void setStepSize (float stepSize)
 sets the Raycast Stepsize
void setLum (float lum)
 sets the Lumination-Value for the Raycasting
void setThreshold (float threshold)
 sets the Threshold for Raycasting
void saveTransferFunction (std::string filename)
 saves the Transferfunction to the specified filename
void loadTransferFunction (std::string filename)
 loads the Transferfunction from the specified filename

Private Member Functions

void create3DTexture ()
 creates the 3d-Volume Texture
void createFrameBuffers ()
 creates the FrameBuffers
int getNextPowerOfTwo (int number)
 returns the next value which is a Power of 2
void updateLookUpTex ()
 updates the Lookup Texture (which represents the Colors of the Transferfunction)
void calculateVolumePixelSize ()
 calculates the Pixelsizes of the Volume (used for maximizing the 2d-Slicing to the Screen)
void render2D ()
 sets up the Rendering for 2d-Rendering
void render3D ()
 sets up the Rendering for 3d-Rendering
void renderBoundingVolume (float width, float height, float depth)
 renders the Volume in 3d using the selected Shader
void renderAxilsAlignedSlice ()
 renders the Slice

Private Attributes

HGLRC renderingContext
 the rendering Context
HDC deviceContext
 the Device Context for the Render-Thread
Camera cam
 the Scene-Camera
TransferFunctionManager transferFunctionManager
 handles the Transferfunction
ShaderManager shaderManager
 handles the Shaders
int screenX
 stores the actual ScreenWidth
int screenY
 stores the actual ScreenHeight
bool twoDimSlicing
 is true if 2d-Rendering should be used
axisDirections axisDir
 defines the actual direction of Slicing when 2d-Rendering
RaycastMode raycastMode
 defines the actuel Rendering-Mode when 3d-Rendering
Volume myVolume
 handles the Volume
GLuint my3DTexture
 the 3d-Texture (the Volume)
GLuint myLookUpTexture
 the LookUpTexture
GLuint backFacesTex
 the backFacesTexture
GLuint frontFacesTex
 the frontFacesTexture
GLuint backFacesBuffer
 Framebuffer-Object to render the backfaces of the Volume to.
GLuint frontFacesBuffer
 Framebuffer-Object to render the frontfaces of the Volume to.
bool transferActive
 saves if the Transferfunction should be active
float sliceVal
 saves which slice should be rendered
bool volumeLoaded
 saves if a Volume was loaded
float aspectRatioYZ
 saves die Ratio of the Volume in YZ-Direction
float aspectRatioXZ
 saves die Ratio of the Volume in XZ-Direction
float aspectRatioXY
 saves die Ratio of the Volume in XY-Direction
float volumeSizeXPixels
 saves volumePixelSize in X-Direction
float volumeSizeYPixels
 saves volumePixelSize in Y-Direction
float volumeSizeZPixels
 saves volumePixelSize in Z-Direction
float * histLookUp
 pointer to the Histogram
float stepSize
 saves the selected Stepsize for 3d-Rendering
float lum
 saves the selected Lumination for 3d-Rendering
float threshold
 saves the selected Threshold for 3d-Rendering


Detailed Description

Core Class.

Is the Class of the calculation core


Constructor & Destructor Documentation

Core::Core (  ) 

Konstruktor.

Core::~Core (  ) 

Destruktor.


Member Function Documentation

void Core::addInterpolationNode ( byte  r,
byte  g,
byte  b,
byte  alpha,
int  value 
)

adds a InterpolationNode

void Core::calculateVolumePixelSize (  )  [private]

calculates the Pixelsizes of the Volume (used for maximizing the 2d-Slicing to the Screen)

void Core::create3DTexture (  )  [private]

creates the 3d-Volume Texture

void Core::createFrameBuffers (  )  [private]

creates the FrameBuffers

std::vector< int > Core::getHist (  ) 

returns the Histogram

int Core::getHistLength (  ) 

returns the length of the Histogram

std::vector< TransferFunctionManager::InterpolationNode > Core::getInterpolationNodes (  ) 

returns all Interpolation Nodes from the Transferfunction

int Core::getNextPowerOfTwo ( int  number  )  [private]

returns the next value which is a Power of 2

int Core::getVolumeDepth (  ) 

returns the depth of the currently loaded Volume

int Core::getVolumeHeight (  ) 

returns the height of the currently loaded Volume

int Core::getVolumeWidth (  ) 

returns the width of the currently loaded Volume

bool Core::initOpenGL ( void *  handle,
int  sizex,
int  sizey 
)

initializes OpenGL Rendering Context

void Core::loadTransferFunction ( std::string  filename  ) 

loads the Transferfunction from the specified filename

void Core::loadVolume ( std::string  fileName  ) 

loads some VolumeData

void Core::removeInterpolationNode ( int  index  ) 

removes a InterpolationNode

void Core::render2D (  )  [private]

sets up the Rendering for 2d-Rendering

void Core::render3D (  )  [private]

sets up the Rendering for 3d-Rendering

void Core::renderAxilsAlignedSlice (  )  [private]

renders the Slice

void Core::renderBoundingVolume ( float  width,
float  height,
float  depth 
) [private]

renders the Volume in 3d using the selected Shader

void Core::renderScene (  ) 

renders the Scene

void Core::resizeOpenGL ( int  sizex,
int  sizey 
)

resizes the OpenGL Output-Size

void Core::rotateCamera ( float  xRotation,
float  yRotation 
)

rotates the Camera

void Core::saveTransferFunction ( std::string  filename  ) 

saves the Transferfunction to the specified filename

void Core::setInterpolationNode ( int  index,
byte  r,
byte  g,
byte  b,
byte  alpha,
int  value 
)

resets a selected Interpolation Node

void Core::setLum ( float  lum  ) 

sets the Lumination-Value for the Raycasting

void Core::setRaycastMode ( RaycastMode  rM  ) 

sets the Raycast-Modes

void Core::setSclicingDirection ( axisDirections  aD  ) 

sets the slicing direction in 2d-Mode

void Core::setSliceNumber ( int  sliceNr  ) 

sets the actual viewed Slice

void Core::setStepSize ( float  stepSize  ) 

sets the Raycast Stepsize

void Core::setThreshold ( float  threshold  ) 

sets the Threshold for Raycasting

void Core::setTransferActive ( bool  isActive  ) 

sets if the Transferfunction is active

void Core::setViewMode ( viewMode  vM  ) 

2d or 3d Viewing

void Core::updateLookUp (  ) 

updates the LookUp (TransferFunction)

void Core::updateLookUpTex (  )  [private]

updates the Lookup Texture (which represents the Colors of the Transferfunction)


Member Data Documentation

float Core::aspectRatioXY [private]

saves die Ratio of the Volume in XY-Direction

float Core::aspectRatioXZ [private]

saves die Ratio of the Volume in XZ-Direction

float Core::aspectRatioYZ [private]

saves die Ratio of the Volume in YZ-Direction

defines the actual direction of Slicing when 2d-Rendering

GLuint Core::backFacesBuffer [private]

Framebuffer-Object to render the backfaces of the Volume to.

GLuint Core::backFacesTex [private]

the backFacesTexture

Camera Core::cam [private]

the Scene-Camera

HDC Core::deviceContext [private]

the Device Context for the Render-Thread

GLuint Core::frontFacesBuffer [private]

Framebuffer-Object to render the frontfaces of the Volume to.

GLuint Core::frontFacesTex [private]

the frontFacesTexture

float* Core::histLookUp [private]

pointer to the Histogram

float Core::lum [private]

saves the selected Lumination for 3d-Rendering

GLuint Core::my3DTexture [private]

the 3d-Texture (the Volume)

GLuint Core::myLookUpTexture [private]

the LookUpTexture

handles the Volume

defines the actuel Rendering-Mode when 3d-Rendering

HGLRC Core::renderingContext [private]

the rendering Context

int Core::screenX [private]

stores the actual ScreenWidth

int Core::screenY [private]

stores the actual ScreenHeight

handles the Shaders

float Core::sliceVal [private]

saves which slice should be rendered

float Core::stepSize [private]

saves the selected Stepsize for 3d-Rendering

float Core::threshold [private]

saves the selected Threshold for 3d-Rendering

bool Core::transferActive [private]

saves if the Transferfunction should be active

handles the Transferfunction

bool Core::twoDimSlicing [private]

is true if 2d-Rendering should be used

bool Core::volumeLoaded [private]

saves if a Volume was loaded

float Core::volumeSizeXPixels [private]

saves volumePixelSize in X-Direction

float Core::volumeSizeYPixels [private]

saves volumePixelSize in Y-Direction

float Core::volumeSizeZPixels [private]

saves volumePixelSize in Z-Direction


The documentation for this class was generated from the following files:

Generated on Wed Dec 10 00:10:26 2008 for VolViz by  doxygen 1.5.7.1