\section{TTwo\-Level\-Form Class Reference}
\label{classTTwoLevelForm}\index{TTwoLevelForm@{TTwoLevelForm}}
The Two Level Volume Rendering window. 


{\tt \#include $<$MDITwo\-Level.h$>$}

\subsection*{Private Methods}
\begin{CompactItemize}
\item 
\index{_getFirstBitIndex@{\_\-getFirstBitIndex}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_getFirstBitIndex@{\_\-getFirstBitIndex}}
int \_\-\_\-fastcall {\bf \_\-get\-First\-Bit\-Index} (int val)\label{classTTwoLevelForm_TTwoLevelFormc2}

\begin{CompactList}\small\item\em Get the index of the bit with the smalest index.\item\end{CompactList}\item 
int \_\-\_\-fastcall {\bf \_\-get\-Next\-Bit\-Index} (int val)
\begin{CompactList}\small\item\em Get the index of the next bit in the value.\item\end{CompactList}\item 
\index{_resize@{\_\-resize}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_resize@{\_\-resize}}
void \_\-\_\-fastcall {\bf \_\-resize} ()\label{classTTwoLevelForm_TTwoLevelFormc4}

\begin{CompactList}\small\item\em Resize the \_\-picture array, update the status bar and write actual value of \_\-resolution to LResolution.\item\end{CompactList}\item 
void \_\-\_\-fastcall {\bf \_\-render} ()
\begin{CompactList}\small\item\em The \_\-render function performs the two level volume rendering.\item\end{CompactList}\item 
void \_\-\_\-fastcall {\bf \_\-draw} ({\bf rgb} \&val, int x, int y, int step)
\begin{CompactList}\small\item\em \_\-draw is used to draw a color to an array of pixel into \_\-picture.\item\end{CompactList}\item 
\index{_resetRenderer@{\_\-resetRenderer}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_resetRenderer@{\_\-resetRenderer}}
void \_\-\_\-fastcall {\bf \_\-reset\-Renderer} ()\label{classTTwoLevelForm_TTwoLevelFormc7}

\begin{CompactList}\small\item\em Resets the values needed by \_\-render\-Image.\item\end{CompactList}\item 
\index{_renderPreview@{\_\-renderPreview}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_renderPreview@{\_\-renderPreview}}
void \_\-\_\-fastcall {\bf \_\-render\-Preview} ()\label{classTTwoLevelForm_TTwoLevelFormc8}

\begin{CompactList}\small\item\em Renders a fast preview image for setting up the viewing position.\item\end{CompactList}\item 
bool \_\-\_\-fastcall {\bf \_\-render\-Image} ()
\begin{CompactList}\small\item\em Renders a high quality image.\item\end{CompactList}\item 
\index{_isInside@{\_\-isInside}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_isInside@{\_\-isInside}}
bool \_\-\_\-fastcall {\bf \_\-is\-Inside} (vectorf \&v)\label{classTTwoLevelForm_TTwoLevelFormc10}

\begin{CompactList}\small\item\em Returns true if the vector position is inside the rendering volume.\item\end{CompactList}\item 
\index{_isInside@{\_\-isInside}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_isInside@{\_\-isInside}}
bool \_\-\_\-fastcall {\bf \_\-is\-Inside} (vectord \&v)\label{classTTwoLevelForm_TTwoLevelFormc11}

\begin{CompactList}\small\item\em Returns true if the vector position is inside the rendering volume.\item\end{CompactList}\item 
float \_\-\_\-fastcall {\bf \_\-get\-Value} (vectorf \&v)
\begin{CompactList}\small\item\em Returns the value at the position v.\item\end{CompactList}\item 
double \_\-\_\-fastcall {\bf \_\-get\-Value} (const vectord \&v)
\begin{CompactList}\small\item\em Returns the value at the position v.\item\end{CompactList}\item 
\index{_getGradLength@{\_\-getGradLength}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_getGradLength@{\_\-getGradLength}}
double \_\-\_\-fastcall {\bf \_\-get\-Grad\-Length} (const vectord \&v)\label{classTTwoLevelForm_TTwoLevelFormc14}

\begin{CompactList}\small\item\em Returns the value form {\em absgrad} interpolated at position {\em pos}.\item\end{CompactList}\item 
vectorf \_\-\_\-fastcall {\bf \_\-get\-Gradient} (vectorf \&v)
\begin{CompactList}\small\item\em Returns the gradient at the position v.\item\end{CompactList}\item 
vectord \_\-\_\-fastcall {\bf \_\-get\-Gradient} (vectord \&v)
\begin{CompactList}\small\item\em Returns the gradient at the position v.\item\end{CompactList}\item 
void \_\-\_\-fastcall {\bf \_\-calc\-Color} ({\bf rgb} \&col, vectord \&normal, vectord \&view, vectord \&light)
\begin{CompactList}\small\item\em Shades the color given by {\em val}.\item\end{CompactList}\item 
\index{_setupTLAlpha@{\_\-setupTLAlpha}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_setupTLAlpha@{\_\-setupTLAlpha}}
void {\bf \_\-setup\-TLAlpha} (TSpeed\-Button $\ast$sb, TEdit $\ast$e, TTab\-Sheet $\ast$ts, double f)\label{classTTwoLevelForm_TTwoLevelFormc18}

\begin{CompactList}\small\item\em Sets up the panel for the Two Level Alpha manipulation.\item\end{CompactList}\item 
\index{_setupRef@{\_\-setupRef}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_setupRef@{\_\-setupRef}}
void {\bf \_\-setup\-Ref} (TSpeed\-Button $\ast$sb, TEdit $\ast$e, TTab\-Sheet $\ast$ts, double f)\label{classTTwoLevelForm_TTwoLevelFormc19}

\begin{CompactList}\small\item\em Set up the reference value panel.\item\end{CompactList}\item 
void {\bf \_\-setup\-List\-Box} (TList\-Box $\ast$lb, int \&rc)
\begin{CompactList}\small\item\em Sets up the list boxes on for a spezial ray caster.\item\end{CompactList}\item 
\index{_unsetBitInAllRCs@{\_\-unsetBitInAllRCs}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_unsetBitInAllRCs@{\_\-unsetBitInAllRCs}}
void \_\-\_\-fastcall {\bf \_\-unset\-Bit\-In\-All\-RCs} (int idx)\label{classTTwoLevelForm_TTwoLevelFormc21}

\begin{CompactList}\small\item\em 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.\item\end{CompactList}\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
\index{_rotx@{\_\-rotx}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_rotx@{\_\-rotx}}
int {\bf \_\-rotx}\label{classTTwoLevelForm_TTwoLevelFormo7}

\begin{CompactList}\small\item\em Rotation angle about the respecitve axis.\item\end{CompactList}\item 
\index{_roty@{\_\-roty}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_roty@{\_\-roty}}
int {\bf \_\-roty}\label{classTTwoLevelForm_TTwoLevelFormo8}

\begin{CompactList}\small\item\em Rotation angle about the respecitve axis.\item\end{CompactList}\item 
\index{_rotz@{\_\-rotz}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_rotz@{\_\-rotz}}
int {\bf \_\-rotz}\label{classTTwoLevelForm_TTwoLevelFormo9}

\begin{CompactList}\small\item\em Rotation angle about the respecitve axis.\item\end{CompactList}\item 
\index{_actualBit@{\_\-actualBit}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_actualBit@{\_\-actualBit}}
int {\bf \_\-actual\-Bit}\label{classTTwoLevelForm_TTwoLevelFormo17}

\begin{CompactList}\small\item\em Used by {\em \_\-get\-First\-Bit\-Index} and {\em \_\-get\-Next\-Bit\-Index}.\item\end{CompactList}\item 
\index{_traging@{\_\-traging}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_traging@{\_\-traging}}
bool {\bf \_\-traging}\label{classTTwoLevelForm_TTwoLevelFormo18}

\begin{CompactList}\small\item\em Does user want to trag the angle.\item\end{CompactList}\item 
\index{_rightButton@{\_\-rightButton}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_rightButton@{\_\-rightButton}}
bool {\bf \_\-right\-Button}\label{classTTwoLevelForm_TTwoLevelFormo19}

\begin{CompactList}\small\item\em If a dragging is started, is it started by the right mouse button.\item\end{CompactList}\item 
\index{_resolution@{\_\-resolution}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_resolution@{\_\-resolution}}
int {\bf \_\-resolution}\label{classTTwoLevelForm_TTwoLevelFormo20}

\begin{CompactList}\small\item\em Resolution of the target picture.\item\end{CompactList}\item 
\index{_pic_size@{\_\-pic\_\-size}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_pic_size@{\_\-pic\_\-size}}
int {\bf \_\-pic\_\-size}\label{classTTwoLevelForm_TTwoLevelFormo21}

\begin{CompactList}\small\item\em This value is calculated by \_\-resolution$\ast$\_\-resolution and is for speed purpose only.\item\end{CompactList}\item 
\index{_oldres@{\_\-oldres}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_oldres@{\_\-oldres}}
int {\bf \_\-oldres}\label{classTTwoLevelForm_TTwoLevelFormo22}

\begin{CompactList}\small\item\em Last picture resolution befor actual resolution.\item\end{CompactList}\item 
int {\bf \_\-progress}
\begin{CompactList}\small\item\em The image drawing progress.\item\end{CompactList}\item 
\index{_stopIt@{\_\-stopIt}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_stopIt@{\_\-stopIt}}
bool {\bf \_\-stop\-It}\label{classTTwoLevelForm_TTwoLevelFormo24}

\begin{CompactList}\small\item\em Stop ray casting at the end of the actual cycle.\item\end{CompactList}\item 
int {\bf \_\-actres}
\begin{CompactList}\small\item\em The actual resolution of the ray casting algorythm.\item\end{CompactList}\item 
\index{_actposx@{\_\-actposx}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_actposx@{\_\-actposx}}
int {\bf \_\-actposx}\label{classTTwoLevelForm_TTwoLevelFormo26}

\begin{CompactList}\small\item\em The actual x position of the ray in terms of the \_\-actres.\item\end{CompactList}\item 
\index{_actposy@{\_\-actposy}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_actposy@{\_\-actposy}}
int {\bf \_\-actposy}\label{classTTwoLevelForm_TTwoLevelFormo27}

\begin{CompactList}\small\item\em The actual y position of the ray in terms of the \_\-actres.\item\end{CompactList}\item 
int {\bf \_\-rpc}
\begin{CompactList}\small\item\em The number of rays calculated turing a call of \_\-render\-Image.\item\end{CompactList}\item 
\index{_maxTime@{\_\-maxTime}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_maxTime@{\_\-maxTime}}
float {\bf \_\-max\-Time}\label{classTTwoLevelForm_TTwoLevelFormo29}

\begin{CompactList}\small\item\em Maximum time the ray tracing function should need.\item\end{CompactList}\item 
\index{_viewx@{\_\-viewx}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_viewx@{\_\-viewx}}
vectord {\bf \_\-viewx}\label{classTTwoLevelForm_TTwoLevelFormo30}

\begin{CompactList}\small\item\em Viewing plane X direction.\item\end{CompactList}\item 
\index{_viewy@{\_\-viewy}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_viewy@{\_\-viewy}}
vectord {\bf \_\-viewy}\label{classTTwoLevelForm_TTwoLevelFormo31}

\begin{CompactList}\small\item\em Viewing plane Y direction.\item\end{CompactList}\item 
\index{_viewz@{\_\-viewz}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_viewz@{\_\-viewz}}
vectord {\bf \_\-viewz}\label{classTTwoLevelForm_TTwoLevelFormo32}

\begin{CompactList}\small\item\em Viewing plane Z direction.\item\end{CompactList}\item 
\index{_center@{\_\-center}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_center@{\_\-center}}
vectord {\bf \_\-center}\label{classTTwoLevelForm_TTwoLevelFormo33}

\begin{CompactList}\small\item\em Center of viewing volume.\item\end{CompactList}\item 
\index{_l2@{\_\-l2}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_l2@{\_\-l2}}
double {\bf \_\-l2}\label{classTTwoLevelForm_TTwoLevelFormo34}

\begin{CompactList}\small\item\em Ray lenght.\item\end{CompactList}\item 
\index{_step@{\_\-step}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_step@{\_\-step}}
double {\bf \_\-step}\label{classTTwoLevelForm_TTwoLevelFormo35}

\begin{CompactList}\small\item\em Length of one step in viewing coordinates.\item\end{CompactList}\item 
\index{_start@{\_\-start}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_start@{\_\-start}}
vectord {\bf \_\-start}\label{classTTwoLevelForm_TTwoLevelFormo36}

\begin{CompactList}\small\item\em Start position (lower left corner) of picture in viewing coordinates.\item\end{CompactList}\item 
vectord {\bf \_\-light\-Pos}
\begin{CompactList}\small\item\em Position of light.\item\end{CompactList}\item 
\index{_lightDir@{\_\-lightDir}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_lightDir@{\_\-lightDir}}
vectord {\bf \_\-light\-Dir}\label{classTTwoLevelForm_TTwoLevelFormo38}

\begin{CompactList}\small\item\em Direction of the light vector.\item\end{CompactList}\item 
\index{_thres@{\_\-thres}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_thres@{\_\-thres}}
int {\bf \_\-thres}\label{classTTwoLevelForm_TTwoLevelFormo39}

\begin{CompactList}\small\item\em Threshold for preview mode.\item\end{CompactList}\item 
\index{_ambient@{\_\-ambient}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_ambient@{\_\-ambient}}
double {\bf \_\-ambient}\label{classTTwoLevelForm_TTwoLevelFormo40}

\begin{CompactList}\small\item\em The ambient light intensity.\item\end{CompactList}\item 
\index{_ambientCol@{\_\-ambientCol}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_ambientCol@{\_\-ambientCol}}
{\bf rgb} {\bf \_\-ambient\-Col}\label{classTTwoLevelForm_TTwoLevelFormo41}

\begin{CompactList}\small\item\em The ambient light color.\item\end{CompactList}\item 
\index{_light@{\_\-light}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_light@{\_\-light}}
double {\bf \_\-light}\label{classTTwoLevelForm_TTwoLevelFormo42}

\begin{CompactList}\small\item\em The light intensity.\item\end{CompactList}\item 
\index{_lightCol@{\_\-lightCol}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_lightCol@{\_\-lightCol}}
{\bf rgb} {\bf \_\-light\-Col}\label{classTTwoLevelForm_TTwoLevelFormo43}

\begin{CompactList}\small\item\em The light color (by default white).\item\end{CompactList}\item 
\index{_power@{\_\-power}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_power@{\_\-power}}
int {\bf \_\-power}\label{classTTwoLevelForm_TTwoLevelFormo44}

\begin{CompactList}\small\item\em The power for phong shading.\item\end{CompactList}\item 
\index{_sinus@{\_\-sinus}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_sinus@{\_\-sinus}}
bool {\bf \_\-sinus}\label{classTTwoLevelForm_TTwoLevelFormo45}

\begin{CompactList}\small\item\em Should sinus be used in phong shading.\item\end{CompactList}\item 
\index{_startTime@{\_\-startTime}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_startTime@{\_\-startTime}}
TDate\-Time {\bf \_\-start\-Time}\label{classTTwoLevelForm_TTwoLevelFormo46}

\begin{CompactList}\small\item\em Start time of calculation.\item\end{CompactList}\item 
\index{_TwoLevelAlphaEdit@{\_\-TwoLevelAlphaEdit}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_TwoLevelAlphaEdit@{\_\-TwoLevelAlphaEdit}}
TEdit $\ast$ {\bf \_\-Two\-Level\-Alpha\-Edit}\label{classTTwoLevelForm_TTwoLevelFormo47}

\begin{CompactList}\small\item\em Pointer for the manipulation via {\em Sb\-Two\-Level\-Alpha}.\item\end{CompactList}\item 
\index{_RefEdit@{\_\-RefEdit}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_RefEdit@{\_\-RefEdit}}
TEdit $\ast$ {\bf \_\-Ref\-Edit}\label{classTTwoLevelForm_TTwoLevelFormo48}

\begin{CompactList}\small\item\em Edit field to manipulate via {\em Tb\-Ref}.\item\end{CompactList}\item 
\index{_alphaFH@{\_\-alphaFH}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_alphaFH@{\_\-alphaFH}}
double {\bf \_\-alpha\-FH}\label{classTTwoLevelForm_TTwoLevelFormo49}

\begin{CompactList}\small\item\em Two Level inserting alpha value for First Hit Volume Renderer.\item\end{CompactList}\item 
\index{_thresFH@{\_\-thresFH}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_thresFH@{\_\-thresFH}}
int {\bf \_\-thres\-FH}\label{classTTwoLevelForm_TTwoLevelFormo50}

\begin{CompactList}\small\item\em Thres hold for the First Hit Volume Renderer.\item\end{CompactList}\item 
int {\bf \_\-first\-Hit}
\begin{CompactList}\small\item\em Regions to render.\item\end{CompactList}\item 
\index{_alphaMIP@{\_\-alphaMIP}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_alphaMIP@{\_\-alphaMIP}}
double {\bf \_\-alpha\-MIP}\label{classTTwoLevelForm_TTwoLevelFormo52}

\begin{CompactList}\small\item\em Insert alpha value for MIP.\item\end{CompactList}\item 
\index{_MIP@{\_\-MIP}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_MIP@{\_\-MIP}}
int {\bf \_\-MIP}\label{classTTwoLevelForm_TTwoLevelFormo53}

\begin{CompactList}\small\item\em Areas to draw with MIP.\item\end{CompactList}\item 
\index{_MIPref@{\_\-MIPref}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_MIPref@{\_\-MIPref}}
double {\bf \_\-MIPref}\label{classTTwoLevelForm_TTwoLevelFormo54}

\begin{CompactList}\small\item\em MIP Reference value.\item\end{CompactList}\item 
\index{_alphaNPR@{\_\-alphaNPR}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_alphaNPR@{\_\-alphaNPR}}
double {\bf \_\-alpha\-NPR}\label{classTTwoLevelForm_TTwoLevelFormo55}

\begin{CompactList}\small\item\em Alpha value for NPR.\item\end{CompactList}\item 
\index{_NPR@{\_\-NPR}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_NPR@{\_\-NPR}}
int {\bf \_\-NPR}\label{classTTwoLevelForm_TTwoLevelFormo56}

\begin{CompactList}\small\item\em Areas for NPR.\item\end{CompactList}\item 
\index{_NPRref@{\_\-NPRref}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_NPRref@{\_\-NPRref}}
double {\bf \_\-NPRref}\label{classTTwoLevelForm_TTwoLevelFormo57}

\begin{CompactList}\small\item\em Reference value.\item\end{CompactList}\item 
\index{_alphaNR@{\_\-alphaNR}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_alphaNR@{\_\-alphaNR}}
double {\bf \_\-alpha\-NR}\label{classTTwoLevelForm_TTwoLevelFormo58}

\begin{CompactList}\small\item\em Alpha value for NR.\item\end{CompactList}\item 
\index{_NR@{\_\-NR}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_NR@{\_\-NR}}
int {\bf \_\-NR}\label{classTTwoLevelForm_TTwoLevelFormo59}

\begin{CompactList}\small\item\em Areas for NR.\item\end{CompactList}\item 
\index{_NPRpower@{\_\-NPRpower}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_NPRpower@{\_\-NPRpower}}
int {\bf \_\-NPRpower}\label{classTTwoLevelForm_TTwoLevelFormo60}

\begin{CompactList}\small\item\em Power of gradient.\item\end{CompactList}\item 
\index{_alphaAverage@{\_\-alphaAverage}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_alphaAverage@{\_\-alphaAverage}}
double {\bf \_\-alpha\-Average}\label{classTTwoLevelForm_TTwoLevelFormo61}

\begin{CompactList}\small\item\em Alpha value for Average.\item\end{CompactList}\item 
\index{_Average@{\_\-Average}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_Average@{\_\-Average}}
int {\bf \_\-Average}\label{classTTwoLevelForm_TTwoLevelFormo62}

\begin{CompactList}\small\item\em Areas for Average.\item\end{CompactList}\item 
\index{_Averageref@{\_\-Averageref}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_Averageref@{\_\-Averageref}}
double {\bf \_\-Averageref}\label{classTTwoLevelForm_TTwoLevelFormo63}

\begin{CompactList}\small\item\em Reference value for Average:.\item\end{CompactList}\item 
\index{_alphaTransparent@{\_\-alphaTransparent}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_alphaTransparent@{\_\-alphaTransparent}}
double {\bf \_\-alpha\-Transparent}\label{classTTwoLevelForm_TTwoLevelFormo64}

\begin{CompactList}\small\item\em Insert alpha value for Transparent.\item\end{CompactList}\item 
\index{_Transparent@{\_\-Transparent}!TTwoLevelForm@{TTwoLevelForm}}\index{TTwoLevelForm@{TTwoLevelForm}!_Transparent@{\_\-Transparent}}
int {\bf \_\-Transparent}\label{classTTwoLevelForm_TTwoLevelFormo65}

\begin{CompactList}\small\item\em Areas to draw with Transparent.\item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
The Two Level Volume Rendering window.

\begin{Desc}
\item[{\bf Todo: }]\par
Adjustable reference (intensity) value for {\bf Average Ray Caster}. 

Threshold value for {\bf NPR Ray Caster}. 

Separate power for border value for {\bf NPR Ray Caster} from phong shading power. 

{\bf Stop}, {\bf start} and {\bf restart} buttons (How should stop be handled? Reset? Continue?). 

Save and Load TL ray caster setting. 

 Export images. \end{Desc}
 



Definition at line 49 of file MDITwo\-Level.h.

\subsection{Member Function Documentation}
\index{TTwoLevelForm@{TTwo\-Level\-Form}!_calcColor@{\_\-calcColor}}
\index{_calcColor@{\_\-calcColor}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void \_\-\_\-fastcall TTwo\-Level\-Form::\_\-calc\-Color ({\bf rgb} \& {\em col}, vectord \& {\em normal}, vectord \& {\em view}, vectord \& {\em light})\hspace{0.3cm}{\tt  [inline, private]}}\label{classTTwoLevelForm_TTwoLevelFormc17}


Shades the color given by {\em val}.

\begin{Desc}
\item[Parameters: ]\par
\begin{description}
\item[{\em 
col}]The color value to be phong shaded. \item[{\em 
normal}]Surface normal (must be normalized). \item[{\em 
view}]Viewing vector (normalized). \item[{\em 
light}]Light direction (normalized). \end{description}
\end{Desc}


Definition at line 298 of file MDITwo\-Level.cpp.

References \_\-ambient, \_\-ambient\-Col, \_\-light, \_\-light\-Col, rgb::b, rgb::g, vector$<$ double $>$::normal(), and rgb::r.

Referenced by \_\-render\-Image().\index{TTwoLevelForm@{TTwo\-Level\-Form}!_draw@{\_\-draw}}
\index{_draw@{\_\-draw}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void \_\-\_\-fastcall TTwo\-Level\-Form::\_\-draw ({\bf rgb} \& {\em val}, int {\em x}, int {\em y}, int {\em step})\hspace{0.3cm}{\tt  [inline, private]}}\label{classTTwoLevelForm_TTwoLevelFormc6}


\_\-draw is used to draw a color to an array of pixel into \_\-picture.

It is used by {\em \_\-render\-Image} and {\em \_\-render\-Preview}.\begin{Desc}
\item[Parameters: ]\par
\begin{description}
\item[{\em 
val}]the value to be filled into the area. \item[{\em 
x}]position in picture dimension of {\em res}. \item[{\em 
y}]position in picture dimension of {\em res}. \item[{\em 
res}]resolution of the image to be fitted into the picture of resolution \_\-resolution. \item[{\em 
step}]the step width calculated by {\tt \_\-resolution/\_\-actres}. \end{description}
\end{Desc}


Definition at line 1108 of file MDITwo\-Level.cpp.

References \_\-pic\_\-size, and \_\-resolution.

Referenced by \_\-render\-Image(), and \_\-render\-Preview().\index{TTwoLevelForm@{TTwo\-Level\-Form}!_getGradient@{\_\-getGradient}}
\index{_getGradient@{\_\-getGradient}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}vectord \_\-\_\-fastcall TTwo\-Level\-Form::\_\-get\-Gradient (vectord \& {\em v})\hspace{0.3cm}{\tt  [inline, private]}}\label{classTTwoLevelForm_TTwoLevelFormc16}


