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

CTransferFunctionElem Class Reference

#include <CTransferFunctionElem.h>

List of all members.

Public Member Functions

 CTransferFunctionElem (void)
virtual ~CTransferFunctionElem (void)
bool isInDens (unsigned char uc) const
bool isInGrad (float f) const
unsigned int getID (void) const
void setID (unsigned int uiID)
vec_t getDensMin (void) const
vec_t getDensMax (void) const
vec_t getGradMin (void) const
vec_t getGradMax (void) const
void setDensMin (const vec_t &f)
void setDensMax (const vec_t &f)
void setGradMin (const vec_t &f)
void setGradMax (const vec_t &f)
const VectorgetEmissivity (void) const
vec_t getAbsorptivity (void) const
const VectorgetMaterialDiffuse (void) const
const VectorgetMaterialSpecular (void) const
void setEmissivity (const Vector &V)
void setAbsorptivity (const vec_t fAbs)
vec_t getGlossiness (void) const
void setGlossiness (const vec_t f)
void setMaterialDiffuse (const Vector &V)
void setMaterialSpecular (const Vector &V)
std::string getDescription (void) const
void setDescription (const std::string &s)
int getType (void) const
bool isEnabled (void) const
void setEnabled (bool bEnabled=true)
bool operator< (const CTransferFunctionElem &TF) const
sigc::signal< void, unsigned
int > 
signal_changed ()

Static Public Member Functions

static bool TFECompareLess (const CTransferFunctionElem &TF1, const CTransferFunctionElem &TF2)

Protected Attributes

bool m_bEnabled
Vector m_RGBEmissivity
vec_t m_fAbsorptivity
Vector m_RGBMaterialDiffuse
Vector m_RGBMaterialSpecular
vec_t m_fGlossiness
vec_t m_fDensMin
vec_t m_fDensMax
vec_t m_fGradMin
vec_t m_fGradMax
std::string m_sDescription
unsigned int m_uiID
int m_iType
sigc::signal< void, unsigned
int > 
m_signalChanged

Friends

class CTransferFunction


Detailed Description

Class implements the elements of the transfer function used for rendering

Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 15 of file CTransferFunctionElem.h.


Constructor & Destructor Documentation

CTransferFunctionElem::CTransferFunctionElem void   ) 
 

Initializes this element. colors are set to black, borders are set to minima respectively maxima.

Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 3 of file CTransferFunctionElem.cpp.

References m_bEnabled, m_fAbsorptivity, m_fDensMax, m_fDensMin, m_fGlossiness, m_fGradMax, m_fGradMin, m_iType, m_RGBEmissivity, m_RGBMaterialDiffuse, m_RGBMaterialSpecular, and m_sDescription.

CTransferFunctionElem::~CTransferFunctionElem void   )  [virtual]
 

nothing to do here yet

Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 24 of file CTransferFunctionElem.cpp.


Member Function Documentation

vec_t CTransferFunctionElem::getAbsorptivity void   )  const [inline]
 

Returns:
basic absorptivity for this transfer function element the absorptivity describes how much of the light is absorbed on a 1/128 of the x length of the volume, also regarding the slice thickness. if the absorptivity is 'a', then exp(-a) will shine thru such a segment.
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 202 of file CTransferFunctionElem.h.

References m_fAbsorptivity.

Referenced by CShearWarp2VRenderer::calculate(), CBaseVRenderer::getAbsorption(), CPreIntegrator::integrate(), CInt1VRenderer::integrateAlong(), CWindowTransferFunctionEditor::on_ButtonOpen_clicked(), and CFileWriterTFVVis::save().

vec_t CTransferFunctionElem::getDensMax void   )  const [inline]
 

Returns:
maximal density this transfer function element works for
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 98 of file CTransferFunctionElem.h.

References m_fDensMax.

Referenced by CHistogramDensityGradientGL::draw(), CWindowTransferFunctionEditor::on_ButtonOpen_clicked(), CWidgetHistogramDensityGradient::on_expose_event(), CWidgetHistogramDensity::on_expose_event(), and CFileWriterTFVVis::save().

vec_t CTransferFunctionElem::getDensMin void   )  const [inline]
 

Returns:
minimal density this transfer function element works for
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 88 of file CTransferFunctionElem.h.

References m_fDensMin.

Referenced by CHistogramDensityGradientGL::draw(), CWindowTransferFunctionEditor::on_ButtonOpen_clicked(), CWidgetHistogramDensityGradient::on_expose_event(), CWidgetHistogramDensity::on_expose_event(), and CFileWriterTFVVis::save().

std::string CTransferFunctionElem::getDescription void   )  const [inline]
 

Returns:
description string of this element
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 321 of file CTransferFunctionElem.h.

References m_sDescription.

