#include <MDITwoLevel.h>
Private Methods | |
int __fastcall | _getFirstBitIndex (int val) |
Get the index of the bit with the smalest index. | |
int __fastcall | _getNextBitIndex (int val) |
Get the index of the next bit in the value. | |
void __fastcall | _resize () |
Resize the _picture array, update the status bar and write actual value of _resolution to LResolution. | |
void __fastcall | _render () |
The _render function performs the two level volume rendering. | |
void __fastcall | _draw (rgb &val, int x, int y, int step) |
_draw is used to draw a color to an array of pixel into _picture. | |
void __fastcall | _resetRenderer () |
Resets the values needed by _renderImage. | |
void __fastcall | _renderPreview () |
Renders a fast preview image for setting up the viewing position. | |
bool __fastcall | _renderImage () |
Renders a high quality image. | |
bool __fastcall | _isInside (vectorf &v) |
Returns true if the vector position is inside the rendering volume. | |
bool __fastcall | _isInside (vectord &v) |
Returns true if the vector position is inside the rendering volume. | |
float __fastcall | _getValue (vectorf &v) |
Returns the value at the position v. | |
double __fastcall | _getValue (const vectord &v) |
Returns the value at the position v. | |
double __fastcall | _getGradLength (const vectord &v) |
Returns the value form absgrad interpolated at position pos. | |
vectorf __fastcall | _getGradient (vectorf &v) |
Returns the gradient at the position v. | |
vectord __fastcall | _getGradient (vectord &v) |
Returns the gradient at the position v. | |
void __fastcall | _calcColor (rgb &col, vectord &normal, vectord &view, vectord &light) |
Shades the color given by val. | |
void | _setupTLAlpha (TSpeedButton *sb, TEdit *e, TTabSheet *ts, double f) |
Sets up the panel for the Two Level Alpha manipulation. | |
void | _setupRef (TSpeedButton *sb, TEdit *e, TTabSheet *ts, double f) |
Set up the reference value panel. | |
void | _setupListBox (TListBox *lb, int &rc) |
Sets up the list boxes on for a spezial ray caster. | |
void __fastcall | _unsetBitInAllRCs (int idx) |
To ensure a special area is drawn by only one kind of ray caster, we first unset the spezial bit in all ray caster with this function. | |
Private Attributes | |
int | _rotx |
Rotation angle about the respecitve axis. | |
int | _roty |
Rotation angle about the respecitve axis. | |
int | _rotz |
Rotation angle about the respecitve axis. | |
int | _actualBit |
Used by _getFirstBitIndex and _getNextBitIndex. | |
bool | _traging |
Does user want to trag the angle. | |
bool | _rightButton |
If a dragging is started, is it started by the right mouse button. | |
int | _resolution |
Resolution of the target picture. | |
int | _pic_size |
This value is calculated by _resolution*_resolution and is for speed purpose only. | |
int | _oldres |
Last picture resolution befor actual resolution. | |
int | _progress |
The image drawing progress. | |
bool | _stopIt |
Stop ray casting at the end of the actual cycle. | |
int | _actres |
The actual resolution of the ray casting algorythm. | |
int | _actposx |
The actual x position of the ray in terms of the _actres. | |
int | _actposy |
The actual y position of the ray in terms of the _actres. | |
int | _rpc |
The number of rays calculated turing a call of _renderImage. | |
float | _maxTime |
Maximum time the ray tracing function should need. | |
vectord | _viewx |
Viewing plane X direction. | |
vectord | _viewy |
Viewing plane Y direction. | |
vectord | _viewz |
Viewing plane Z direction. | |
vectord | _center |
Center of viewing volume. | |
double | _l2 |
Ray lenght. | |
double | _step |
Length of one step in viewing coordinates. | |
vectord | _start |
Start position (lower left corner) of picture in viewing coordinates. | |
vectord | _lightPos |
Position of light. | |
vectord | _lightDir |
Direction of the light vector. | |
int | _thres |
Threshold for preview mode. | |
double | _ambient |
The ambient light intensity. | |
rgb | _ambientCol |
The ambient light color. | |
double | _light |
The light intensity. | |
rgb | _lightCol |
The light color (by default white). | |
int | _power |
The power for phong shading. | |
bool | _sinus |
Should sinus be used in phong shading. | |
TDateTime | _startTime |
Start time of calculation. | |
TEdit * | _TwoLevelAlphaEdit |
Pointer for the manipulation via SbTwoLevelAlpha. | |
TEdit * | _RefEdit |
Edit field to manipulate via TbRef. | |
double | _alphaFH |
Two Level inserting alpha value for First Hit Volume Renderer. | |
int | _thresFH |
Thres hold for the First Hit Volume Renderer. | |
int | _firstHit |
Regions to render. | |
double | _alphaMIP |
Insert alpha value for MIP. | |
int | _MIP |
Areas to draw with MIP. | |
double | _MIPref |
MIP Reference value. | |
double | _alphaNPR |
Alpha value for NPR. | |
int | _NPR |
Areas for NPR. | |
double | _NPRref |
Reference value. | |
double | _alphaNR |
Alpha value for NR. | |
int | _NR |
Areas for NR. | |
int | _NPRpower |
Power of gradient. | |
double | _alphaAverage |
Alpha value for Average. | |
int | _Average |
Areas for Average. | |
double | _Averageref |
Reference value for Average:. | |
double | _alphaTransparent |
Insert alpha value for Transparent. | |
int | _Transparent |
Areas to draw with Transparent. |
Threshold value for NPR Ray Caster.
Separate power for border value for NPR Ray Caster from phong shading power.
Stop, start and restart buttons (How should stop be handled? Reset? Continue?).
Save and Load TL ray caster setting.
Export images.
Definition at line 49 of file MDITwoLevel.h.
|
Shades the color given by val.
Definition at line 298 of file MDITwoLevel.cpp. References _ambient, _ambientCol, _light, _lightCol, rgb::b, rgb::g, vector< double >::normal(), and rgb::r. Referenced by _renderImage(). |
|
_draw is used to draw a color to an array of pixel into _picture. It is used by _renderImage and _renderPreview.
Definition at line 1108 of file MDITwoLevel.cpp. References _pic_size, and _resolution. Referenced by _renderImage(), and _renderPreview(). |
|
Returns the gradient at the position v. The function assumes, that the coordinates of v lie inside the viewing volume.
Definition at line 238 of file MDITwoLevel.cpp. References vector< double >::X, vector< double >::Y, and vector< double >::Z. |
|
Returns the gradient at the position v. The function assumes, that the coordinates of v lie inside the viewing volume. Definition at line 182 of file MDITwoLevel.cpp. References vector< t >::X, vector< t >::Y, and vector< t >::Z. Referenced by _renderImage(), and _renderPreview(). |
|
Get the index of the next bit in the value. _getFirstBitIndex must be called first. Definition at line 85 of file MDITwoLevel.cpp. References _actualBit. Referenced by _getFirstBitIndex(), and _setupListBox(). |
|
Returns the value at the position v. The function assumes, that the coordinates of v lie inside the viewing volume. This function is used by _drawImage only. Definition at line 138 of file MDITwoLevel.cpp. References vector< double >::X, vector< double >::Y, and vector< double >::Z. |
|
Returns the value at the position v. The function assumes, that the coordinates of v lie inside the viewing volume. Definition at line 97 of file MDITwoLevel.cpp. References vector< t >::X, vector< t >::Y, and vector< t >::Z. Referenced by _renderPreview(). |
|
The _render function performs the two level volume rendering. It calculates the color of a point and calls _draw which in turn updates the _picture array. Definition at line 1102 of file MDITwoLevel.cpp. References _renderPreview(). |
|
Renders a high quality image.
Definition at line 512 of file MDITwoLevel.cpp. References _actposx, _actposy, _actres, _alphaAverage, _alphaFH, _alphaMIP, _alphaNPR, _alphaNR, _alphaTransparent, _ambient, _ambientCol, _Average, _Averageref, _calcColor(), _draw(), _firstHit, _getGradient(), _getGradLength(), _isInside(), _l2, _lightDir, _maxTime, _MIP, _MIPref, _NPR, _NPRref, _NR, _pic_size, _progress, _resolution, _rpc, _start, _startTime, _step, _stopIt, _thresFH, _Transparent, _viewx, _viewy, _viewz, rgb::b, rgb::g, vector< double >::normal(), and rgb::r. |
|
Sets up the list boxes on for a spezial ray caster.
Definition at line 1224 of file MDITwoLevel.cpp. References _getFirstBitIndex(), and _getNextBitIndex(). |
|
The actual resolution of the ray casting algorythm. It starts at 2 and ends up at _resolution. Therefor _resolution has to be a multiple of 2.
Definition at line 306 of file MDITwoLevel.h. Referenced by _renderImage(), and _resetRenderer(). |
|
Regions to render. Only one region could be rendered with the First Hit because there is only one threshold.
Definition at line 425 of file MDITwoLevel.h. Referenced by _renderImage(), and _unsetBitInAllRCs(). |
|
Position of light. It is calculated relative to the viewing position. Definition at line 357 of file MDITwoLevel.h. Referenced by _resetRenderer(). |
|
The image drawing progress.
It is calculated by incrementing the value for each finished ray. So the final value equals to Definition at line 294 of file MDITwoLevel.h. Referenced by _renderImage(), and _resetRenderer(). |
|
The number of rays calculated turing a call of _renderImage.
Definition at line 321 of file MDITwoLevel.h. Referenced by _renderImage(), and _resetRenderer(). |