Returns the gradient at the position v.

The function assumes, that the coordinates of v lie inside the viewing volume.

\begin{Desc}
\item[{\bf Todo: }]\par
Reconstruct gradient instead of interpolating it. 

 Calculate interval length to harmonize {\em \_\-draw\-Image} calculation time. \end{Desc}
 

Definition at line 238 of file MDITwo\-Level.cpp.

References vector$<$ double $>$::X, vector$<$ double $>$::Y, and vector$<$ double $>$::Z.\index{TTwoLevelForm@{TTwo\-Level\-Form}!_getGradient@{\_\-getGradient}}
\index{_getGradient@{\_\-getGradient}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}vectorf \_\-\_\-fastcall TTwo\-Level\-Form::\_\-get\-Gradient (vectorf \& {\em v})\hspace{0.3cm}{\tt  [inline, private]}}\label{classTTwoLevelForm_TTwoLevelFormc15}


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 MDITwo\-Level.cpp.

References vector$<$ t $>$::X, vector$<$ t $>$::Y, and vector$<$ t $>$::Z.

Referenced by \_\-render\-Image(), and \_\-render\-Preview().\index{TTwoLevelForm@{TTwo\-Level\-Form}!_getNextBitIndex@{\_\-getNextBitIndex}}
\index{_getNextBitIndex@{\_\-getNextBitIndex}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int \_\-\_\-fastcall TTwo\-Level\-Form::\_\-get\-Next\-Bit\-Index (int {\em val})\hspace{0.3cm}{\tt  [private]}}\label{classTTwoLevelForm_TTwoLevelFormc3}