Referenced by CWindowTransferFunctionEditor::on_ButtonOpen_clicked(), and CFileWriterTFVVis::save().

const Vector& CTransferFunctionElem::getEmissivity void   )  const [inline]
 

Returns:
basic emissivity for this transfer function element
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 188 of file CTransferFunctionElem.h.

References m_RGBEmissivity.

Referenced by CShearWarp2VRenderer::calculate(), CHistogramDensityGradientGL::draw(), CBaseVRenderer::getEmission(), CPreIntegrator::integrate(), CInt1VRenderer::integrateAlong(), CWindowTransferFunctionEditor::on_ButtonOpen_clicked(), CWidgetHistogramDensityGradient::on_expose_event(), CWidgetHistogramDensity::on_expose_event(), CCubeVRenderer::prepare(), and CFileWriterTFVVis::save().

vec_t CTransferFunctionElem::getGlossiness void   )  const [inline]
 

Returns:
glossiness of this transfer function element
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 264 of file CTransferFunctionElem.h.

References m_fGlossiness.

Referenced by CShearWarp2VRenderer::calculate(), CPreIntegrator::integrate(), CInt1VRenderer::integrateAlong(), CWindowTransferFunctionEditor::on_ButtonOpen_clicked(), CCubeVRenderer::prepare(), and CFileWriterTFVVis::save().

vec_t CTransferFunctionElem::getGradMax void   )  const [inline]
 

Returns:
maximal gradient length this transfer function element works for
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 118 of file CTransferFunctionElem.h.

References m_fGradMax.

Referenced by CHistogramDensityGradientGL::draw(), CWindowTransferFunctionEditor::on_ButtonOpen_clicked(), CWidgetHistogramDensityGradient::on_expose_event(), and CFileWriterTFVVis::save().

vec_t CTransferFunctionElem::getGradMin void   )  const [inline]
 

Returns:
minimal gradient length this transfer function element works for
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 108 of file CTransferFunctionElem.h.

References m_fGradMin.

Referenced by CHistogramDensityGradientGL::draw(), CWindowTransferFunctionEditor::on_ButtonOpen_clicked(), CWidgetHistogramDensityGradient::on_expose_event(), and CFileWriterTFVVis::save().

unsigned int CTransferFunctionElem::getID void   )  const [inline]
 

Returns:
the ID of this element
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 66 of file CTransferFunctionElem.h.

References m_uiID.

Referenced by CTransferFunction::add(), CWindowTransferFunctionEditor::on_ButtonOpen_clicked(), CWidgetHistogramDensityGradient::on_expose_event(), CWidgetHistogramDensity::on_expose_event(), and operator<().

const Vector& CTransferFunctionElem::getMaterialDiffuse void   )  const [inline]
 

Returns:
basic diffuse reflection property for this transfer function element
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 213 of file CTransferFunctionElem.h.

References m_RGBMaterialDiffuse.

Referenced by CShearWarp2VRenderer::calculate(), CPreIntegrator::integrate(), CInt1VRenderer::integrateAlong(), CWindowTransferFunctionEditor::on_ButtonOpen_clicked(), CCubeVRenderer::prepare(), and CFileWriterTFVVis::save().

const Vector& CTransferFunctionElem::getMaterialSpecular void   )  const [inline]
 

Returns:
basic specular reflection property for this transfer function element
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 224 of file CTransferFunctionElem.h.

References m_RGBMaterialSpecular.

Referenced by CShearWarp2VRenderer::calculate(), CPreIntegrator::integrate(), CInt1VRenderer::integrateAlong(), CWindowTransferFunctionEditor::on_ButtonOpen_clicked(), CCubeVRenderer::prepare(), and CFileWriterTFVVis::save().

int CTransferFunctionElem::getType void   )  const [inline]
 

Returns:
the type of this element. until now there is only one type ( 0 ), but maybe we need more for more complex transfer functions
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 345 of file CTransferFunctionElem.h.

References m_iType.

Referenced by CFileWriterTFVVis::save().

bool CTransferFunctionElem::isEnabled void   )  const [inline]
 

Returns:
true if this element is enabled
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 355 of file CTransferFunctionElem.h.

References m_bEnabled.

bool CTransferFunctionElem::isInDens unsigned char  uc  )  const [inline]
 

checks if this transfer function element fits to a given density value

Parameters:
uc voxel value
Returns:
bool true if everything fits
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 42 of file CTransferFunctionElem.h.

References m_fDensMax, and m_fDensMin.

bool CTransferFunctionElem::isInGrad float  f  )  const [inline]
 

checks if this transfer function element fits to a given gradient length

Parameters:
f gradient length
Returns:
true if everything fits
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 56 of file CTransferFunctionElem.h.

References m_fGradMax, and m_fGradMin.

