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

CShearWarp2VRenderer Class Reference

#include <CShearWarp2VRenderer.h>

Inheritance diagram for CShearWarp2VRenderer:

CBaseVRenderer List of all members.

Public Member Functions

 CShearWarp2VRenderer (CVoxelFieldGrad *pVoxelField, CTransferFunction *pTransferFunction)
virtual ~CShearWarp2VRenderer ()
virtual void prepare (void)
virtual void calculate (void)
virtual void drawScene (void)
virtual void checkTextureSize (void)
virtual void setVoxelField (CVoxelFieldGrad *pVoxelField)
virtual void setTransferFunction (CTransferFunction *pTransferFunction)
virtual void saveScreenshot (const std::string &sFilename)

Protected Attributes

CClassifiedVoxelFieldRLEPosition m_oRLE
int m_iIntermediateTextureSize
int m_iOutputTextureSize
Vectorm_pVColor
Vector3DT< unsigned char > * m_pucTextureData
Vector3DT< unsigned char > * m_pucTextureData2

Detailed Description

Shear Warp Renderer

The idea of the shear-warp algorithm is to factorize the view matrix into a shear and a warp transformation. A shear transformation of the original volume data is performed, then this data is projected perpendicular to the sheared planes onto the so called intermediate image. This intermediate image is then warped and we get the final output.

Todo:
rotation according to rotation in raycasting and texture renderers

proportions according to slice thickness

Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 23 of file CShearWarp2VRenderer.h.


Constructor & Destructor Documentation

CShearWarp2VRenderer::CShearWarp2VRenderer CVoxelFieldGrad pVoxelField,
CTransferFunction pTransferFunction
 

calls constructor of CClassifiedVoxelFieldRLEPosition

Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 12 of file CShearWarp2VRenderer.cpp.

References m_iIntermediateTextureSize.

CShearWarp2VRenderer::~CShearWarp2VRenderer  )  [virtual]
 

nothing yet

Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 22 of file CShearWarp2VRenderer.cpp.


Member Function Documentation

void CShearWarp2VRenderer::calculate void   )  [virtual]
 

calculate the shear warp algorithm

Author:
Johannes Lampel <johannes@lampel.net>

Implements CBaseVRenderer.

Definition at line 66 of file CShearWarp2VRenderer.cpp.

References imageutils::biLinInterpolate(), Vector3DT< TType >::clamp(), Vector3DT< TType >::cmult(), CMatrix< X, Y, TType >::eye(), CMatrix< X, Y, TType >::get(), CTransferFunctionElem::getAbsorptivity(), CVRendererSceneConfig::getBrightness(), CVoxelField::getDimX(), CVoxelField::getDimY(), CVoxelField::getDimZ(), CVRendererSceneConfig::getDirectionalLightColor(), CTransferFunctionElem::getEmissivity(), CTransferFunctionElem::getGlossiness(), CVoxelFieldGrad::getGradient(), CVoxelFieldGrad::getGradientLength(), CVoxelField::getIndex(), CClassifiedVoxelFieldRLEPosition::getIndexAlong(), CTransferFunctionElem::getMaterialDiffuse(), CTransferFunctionElem::getMaterialSpecular(), CVRendererSceneConfig::getRotationMatrix(), CVoxelField::getSliceThicknessYNormalized(), CVoxelField::getSliceThicknessZNormalized(), CTransferFunction::getTransferFunction(), CMatrix< X, Y, TType >::getTranslate(), CVoxelField::getVoxel(), CBaseVRenderer::getVoxelField(), CMatrix< X, Y, TType >::inverse(), CVRendererSceneConfig::isInPreviewMode(), m_iIntermediateTextureSize, m_iOutputTextureSize, m_oRLE, CClassifiedVoxelFieldRLEPosition::m_ppVuiRLEAlong, CBaseVRenderer::m_pTransferFunction, m_pucTextureData, m_pucTextureData2, m_pVColor, CBaseVRenderer::m_pVoxelField, CBaseVRenderer::m_TTextures, CBaseVRenderer::m_VTransformedDirectionalLightDir, Vector3DT< TType >::normalize(), CBaseVRenderer::notifySceneUpdated(), CMatrix< X, Y, TType >::output(), CBaseVRenderer::sceneConfig(), CMatrix< X, Y, TType >::set(), CMatrix< X, Y, TType >::transpose(), Vector3DT< TType >::x, Vector3DT< TType >::y, Vector3DT< TType >::z, and CMatrix< X, Y, TType >::zero().

void CShearWarp2VRenderer::checkTextureSize void   )  [virtual]
 