Get the index of the next bit in the value.

{\em \_\-get\-First\-Bit\-Index} must be called first. 

Definition at line 85 of file MDITwo\-Level.cpp.

References \_\-actual\-Bit.

Referenced by \_\-get\-First\-Bit\-Index(), and \_\-setup\-List\-Box().\index{TTwoLevelForm@{TTwo\-Level\-Form}!_getValue@{\_\-getValue}}
\index{_getValue@{\_\-getValue}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double \_\-\_\-fastcall TTwo\-Level\-Form::\_\-get\-Value (const vectord \& {\em v})\hspace{0.3cm}{\tt  [inline, private]}}\label{classTTwoLevelForm_TTwoLevelFormc13}


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 {\em \_\-draw\-Image} only. 

Definition at line 138 of file MDITwo\-Level.cpp.

References vector$<$ double $>$::X, vector$<$ double $>$::Y, and vector$<$ double $>$::Z.\index{TTwoLevelForm@{TTwo\-Level\-Form}!_getValue@{\_\-getValue}}
\index{_getValue@{\_\-getValue}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float \_\-\_\-fastcall TTwo\-Level\-Form::\_\-get\-Value (vectorf \& {\em v})\hspace{0.3cm}{\tt  [inline, private]}}\label{classTTwoLevelForm_TTwoLevelFormc12}


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 MDITwo\-Level.cpp.

