REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Real-Time Volume Graphics
[05] Transfer Functions
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Classification
During Classification the user defines the „Look“ of the data.
Which parts are transparent? Which parts have which color?
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Classification
During Classification the user defines the „Look“ of the data.
Which parts are transparent? Which parts have which color?
The user defines a Transfer function.
Emission RGB
Absorption Ascalar S Transfe
r Functio
n
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Classification
Real-Time update of the transfer function necessary!!!
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Classification
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Pre- vs Post-Interpolative Classificationo
pti
cal p
rop
erti
es
data value
inte
rpo
lati
on
PRE-INTERPOLATIVE
op
tica
l pro
per
ties
data value
interpolation
POST-INTERPOLATIVE
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Pre-Classification
GeometryProcessing
Rasterization
FragmentOperations
TransferFunction
A color value is fetched from a tablefor each Voxel
A RGBA Value is determined for each Voxel
Pre-Classification: Pre-Classification:Color table is applied before interpolation.
(pre-interpolative Transfer function)
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Possible Implementations
The best approach: Paletted TexturesStore the scalar volume together with the color table directly in graphics memory.Hardware-Support necessary!Low memory consumption
Main Memory (scalar volume can be deleted!)Graphics Memory (scalar volume + TF)
Low load on memory busScalar volume must be transferred only once!
Only the color table must be re-uploaded on TF change
Main Memory Graphics Memory
Scalar Textureskalar value S
Texture paletteA
GP /
PC
IeA
GP /
PC
Ie
Transfer function
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Summary Pre-ClassificationApplication of the Transfer function before RasterizationOne RGBA Lookup for each VoxelDifferent Implementations:
Texture Transfer Texture Color Tables (paletted textures)
Simple and EfficientGood for coloring segmented data
Pre-Classification Summary
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Post-Classification
GeometryProcessing
Rasterization
FragmentOperations
TransferFunction
A color is fetched from the color table for each Fragment
Post-Classification: Post-Classification:The color table is applied after Interpolation
(post-interpolative Transfer function).
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Post-ClassificationTexture 0 = Scalar
field
Texture 1 = Transferfunction [Emission RGB, Absorption A]
R=G=B=A=Scalar field S
R
RGBA
= T(S)Polygon
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
CG Implementation//fragment program for post-classification //using 3D texturesfloat4 main (float3 texUV : TEXCOORD0, uniform sampler3D volume_texture, uniform sampler1D transfer_function) :
COLOR{ float index = tex3D(volume_texture, texUV); float4 result = tex1D(transfer_function, index); return result;}
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Comparison of image quality
Post-ClassificationPre-Classification
Same TF, same Resolution, same Sampling Rate
Quality: Pre- vs. Post-Classification
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Pre-Classification Post-Classification
Quality
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Post-interpolative TF
Classified data
SupersamplingTransfer Function
Supersampling
Transfer Function
Analytical Solution Pre-interpolative TF
Transfer Function
Continuous data Discrete data
Scalar value
alph
a va
lue
Pre- vs Post-Classification
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
Pre-Integrated Classification
REAL-TIME VOLUME GRAPHICSKlaus EngelSiemens AG, Erlangen, Germany Eurographics 2006
When to use which Classification
Pre-Interpolative ClassificationIf the graphics hardware does not support fragment shadersFor simple segmented volume data visualization
Post-Interpolative ClassificationIf the transfer function is “smooth”For good quality and good performance (especially when slicing)