checks if the intermediate and output texture size if ok with the voxel data size

Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 872 of file CShearWarp2VRenderer.cpp.

References CVoxelField::getDimX(), CVoxelField::getDimY(), CVoxelField::getDimZ(), m_iIntermediateTextureSize, m_iOutputTextureSize, m_pucTextureData, m_pucTextureData2, m_pVColor, and CBaseVRenderer::m_pVoxelField.

Referenced by prepare().

void CShearWarp2VRenderer::drawScene void   )  [virtual]
 

draw the output texture on a quad

Author:
Johannes Lampel <johannes@lampel.net>

Implements CBaseVRenderer.

Definition at line 777 of file CShearWarp2VRenderer.cpp.

References CBaseVRenderer::getScale(), and CBaseVRenderer::m_TTextures.

void CShearWarp2VRenderer::prepare void   )  [virtual]
 

prepares the renderer, allocates memory for textures

Author:
Johannes Lampel <johannes@lampel.net>

Implements CBaseVRenderer.

Definition at line 26 of file CShearWarp2VRenderer.cpp.

References checkTextureSize(), CClassifiedVoxelFieldRLEPosition::encode(), CTransferFunction::getCount(), CBaseVRenderer::getVoxelField(), CBaseVRenderer::m_iTextures, m_oRLE, CBaseVRenderer::m_pTransferFunction, and CBaseVRenderer::m_TTextures.

void CShearWarp2VRenderer::saveScreenshot const std::string &  sFilename  )  [virtual]
 

saves the output texture to file

Author:
Johannes Lampel <johannes@lampel.net>

Reimplemented from CBaseVRenderer.

Definition at line 914 of file CShearWarp2VRenderer.cpp.

References m_iOutputTextureSize, m_pucTextureData2, and imageutils::saveScreenshot().

void CShearWarp2VRenderer::setTransferFunction CTransferFunction pTransferFunction  )  [virtual]
 

Attaches this renderer instance to another transfer function

Parameters:
pTransferFunction TransferFunction to be attached to
Author:
Johannes Lampel <johannes@lampel.net>

Reimplemented from CBaseVRenderer.

Definition at line 865 of file CShearWarp2VRenderer.cpp.

References m_oRLE, CBaseVRenderer::m_pTransferFunction, and CClassifiedVoxelFieldRLEPosition::setTransferFunction().

void CShearWarp2VRenderer::setVoxelField CVoxelFieldGrad pVoxelField  )  [virtual]
 

Attaches this renderer instance to another voxel field.

Parameters:
pVoxelField Voxelfield to be attached to
Author:
Johannes Lampel <johannes@lampel.net>

Reimplemented from CBaseVRenderer.

Definition at line 858 of file CShearWarp2VRenderer.cpp.

References m_oRLE, CClassifiedVoxelFieldRLEPosition::setVoxelField(), and CBaseVRenderer::setVoxelField().


Member Data Documentation

int CShearWarp2VRenderer::m_iIntermediateTextureSize [protected]
 

Size of intermediate texture

Definition at line 102 of file CShearWarp2VRenderer.h.

Referenced by calculate(), checkTextureSize(), and CShearWarp2VRenderer().

int CShearWarp2VRenderer::m_iOutputTextureSize [protected]
 

Size of output texture

Definition at line 106 of file CShearWarp2VRenderer.h.

Referenced by calculate(), checkTextureSize(), and saveScreenshot().

CClassifiedVoxelFieldRLEPosition CShearWarp2VRenderer::m_oRLE [protected]
 

the RLE encoded voxel field

Definition at line 97 of file CShearWarp2VRenderer.h.

Referenced by calculate(), prepare(), setTransferFunction(), and setVoxelField().

Vector3DT<unsigned char>* CShearWarp2VRenderer::m_pucTextureData [protected]
 

the intermediate texture data

Definition at line 115 of file CShearWarp2VRenderer.h.

Referenced by calculate(), and checkTextureSize().

Vector3DT<unsigned char>* CShearWarp2VRenderer::m_pucTextureData2 [protected]
 

the warped texture data

Definition at line 119 of file CShearWarp2VRenderer.h.

Referenced by calculate(), checkTextureSize(), and saveScreenshot().

Vector* CShearWarp2VRenderer::m_pVColor [protected]
 

temporary texture, for summing we need floats

Definition at line 111 of file CShearWarp2VRenderer.h.

Referenced by calculate(), and checkTextureSize().


The documentation for this class was generated from the following files:
Generated on Sat Sep 24 15:47:02 2005 for vvis by  doxygen 1.4.3-20050530