\section{TTransfer Class Reference}
\label{classTTransfer}\index{TTransfer@{TTransfer}}
This class represents the transfer function. 


{\tt \#include $<$transfer.h$>$}

\subsection*{Public Methods}
\begin{CompactItemize}
\item 
\index{TTransfer@{TTransfer}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!TTransfer@{TTransfer}}
{\bf TTransfer} ({\bf THistogram} $\ast$h)\label{classTTransfer_TTransfera0}

\begin{CompactList}\small\item\em Constructor.\item\end{CompactList}\item 
\index{~TTransfer@{$\sim$TTransfer}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!~TTransfer@{$\sim$TTransfer}}
{\bf $\sim$TTransfer} ()\label{classTTransfer_TTransfera1}

\begin{CompactList}\small\item\em Destructor.\item\end{CompactList}\item 
int {\bf split} (TPaint\-Box $\ast$pb, int x, int y)
\begin{CompactList}\small\item\em Split the line at position (x,y).\item\end{CompactList}\item 
\index{clear@{clear}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!clear@{clear}}
void {\bf clear} ()\label{classTTransfer_TTransfera3}

\begin{CompactList}\small\item\em Delete all lines.\item\end{CompactList}\item 
bool {\bf select} (TPaint\-Box $\ast$pb, int x, int y)
\begin{CompactList}\small\item\em Select the line at position (x,y).\item\end{CompactList}\item 
\index{select@{select}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!select@{select}}
void {\bf select} (int idx)\label{classTTransfer_TTransfera5}

\begin{CompactList}\small\item\em Select the line with index idx.\item\end{CompactList}\item 
\index{selectStart@{selectStart}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!selectStart@{selectStart}}
void {\bf select\-Start} (int idx)\label{classTTransfer_TTransfera6}

\begin{CompactList}\small\item\em Select the start point of the selected line.\item\end{CompactList}\item 
\index{selectEnd@{selectEnd}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!selectEnd@{selectEnd}}
void {\bf select\-End} (int idx)\label{classTTransfer_TTransfera7}

\begin{CompactList}\small\item\em Select the end point of the selected line.\item\end{CompactList}\item 
\index{getSelected@{getSelected}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!getSelected@{getSelected}}
{\bf TLine} $\ast$ {\bf get\-Selected} ()\label{classTTransfer_TTransfera8}

\begin{CompactList}\small\item\em Returns the selected line.\item\end{CompactList}\item 
\index{getSelIdx@{getSelIdx}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!getSelIdx@{getSelIdx}}
int {\bf get\-Sel\-Idx} ()\label{classTTransfer_TTransfera9}

\begin{CompactList}\small\item\em Returns the index of the selected line.\item\end{CompactList}\item 
\index{getLine@{getLine}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!getLine@{getLine}}
{\bf TLine} $\ast$ {\bf get\-Line} (int idx)\label{classTTransfer_TTransfera10}

\begin{CompactList}\small\item\em Get line with index idx.\item\end{CompactList}\item 
\index{unselect@{unselect}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!unselect@{unselect}}
void {\bf unselect} ()\label{classTTransfer_TTransfera11}

\begin{CompactList}\small\item\em Unselect all lines.\item\end{CompactList}\item 
\index{drawTo@{drawTo}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!drawTo@{drawTo}}
void {\bf draw\-To} (TPaint\-Box $\ast$pb)\label{classTTransfer_TTransfera12}

\begin{CompactList}\small\item\em Draw the transfer function to the TPaint\-Box pb.\item\end{CompactList}\item 
\index{lineNear@{lineNear}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!lineNear@{lineNear}}
int \_\-\_\-fastcall {\bf line\-Near} (TPaint\-Box $\ast$pb, int x, int y)\label{classTTransfer_TTransfera13}

\begin{CompactList}\small\item\em Return the index if the line to which the point (x,y) is near or -1 otherwise.\item\end{CompactList}\item 
\index{nearStart@{nearStart}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!nearStart@{nearStart}}
bool \_\-\_\-fastcall {\bf near\-Start} (int idx, TPaint\-Box $\ast$pb, int x, int y)\label{classTTransfer_TTransfera14}

\begin{CompactList}\small\item\em Returns true if the point (x,y) is near the start point of the selected line.\item\end{CompactList}\item 
\index{nearEnd@{nearEnd}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!nearEnd@{nearEnd}}
bool \_\-\_\-fastcall {\bf near\-End} (int idx, TPaint\-Box $\ast$pb, int x, int y)\label{classTTransfer_TTransfera15}

\begin{CompactList}\small\item\em Returns true if the point (x,y) is near the start point of the selected line.\item\end{CompactList}\item 
\index{getName@{getName}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!getName@{getName}}
int \_\-\_\-fastcall {\bf get\-Name} (double data)\label{classTTransfer_TTransfera16}

\begin{CompactList}\small\item\em Get the name to the value spezified by {\em data}.\item\end{CompactList}\item 
\index{getColor@{getColor}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!getColor@{getColor}}
{\bf rgba} \_\-\_\-fastcall {\bf get\-Color} (\_\-\_\-int16 data)\label{classTTransfer_TTransfera17}

\begin{CompactList}\small\item\em Get the color value for the data value {\em data}.\item\end{CompactList}\item 
\index{getData@{getData}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!getData@{getData}}
TData \_\-\_\-fastcall {\bf get\-Data} (double data)\label{classTTransfer_TTransfera18}

\begin{CompactList}\small\item\em Get data on base of a float value.\item\end{CompactList}\item 
\index{loadFromXLM@{loadFromXLM}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!loadFromXLM@{loadFromXLM}}
bool {\bf load\-From\-XLM} (\_\-di\_\-IXMLNode doc)\label{classTTransfer_TTransfera19}

\begin{CompactList}\small\item\em Set up transfer function from XML document.\item\end{CompactList}\item 
\index{saveToXML@{saveToXML}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!saveToXML@{saveToXML}}
bool {\bf save\-To\-XML} (\_\-di\_\-IXMLNode doc)\label{classTTransfer_TTransfera20}

\begin{CompactList}\small\item\em Write to xml document.\item\end{CompactList}\item 
\index{addName@{addName}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!addName@{addName}}
int {\bf add\-Name} (Ansi\-String \&name)\label{classTTransfer_TTransfera21}

\begin{CompactList}\small\item\em Add a new name to the names list.\item\end{CompactList}\end{CompactItemize}
\subsection*{Public Attributes}
\begin{CompactItemize}
\item 
\index{numLines@{numLines}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!numLines@{numLines}}
\_\-\_\-property int {\bf num\-Lines} = \{ read={\bf \_\-fill} \}\label{classTTransfer_TTransferm2}

\begin{CompactList}\small\item\em Number of lines currently in the lines array.\item\end{CompactList}\item 
\index{Dirty@{Dirty}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!Dirty@{Dirty}}
\_\-\_\-property bool {\bf Dirty} = \{ write=\_\-dirty \}\label{classTTransfer_TTransferm3}

\begin{CompactList}\small\item\em Dirty flag for the RGBA cache.\item\end{CompactList}\item 
\index{areaNames@{areaNames}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!areaNames@{areaNames}}
\_\-\_\-property TString\-List $\ast$ {\bf area\-Names} = \{ read={\bf \_\-area\-Names} \}\label{classTTransfer_TTransferm4}

\begin{CompactList}\small\item\em Area names list.\item\end{CompactList}\end{CompactItemize}
\subsection*{Private Methods}
\begin{CompactItemize}
\item 
\index{_addLine@{\_\-addLine}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!_addLine@{\_\-addLine}}
void {\bf \_\-add\-Line} ({\bf TLine} $\ast$l)\label{classTTransfer_TTransferc1}

\begin{CompactList}\small\item\em Add a new line at the end of the lines array.\item\end{CompactList}\item 
\index{_insertLine@{\_\-insertLine}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!_insertLine@{\_\-insertLine}}
void {\bf \_\-insert\-Line} ({\bf TLine} $\ast$l, int pos)\label{classTTransfer_TTransferc2}

\begin{CompactList}\small\item\em Insert a line to the lines array at position pos.\item\end{CompactList}\item 
\index{_cleanTDataCache@{\_\-cleanTDataCache}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!_cleanTDataCache@{\_\-cleanTDataCache}}
void {\bf \_\-clean\-TData\-Cache} ()\label{classTTransfer_TTransferc3}

\begin{CompactList}\small\item\em Clear the RBGA cache :).\item\end{CompactList}\item 
\index{_setupTDataCache@{\_\-setupTDataCache}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!_setupTDataCache@{\_\-setupTDataCache}}
bool {\bf \_\-setup\-TData\-Cache} (\_\-\_\-int16 data)\label{classTTransfer_TTransferc4}