bool CTransferFunctionElem::operator< const CTransferFunctionElem TF  )  const [inline]
 

compares two TransferFunctionElem by their ID

Parameters:
TF other element
Returns:
is smaller?
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 381 of file CTransferFunctionElem.h.

References getID().

void CTransferFunctionElem::setAbsorptivity const vec_t  fAbs  )  [inline]
 

sets the basic absorptivity for this transfer function element

Parameters:
fAbs value
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 251 of file CTransferFunctionElem.h.

References m_fAbsorptivity, m_signalChanged, and m_uiID.

Referenced by CFileReaderTFVVis::load(), and CWindowTransferFunctionEditor::updateTransferFunction().

void CTransferFunctionElem::setDensMax const vec_t &  f  )  [inline]
 

sets the maximal density this transfer function element works for

Parameters:
f value
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 145 of file CTransferFunctionElem.h.

References m_fDensMax, m_signalChanged, and m_uiID.

Referenced by CFileReaderTFVVis::load(), and CWindowTransferFunctionEditor::updateTransferFunction().

void CTransferFunctionElem::setDensMin const vec_t &  f  )  [inline]
 

sets the minimal density this transfer function element works for

Parameters:
f value
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 130 of file CTransferFunctionElem.h.

References m_fDensMin, m_signalChanged, and m_uiID.

Referenced by CFileReaderTFVVis::load(), and CWindowTransferFunctionEditor::updateTransferFunction().

void CTransferFunctionElem::setDescription const std::string &  s  )  [inline]
 

sets a description for this element

Parameters:
s description
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 333 of file CTransferFunctionElem.h.

References m_sDescription.

Referenced by CFileReaderTFVVis::load(), and CWindowTransferFunctionEditor::updateTransferFunction().

void CTransferFunctionElem::setEmissivity const Vector V  )  [inline]
 

sets the basic emissivity for this transfer function element

Parameters:
V value
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 236 of file CTransferFunctionElem.h.

References m_RGBEmissivity, m_signalChanged, and m_uiID.

Referenced by CFileReaderTFVVis::load(), and CWindowTransferFunctionEditor::updateTransferFunction().

void CTransferFunctionElem::setEnabled bool  bEnabled = true  )  [inline]
 

Parameters:
bEnabled true if this element should be enabled
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 365 of file CTransferFunctionElem.h.

References m_bEnabled, m_signalChanged, and m_uiID.

Referenced by CWindowTransferFunctionEditor::updateTransferFunction().

void CTransferFunctionElem::setGlossiness const vec_t  f  )  [inline]
 

sets the basic absorptivity for this transfer function element

Parameters:
f value
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 276 of file CTransferFunctionElem.h.

References m_fGlossiness, m_signalChanged, and m_uiID.

Referenced by CFileReaderTFVVis::load(), and CWindowTransferFunctionEditor::updateTransferFunction().

void CTransferFunctionElem::setGradMax const vec_t &  f  )  [inline]
 

sets the maximal gradient length this transfer function element works for

Parameters:
f value
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 175 of file CTransferFunctionElem.h.

References m_fGradMax, m_signalChanged, and m_uiID.

Referenced by CFileReaderTFVVis::load(), and CWindowTransferFunctionEditor::updateTransferFunction().

void CTransferFunctionElem::setGradMin const vec_t &  f  )  [inline]
 

sets the minimal gradient length this transfer function element works for

Parameters:
f value
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 160 of file CTransferFunctionElem.h.

References m_fGradMin, m_signalChanged, and m_uiID.

Referenced by CFileReaderTFVVis::load(), and CWindowTransferFunctionEditor::updateTransferFunction().

void CTransferFunctionElem::setID unsigned int  uiID  )  [inline]
 

give an ID to this element

Parameters:
uiID new ID
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 78 of file CTransferFunctionElem.h.

References m_uiID.

Referenced by CFileReaderTFVVis::load(), CTransferFunction::swap(), and CWindowTransferFunctionEditor::updateTransferFunction().

void CTransferFunctionElem::setMaterialDiffuse const Vector V  )  [inline]
 

sets the basic diffuse reflection property for this transfer function element

Parameters:
V value
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 292 of file CTransferFunctionElem.h.

References m_RGBMaterialDiffuse, m_signalChanged, and m_uiID.

Referenced by CFileReaderTFVVis::load(), and CWindowTransferFunctionEditor::updateTransferFunction().

void CTransferFunctionElem::setMaterialSpecular const Vector V  )  [inline]
 

sets the basic specular reflection property for this transfer function element

Parameters:
V value
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 308 of file CTransferFunctionElem.h.

References m_RGBMaterialSpecular, m_signalChanged, and m_uiID.

Referenced by CFileReaderTFVVis::load(), and CWindowTransferFunctionEditor::updateTransferFunction().