References vector$<$ t $>$::X, vector$<$ t $>$::Y, and vector$<$ t $>$::Z.

Referenced by \_\-render\-Preview().\index{TTwoLevelForm@{TTwo\-Level\-Form}!_render@{\_\-render}}
\index{_render@{\_\-render}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void \_\-\_\-fastcall TTwo\-Level\-Form::\_\-render ()\hspace{0.3cm}{\tt  [inline, private]}}\label{classTTwoLevelForm_TTwoLevelFormc5}


The \_\-render function performs the two level volume rendering.

It calculates the color of a point and calls {\em \_\-draw} which in turn updates the {\em \_\-picture} array. 

Definition at line 1102 of file MDITwo\-Level.cpp.

References \_\-render\-Preview().\index{TTwoLevelForm@{TTwo\-Level\-Form}!_renderImage@{\_\-renderImage}}
\index{_renderImage@{\_\-renderImage}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool \_\-\_\-fastcall TTwo\-Level\-Form::\_\-render\-Image ()\hspace{0.3cm}{\tt  [inline, private]}}\label{classTTwoLevelForm_TTwoLevelFormc9}


Renders a high quality image.

\begin{Desc}
\item[{\bf Todo: }]\par
code a two level ray caster. 

 adjust ray caster, so it can handle any resolution (others than sqares with a size of a multiple of 2). \end{Desc}
 