\begin{CompactList}\small\item\em Set up cache for position {\em data}.\item\end{CompactList}\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
\index{_size@{\_\-size}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!_size@{\_\-size}}
int {\bf \_\-size}\label{classTTransfer_TTransfero0}

\begin{CompactList}\small\item\em The lines array size.\item\end{CompactList}\item 
\index{_hsize@{\_\-hsize}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!_hsize@{\_\-hsize}}
int {\bf \_\-hsize}\label{classTTransfer_TTransfero1}

\begin{CompactList}\small\item\em The histogram size.\item\end{CompactList}\item 
\index{_fill@{\_\-fill}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!_fill@{\_\-fill}}
int {\bf \_\-fill}\label{classTTransfer_TTransfero2}

\begin{CompactList}\small\item\em The fill of the lines array.\item\end{CompactList}\item 
\index{_lines@{\_\-lines}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!_lines@{\_\-lines}}
{\bf TLine} $\ast$$\ast$ {\bf \_\-lines}\label{classTTransfer_TTransfero3}

\begin{CompactList}\small\item\em The lines array.\item\end{CompactList}\item 
\index{_histo@{\_\-histo}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!_histo@{\_\-histo}}
{\bf THistogram} $\ast$ {\bf \_\-histo}\label{classTTransfer_TTransfero4}