sigc::signal< void, unsigned int > CTransferFunctionElem::signal_changed  ) 
 

Signal that is emitted if density or gradient ranges are changed

Author:
Tobias Eberle <tobias.eberle@gmx.de>

Definition at line 29 of file CTransferFunctionElem.cpp.

References m_signalChanged.

Referenced by CTransferFunction::add().

static bool CTransferFunctionElem::TFECompareLess const CTransferFunctionElem TF1,
const CTransferFunctionElem TF2
[inline, static]
 

Since we encountered problems using the overloaded operator < together with the STL sort function, we tried providing explicitly a suitable compare function, which worked.

Parameters:
TF1 first transfer function element
TF2 second transfer function element
Author:
Johannes Lampel <johannes@lampel.net>

Definition at line 396 of file CTransferFunctionElem.h.


Member Data Documentation

bool CTransferFunctionElem::m_bEnabled [protected]
 

Should this TFElement be used at all ?

Definition at line 414 of file CTransferFunctionElem.h.

Referenced by CTransferFunctionElem(), isEnabled(), and setEnabled().

vec_t CTransferFunctionElem::m_fAbsorptivity [protected]
 

Absorptivity

Definition at line 424 of file CTransferFunctionElem.h.

Referenced by CTransferFunctionElem(), getAbsorptivity(), and setAbsorptivity().

vec_t CTransferFunctionElem::m_fDensMax [protected]
 

maximal density

Definition at line 449 of file CTransferFunctionElem.h.

Referenced by CTransferFunctionElem(), getDensMax(), isInDens(), and setDensMax().

vec_t CTransferFunctionElem::m_fDensMin [protected]
 

minimal density

Definition at line 444 of file CTransferFunctionElem.h.

Referenced by CTransferFunctionElem(), getDensMin(), isInDens(), and setDensMin().

vec_t CTransferFunctionElem::m_fGlossiness [protected]
 

Glossiness ( power with which the specular light dot product is used )

Definition at line 439 of file CTransferFunctionElem.h.

Referenced by CTransferFunctionElem(), getGlossiness(), and setGlossiness().

vec_t CTransferFunctionElem::m_fGradMax [protected]
 

maximal gradient magnitude

Definition at line 459 of file CTransferFunctionElem.h.

Referenced by CTransferFunctionElem(), getGradMax(), isInGrad(), and setGradMax().

vec_t CTransferFunctionElem::m_fGradMin [protected]
 

minimal gradient magnitude

Definition at line 454 of file CTransferFunctionElem.h.

Referenced by CTransferFunctionElem(), getGradMin(), isInGrad(), and setGradMin().

int CTransferFunctionElem::m_iType [protected]
 

we might wanna have different type, yet to implement

Definition at line 476 of file CTransferFunctionElem.h.

Referenced by CTransferFunctionElem(), and getType().

Vector CTransferFunctionElem::m_RGBEmissivity [protected]
 

Emissivity

Definition at line 419 of file CTransferFunctionElem.h.

Referenced by CTransferFunctionElem(), getEmissivity(), and setEmissivity().

Vector CTransferFunctionElem::m_RGBMaterialDiffuse [protected]
 

Diffuse Reflection property

Definition at line 429 of file CTransferFunctionElem.h.

Referenced by CTransferFunctionElem(), getMaterialDiffuse(), and setMaterialDiffuse().

Vector CTransferFunctionElem::m_RGBMaterialSpecular [protected]
 

Specular Reflection property

Definition at line 434 of file CTransferFunctionElem.h.

Referenced by CTransferFunctionElem(), getMaterialSpecular(), and setMaterialSpecular().

std::string CTransferFunctionElem::m_sDescription [protected]
 

description for this element.

Definition at line 464 of file CTransferFunctionElem.h.

Referenced by CTransferFunctionElem(), getDescription(), and setDescription().

sigc::signal<void, unsigned int> CTransferFunctionElem::m_signalChanged [protected]
 

signal

See also:
(signal_changed)

Definition at line 482 of file CTransferFunctionElem.h.

Referenced by setAbsorptivity(), setDensMax(), setDensMin(), setEmissivity(), setEnabled(), setGlossiness(), setGradMax(), setGradMin(), setMaterialDiffuse(), setMaterialSpecular(), and signal_changed().

unsigned int CTransferFunctionElem::m_uiID [protected]
 

every part of the transfer function has a unique ID to simplify editing etc. I havn't taken the position in the list of CTransferFunction, since that might change after deleting elements etc.

Definition at line 471 of file CTransferFunctionElem.h.

Referenced by getID(), setAbsorptivity(), setDensMax(), setDensMin(), setEmissivity(), setEnabled(), setGlossiness(), setGradMax(), setGradMin(), setID(), setMaterialDiffuse(), and setMaterialSpecular().


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