Definition at line 512 of file MDITwo\-Level.cpp.

References \_\-actposx, \_\-actposy, \_\-actres, \_\-alpha\-Average, \_\-alpha\-FH, \_\-alpha\-MIP, \_\-alpha\-NPR, \_\-alpha\-NR, \_\-alpha\-Transparent, \_\-ambient, \_\-ambient\-Col, \_\-Average, \_\-Averageref, \_\-calc\-Color(), \_\-draw(), \_\-first\-Hit, \_\-get\-Gradient(), \_\-get\-Grad\-Length(), \_\-is\-Inside(), \_\-l2, \_\-light\-Dir, \_\-max\-Time, \_\-MIP, \_\-MIPref, \_\-NPR, \_\-NPRref, \_\-NR, \_\-pic\_\-size, \_\-progress, \_\-resolution, \_\-rpc, \_\-start, \_\-start\-Time, \_\-step, \_\-stop\-It, \_\-thres\-FH, \_\-Transparent, \_\-viewx, \_\-viewy, \_\-viewz, rgb::b, rgb::g, vector$<$ double $>$::normal(), and rgb::r.\index{TTwoLevelForm@{TTwo\-Level\-Form}!_setupListBox@{\_\-setupListBox}}
\index{_setupListBox@{\_\-setupListBox}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TTwo\-Level\-Form::\_\-setup\-List\-Box (TList\-Box $\ast$ {\em lb}, int \& {\em rc})\hspace{0.3cm}{\tt  [private]}}\label{classTTwoLevelForm_TTwoLevelFormc20}