\begin{CompactList}\small\item\em A reference to {\bf THistogram} {\rm (p.\,\pageref{classTHistogram})} used to get several information from it during drawing it to the TPaint\-Box.\item\end{CompactList}\item 
\index{_TDataCache@{\_\-TDataCache}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!_TDataCache@{\_\-TDataCache}}
TData $\ast$$\ast$ {\bf \_\-TData\-Cache}\label{classTTransfer_TTransfero5}

\begin{CompactList}\small\item\em A Cache to speed up the calculation of the color and alpha data for the voxel data.\item\end{CompactList}\item 
\index{_areaNames@{\_\-areaNames}!TTransfer@{TTransfer}}\index{TTransfer@{TTransfer}!_areaNames@{\_\-areaNames}}
TString\-List $\ast$ {\bf \_\-area\-Names}\label{classTTransfer_TTransfero6}

\begin{CompactList}\small\item\em Area name list.\item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
This class represents the transfer function.

It is on the one side responsible for drawing the transfer function to a TPaint\-Box and on the other side for applying color and alpha data for the whole spectrum of the histogram.

\begin{Desc}
\item[{\bf Todo: }]\par
 Refine {\em near\-Line} to find all lines. \end{Desc}
 



Definition at line 326 of file transfer.h.

\subsection{Member Function Documentation}
\index{TTransfer@{TTransfer}!select@{select}}
\index{select@{select}!TTransfer@{TTransfer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TTransfer::select (TPaint\-Box $\ast$ {\em pb}, int {\em x}, int {\em y})}\label{classTTransfer_TTransfera4}


Select the line at position (x,y).

The function finds the line by itself. 

Definition at line 333 of file transfer.cpp.

References \_\-lines, line\-Near(), TLine::Selected, and unselect().

Referenced by split().\index{TTransfer@{TTransfer}!split@{split}}
\index{split@{split}!TTransfer@{TTransfer}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int TTransfer::split (TPaint\-Box $\ast$ {\em pb}, int {\em x}, int {\em y})}\label{classTTransfer_TTransfera2}


Split the line at position (x,y).

The function finds the right line by itself. 

Definition at line 307 of file transfer.cpp.

References \_\-histo, \_\-insert\-Line(), \_\-lines, TLine::End, THistogram::get\-HPP(), line\-Near(), near\-End(), near\-Start(), select(), and TLine\-Point::X.

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