Sets up the list boxes on for a spezial ray caster.

\begin{Desc}
\item[Parameters: ]\par
\begin{description}
\item[{\em 
lb}]The list box to be set up. \item[{\em 
rc}]The ray caster value to manipulate. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns: ]\par
Returns the manipulated ray caster value. \end{Desc}


Definition at line 1224 of file MDITwo\-Level.cpp.

References \_\-get\-First\-Bit\-Index(), and \_\-get\-Next\-Bit\-Index().

\subsection{Member Data Documentation}
\index{TTwoLevelForm@{TTwo\-Level\-Form}!_actres@{\_\-actres}}
\index{_actres@{\_\-actres}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int TTwo\-Level\-Form::\_\-actres\hspace{0.3cm}{\tt  [private]}}\label{classTTwoLevelForm_TTwoLevelFormo25}


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.

\begin{Desc}
\item[{\bf Todo: }]\par
 adjust the ray casting algorythm in a way, so it can handle any target resolution. \end{Desc}
 

Definition at line 306 of file MDITwo\-Level.h.

Referenced by \_\-render\-Image(), and \_\-reset\-Renderer().\index{TTwoLevelForm@{TTwo\-Level\-Form}!_firstHit@{\_\-firstHit}}
\index{_firstHit@{\_\-firstHit}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int TTwo\-Level\-Form::\_\-first\-Hit\hspace{0.3cm}{\tt  [private]}}\label{classTTwoLevelForm_TTwoLevelFormo51}


Regions to render.

Only one region could be rendered with the First Hit because there is only one threshold.

\begin{Desc}
\item[{\bf Todo: }]\par
 Think about a alternative method to render multiple regions with first hit. How should the threshold be defined then? \end{Desc}
 

Definition at line 425 of file MDITwo\-Level.h.

Referenced by \_\-render\-Image(), and \_\-unset\-Bit\-In\-All\-RCs().\index{TTwoLevelForm@{TTwo\-Level\-Form}!_lightPos@{\_\-lightPos}}
\index{_lightPos@{\_\-lightPos}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}vectord TTwo\-Level\-Form::\_\-light\-Pos\hspace{0.3cm}{\tt  [private]}}\label{classTTwoLevelForm_TTwoLevelFormo37}


Position of light.

It is calculated relative to the viewing position. 

Definition at line 357 of file MDITwo\-Level.h.

Referenced by \_\-reset\-Renderer().\index{TTwoLevelForm@{TTwo\-Level\-Form}!_progress@{\_\-progress}}
\index{_progress@{\_\-progress}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int TTwo\-Level\-Form::\_\-progress\hspace{0.3cm}{\tt  [private]}}\label{classTTwoLevelForm_TTwoLevelFormo23}


The image drawing progress.

It is calculated by incrementing the value for each finished ray. So the final value equals to {\tt \_\-resolution$\ast$\_\-resolution}. 

Definition at line 294 of file MDITwo\-Level.h.

Referenced by \_\-render\-Image(), and \_\-reset\-Renderer().\index{TTwoLevelForm@{TTwo\-Level\-Form}!_rpc@{\_\-rpc}}
\index{_rpc@{\_\-rpc}!TTwoLevelForm@{TTwo\-Level\-Form}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int TTwo\-Level\-Form::\_\-rpc\hspace{0.3cm}{\tt  [private]}}\label{classTTwoLevelForm_TTwoLevelFormo28}


The number of rays calculated turing a call of \_\-render\-Image.

\begin{Desc}
\item[{\bf Todo: }]\par
 adjust the value by mesuring the time needed for the actual number or rays. \end{Desc}
 

Definition at line 321 of file MDITwo\-Level.h.

Referenced by \_\-render\-Image(), and \_\-reset\-Renderer().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
MDITwo\-Level.h\item 
MDITwo\-Level.cpp\end{CompactItemize}
