\begin{cxxContents}
\cxxContentsEntry{1}{CAAMAnalyzeSynthesize}{Abstract base class for the analyze/synthesize classes. }
\cxxContentsEntry{2}{CAAMAnalyzeSynthesizeOpenGL}{Hardware implementation of the analysis and synthesis functions. }
\cxxContentsEntry{3}{CAAMAnalyzeSynthesizeSoftware}{Software implementation of the analysis and synthesis functions. }
\cxxContentsEntry{4}{CAAMBuilder}{Factory object that produces CAAMModel objects. }
\cxxContentsEntry{5}{CAAMDeform}{Abstract deformation basis. }
\cxxContentsEntry{6}{CAAMDeformPCA}{Performs Principal Component Analysis on a set of data vectors. }
\cxxContentsEntry{7}{CAAMDelaunay}{Delaunay Triangulator.  }
\cxxContentsEntry{8}{CAAMInitialize}{Abstract base class for all AAM initialization  classes. }
\cxxContentsEntry{9}{CAAMInitializeStegmann}{Implementation of a simple intialization method.			 }
\begin{cxxContents}
\cxxContentsEntry{9.1}{CAAMInitEntry}{Container for initialization results.  }
\cxxContentsEntry{9.2}{CAAMInitCandidates}{Initialization candidate containiner. }
\end{cxxContents}
\cxxContentsEntry{10}{CAAMLinearReg}{Performs multi-variate linear regression on a set of experiments. }
\cxxContentsEntry{11}{CAAMLog}{Log facility class. }
\cxxContentsEntry{12}{CAAMMathUtil}{Utility math/statistical methods for the AAM project. }
\cxxContentsEntry{13}{CAAMPoint}{Point container. }
\cxxContentsEntry{14}{CAAMTriangle}{Triangle container with built-in hit test. }
\cxxContentsEntry{15}{CAAMMesh}{2D triangular mesh container. }
\cxxContentsEntry{16}{CAAMModel}{The core Active Apperance Model object. }
\begin{cxxContents}
\cxxContentsEntry{16.1}{CAAMOptState}{Stores interates from the optimization process. }
\cxxContentsEntry{16.2}{CAAMOptRes}{Stores optimization results. }
\end{cxxContents}
\cxxContentsEntry{17}{CAAMModelMS}{Multi-scale derivation of CAAModel. }
\cxxContentsEntry{18}{CAAMModelSeq}{AAM sequence object. }
\cxxContentsEntry{19}{CAAMMovieAVI}{Implements a simple AVI writer. }
\cxxContentsEntry{20}{CAAMObject}{Abstract base object for the AAM-API. }
\cxxContentsEntry{21}{CAAMOptimize}{General purpose optimization of the AAM. }
\cxxContentsEntry{22}{CAAMReferenceFrame}{The geometrical reference frame (or shape-free frame). }
\cxxContentsEntry{23}{CAAMShape}{Shape container. }
\begin{cxxContents}
\cxxContentsEntry{23.1}{CAAMPointInfo}{Auxiliary point data. }
\end{cxxContents}
\cxxContentsEntry{24}{CAAMShapeCollection}{Shape collection container and shape-aligner. }
\cxxContentsEntry{25}{CAAMEvaluationResults}{Container to store evaluation results in. }
\cxxContentsEntry{26}{CAAMTest}{Container for all sorts of test functions. }
\cxxContentsEntry{27}{CAAMTransferFunction}{Abstract base class for all transfer functions. }
\cxxContentsEntry{28}{CAAMTFIdentity}{Transfer function that implements the identity transformation. }
\cxxContentsEntry{29}{CAAMTFLookUp}{Transfer function that implements a lookup table. }
\cxxContentsEntry{30}{CAAMTFUniformStretch}{Performs a uniform stretch into [0;255] on the demapping side. }
\cxxContentsEntry{31}{CAAMUtil}{Utility methods for the AAM project. }
\cxxContentsEntry{32}{CAAMPropsReader}{Simple lo-fi property reader. }
\cxxContentsEntry{33}{CAAMVisualizer}{Class that visualizes different aspects of a model. }
\cxxContentsEntry{34}{CAAMWarp}{Base class for 2D warp classes. }
\cxxContentsEntry{35}{CAAMWarpLinear}{Piece-wise affine warping between two shapes. }
\cxxContentsEntry{36}{AAMLoadAnalyzerSynthesizer}{Analyzer/Synthesizer loader. }
\cxxContentsEntry{37}{AAMLoadTransferFunction}{Transfer function loader. }
\cxxContentsEntry{38}{DIVAEnlargeImage}{Enlarge the image.  }
\cxxContentsEntry{39}{DIVAReduceImage}{Reduce the image. }
\cxxContentsEntry{}{Class Graph}{}\end{cxxContents}
\begin{cxxclass}
{class\ }
        {CAAMAnalyzeSynthesize}
        {}
        {Abstract base class for the analyze/synthesize classes. }
        {1}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry[x]{}{1}{CAAMAnalyzeSynthesize}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{3}{CAAMAnalyzeSynthesizeSoftware}{}
\cxxInheritanceEntry{\cxxLinkPubright}{2}{CAAMAnalyzeSynthesizeOpenGL}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads an object from disk. }
        {1.1}
\cxxitem{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Writes an object to disk. }
        {1.2}
\end{cxxpublic}
\begin{cxxdoc}


This class serves as an abstract base class for the 
analyze/synthesize classes so that both the 
software and�hardware implementation will have a common
interface.

To core task of such classes is to sample pixels inside
a shape placed on an image (the analyze part) and render
a texture vector into a shape given in image coordinates
(the synthesize part).

\end{cxxdoc}
\begin{cxxfunction}
{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads an object from disk. }
        {1.1}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Open file handle.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-13-2002
\strut}
\cxxSee{AAMLoadAnalyzerSynthesizer
\strut}
\begin{cxxdoc}


Reads an object form disk. Don't use this function 
directly. Use AAMLoadAnalyzerSynthesizer.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Writes an object to disk. }
        {1.2}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Open file handle.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-13-2002
\strut}
\cxxSee{AAMLoadAnalyzerSynthesizer
\strut}
\begin{cxxdoc}


Writes an object to disk. 


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMAnalyzeSynthesizeOpenGL}
        {:\ public\ CAAMAnalyzeSynthesize}
        {Hardware implementation of the analysis and synthesis functions. }
        {2}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-12-2002
\strut}
\cxxSee{CAAMAnalyzeSynthesize
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{1}{CAAMAnalyzeSynthesize}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{2}{CAAMAnalyzeSynthesizeOpenGL}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{}
        {CAAMAnalyzeSynthesizeOpenGL}
        {(\ const\ CAAMReferenceFrame\ \&rf\ )}
        {Constructor. }
        {2.1}
\cxxitem{}
        {\cxxtilde CAAMAnalyzeSynthesizeOpenGL}
        {()}
        {Destructor. }
        {2.2}
\cxxitem{bool}
        {Analyze}
        {(\ const\ CAAMShape\ \&shape,\ CDMultiBand\<TAAMPixel\>\ \&refImg,\ const\ bool\ useInterpolation\ )\ const\ }
        {Samples the texture under a given shape. }
        {2.3}
\cxxitem{bool}
        {Analyze}
        {(\ const\ CAAMShape\ \&shape,\ CDVector\ \&texture,\ const\ bool\ useInterpolation\ )\ const\ }
        {Samples the texture under a given shape. }
        {2.4}
\cxxitem{void}
        {SetupPBuffer}
        {(\ const\ int\ w,\ const\ int\ h,\ PBuffer**\ pPBuffer\ )}
        {Constructs a p-buffer and sets up various OpenGL stuff. }
        {2.5}
\cxxitem{void}
        {ClockReadPixels}
        {()}
        {Benchmarks the glReadPixels call. }
        {2.6}
\cxxitem{void}
        {ExtractChannel}
        {(\ const\ int\ pixelSize,\ const\ int\ channelNo,\ unsigned\ char*\ pPixels,\ CDMultiBand\<TAAMPixel\>\ \&dest\ )}
        {Extracts a channel (band) from an RGB/RGBA image. }
        {2.7}
\cxxitem{bool}
        {Synthesize}
        {(\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&texture,\ CDMultiBand\<TAAMPixel\>\ \&destImage,\ bool\ renderOntoImage\ )\ const\ }
        {Renders a texture vector into a shape. }
        {2.8}
\cxxitem{void}
        {LoadTexture}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&textureImage,\ unsigned\ int*\ pTextureId\ )}
        {Loads an image into the texture memory. }
        {2.9}
\cxxitem{void}
        {SetAnalyzeImage}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&img\ )}
        {Sets the image to be analyzed. }
        {2.10}
\cxxitem{CAAMAnalyzeSynthesize*}
        {Clone}
        {(\ const\ CAAMReferenceFrame\ \&rf\ )\ const\ }
        {Clones ifself (smart way to convey type info). }
        {2.11}
\cxxitem{bool}
        {EnsureSize}
        {(\ const\ int\ w,\ const\ int\ h,\ PBuffer**\ pPBuffer\ )}
        {Call this to ensure that the p-buffer is large enough. }
        {2.12}
\cxxitem{void}
        {SetImage}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&img,\ CDMultiBand\<TAAMPixel\>**\ destImage,\ unsigned\ int*\ pTextureId\ )}
        {Uploads an image to the GPU. }
        {2.13}
\end{cxxpublic}
\begin{cxxdoc}


This class utilises the presence of an OpenGL compliant graphics
board to carry out analysis and synthesis.

The board should supprot certain OpenGL extensions. However, this
requirement can easily be switched of inside the methods. Refer 
to the actual code to do this.

However, a reasonable new GPU will support the used extensions, 
e.g. a GeForce 2 MX will do. And to be honest, turning of the 
need for extentions can easily make the hardware warping *slower*
than the software warping. 

If the OpenGL drivers are really crappy it can actually be 
slower even without turning the extensions off. So remember to 
do some benchmarking on your system before permenantly switching
to OpenGL warping.


\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMAnalyzeSynthesizeOpenGL}
        {(\ const\ CAAMReferenceFrame\ \&rf\ )}
        {Constructor. }
        {2.1}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut rf} & The reference frame to analyze and synthesize through.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMAnalyzeSynthesizeOpenGL}
        {()}
        {Destructor. }
        {2.2}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Destructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {Analyze}
        {(\ const\ CAAMShape\ \&shape,\ CDMultiBand\<TAAMPixel\>\ \&refImg,\ const\ bool\ useInterpolation\ )\ const\ }
        {Samples the texture under a given shape. }
        {2.3}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut shape} & A shape in �mage coordinates.
\\
{\tt\strut refImg} & Output reference image.
\\
{\tt\strut useInterpolation} & If true bilinear interpolation is used (default).Otherwise the faster nearest neighbor interpolationis used.NOTE: This flag is actually ignored currently inthis OpenGL implementation.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & is the shape is inside the image.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\cxxSee{SetAnalyzeImage
\strut}
\begin{cxxdoc}


This method samples the image intensities under a user-
supplied shape into a texture vector.

The image is set using the SetAnalyzeImage call.

If a texture vector of the shape is needed instead 
call the alternative form of Analyze.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {Analyze}
        {(\ const\ CAAMShape\ \&shape,\ CDVector\ \&texture,\ const\ bool\ useInterpolation\ )\ const\ }
        {Samples the texture under a given shape. }
        {2.4}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut shape} & A shape in �mage coordinates.
\\
{\tt\strut texture} & Output texture vector.
\\
{\tt\strut useInterpolation} & If true bilinear interpolation is used (default).Otherwise the faster nearest neighbor interpolationis used.NOTE: This flag is actually ignored currently inthis OpenGL implementation.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & is the shape is inside the image.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\cxxSee{SetAnalyzeImage
\strut}
\begin{cxxdoc}


This method samples the image intensities under a user-
supplied shape into a texture vector.

The image is set using the SetAnalyzeImage call.

If a reference image of the shape is needed instead 
call the alternative form of Analyze.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetupPBuffer}
        {(\ const\ int\ w,\ const\ int\ h,\ PBuffer**\ pPBuffer\ )}
        {Constructs a p-buffer and sets up various OpenGL stuff. }
        {2.5}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut w} & P-buffer width.
\\
{\tt\strut h} & P-buffer height.
\\
{\tt\strut pPBuffer} & Pointer to a pointer of the newly created p-buffer.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


This method constructs a p-buffer and sets up various OpenGL stuff.
Credit goes to NVidea for the p-buffer code.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ClockReadPixels}
        {()}
        {Benchmarks the glReadPixels call. }
        {2.6}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-11-2002
\strut}
\begin{cxxdoc}


This function tries to find the fastest form of the 
glReadPixels(). This is typically *very* driver/card-specific.

Results are written to stdout.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ExtractChannel}
        {(\ const\ int\ pixelSize,\ const\ int\ channelNo,\ unsigned\ char*\ pPixels,\ CDMultiBand\<TAAMPixel\>\ \&dest\ )}
        {Extracts a channel (band) from an RGB/RGBA image. }
        {2.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut pixelSize} & The size of a pixel in bytes.
\\
{\tt\strut channelNo} & The channel to extract (zero is the first).
\\
{\tt\strut pPixels} & Pointer to a continuous pixel-array(i.e. *no* row-padding etc.) of a reference image.
\\
{\tt\strut dest} & Pre-allocated destination image.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-11-2002
\strut}
\begin{cxxdoc}


Extracts a channel (band) from an RGB/RGBA image.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {Synthesize}
        {(\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&texture,\ CDMultiBand\<TAAMPixel\>\ \&destImage,\ bool\ renderOntoImage\ )\ const\ }
        {Renders a texture vector into a shape. }
        {2.8}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut shape} & The shape to synthesize into.
\\
{\tt\strut texture} & The input texture vector in byte range [0;255].
\\
{\tt\strut destImage} & Destination image
\\
{\tt\strut renderOntoImage} & If true the synthesization is done on top of the existing image.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & on success.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


This method renders a texture vector into a shape 
defined in image coordinates.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {LoadTexture}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&textureImage,\ unsigned\ int*\ pTextureId\ )}
        {Loads an image into the texture memory. }
        {2.9}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut textureImage} & Image to upload to the GPU.
\\
{\tt\strut pTextureId} & Destination texture id.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Loads an image into the texture memory. Expensive call.



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetAnalyzeImage}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&img\ )}
        {Sets the image to be analyzed. }
        {2.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut img} & Image to be analyzed.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Sets the image to be analyzed. Recognize that this means that
the image must be uploaded to the GPU.

Hence, during multiple calls to Analyze on the same image *avoid*
calling SetAnalyze image every time!


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMAnalyzeSynthesize*}
        {Clone}
        {(\ const\ CAAMReferenceFrame\ \&rf\ )\ const\ }
        {Clones ifself (smart way to convey type info). }
        {2.11}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut rf} & The reference frame of the cloned object.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & cloned object created on the heap.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Clones ifself (smart way to convey type info).


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {EnsureSize}
        {(\ const\ int\ w,\ const\ int\ h,\ PBuffer**\ pPBuffer\ )}
        {Call this to ensure that the p-buffer is large enough. }
        {2.12}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut w} & Desired minimum p-buffer width.
\\
{\tt\strut h} & Desired minimum p-buffer height.
\\
{\tt\strut pPBuffer} & Pointer to a p-buffer pointer.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & the the size of 'pPBuffer' has changed.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-4-2002
\strut}
\begin{cxxdoc}


The method ensures that the p-buffer is large enough to hold 
and image of w * h.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetImage}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&img,\ CDMultiBand\<TAAMPixel\>**\ destImage,\ unsigned\ int*\ pTextureId\ )}
        {Uploads an image to the GPU. }
        {2.13}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut img} & Input image.
\\
{\tt\strut destImage} & Pointer to an image pointer of the image actually being uploaded.
\\
{\tt\strut pTextureId} & Input texture id.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-4-2002
\strut}
\cxxSee{SetAnalyzeImage
\strut}
\begin{cxxdoc}


Uploads an image to the GPU. Don't call this directly. 

This method is called by SetAnalyzeImage.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMAnalyzeSynthesizeSoftware}
        {:\ public\ CAAMAnalyzeSynthesize}
        {Software implementation of the analysis and synthesis functions. }
        {3}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-12-2002
\strut}
\cxxSee{CAAMAnalyzeSynthesize
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{1}{CAAMAnalyzeSynthesize}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{3}{CAAMAnalyzeSynthesizeSoftware}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{}
        {CAAMAnalyzeSynthesizeSoftware}
        {(\ const\ CAAMReferenceFrame\ \&rf\ )}
        {Constructor. }
        {3.1}
\cxxitem{}
        {\cxxtilde CAAMAnalyzeSynthesizeSoftware}
        {()}
        {Destructor. }
        {3.2}
\cxxitem{void}
        {BuildWarpTable}
        {()}
        {Cache method, that caches triangle info. }
        {3.3}
\cxxitem{void}
        {SetAnalyzeImage}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&img\ )}
        {Sets the image to be analyzed. }
        {3.4}
\cxxitem{bool}
        {Analyze}
        {(\ const\ CAAMShape\ \&shape,\ CDVector\ \&texture,\ const\ bool\ useInterpolation\ )\ const\ }
        {Samples the texture under a given shape. }
        {3.5}
\cxxitem{bool}
        {Analyze}
        {(\ const\ CAAMShape\ \&shape,\ CDMultiBand\<TAAMPixel\>\ \&refImg,\ const\ bool\ useInterpolation\ )\ const\ }
        {Samples the texture under a given shape. }
        {3.6}
\cxxitem{bool}
        {Synthesize}
        {(\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&texture,\ CDMultiBand\<TAAMPixel\>\ \&destImage,\ bool\ renderOntoImage\ )\ const\ }
        {Renders a texture vector into a shape. }
        {3.7}
\cxxitem{CAAMAnalyzeSynthesize*}
        {Clone}
        {(\ const\ CAAMReferenceFrame\ \&rf\ )\ const\ }
        {Clones ifself (smart way to convey type info). }
        {3.8}
\end{cxxpublic}
\begin{cxxdoc}


This class contains a fairly fast software implementation of 
the analyze/synthesize interface.


\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMAnalyzeSynthesizeSoftware}
        {(\ const\ CAAMReferenceFrame\ \&rf\ )}
        {Constructor. }
        {3.1}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut rf} & The reference frame to analyze and synthesize through.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-12-2002
\strut}
\begin{cxxdoc}


Constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMAnalyzeSynthesizeSoftware}
        {()}
        {Destructor. }
        {3.2}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-12-2002
\strut}
\begin{cxxdoc}


Destructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {BuildWarpTable}
        {()}
        {Cache method, that caches triangle info. }
        {3.3}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-12-2002
\strut}
\begin{cxxdoc}


This method cache triangle information that does not change.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetAnalyzeImage}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&img\ )}
        {Sets the image to be analyzed. }
        {3.4}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut img} & Image to be analyzed.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-12-2002
\strut}
\begin{cxxdoc}


Sets the image to be analyzed. That reason for this, at first sight,
somewhat clumpsy design is due to the OpenGL implementation.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {Analyze}
        {(\ const\ CAAMShape\ \&shape,\ CDVector\ \&texture,\ const\ bool\ useInterpolation\ )\ const\ }
        {Samples the texture under a given shape. }
        {3.5}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut shape} & A shape in �mage coordinates.
\\
{\tt\strut texture} & Output texture vector.
\\
{\tt\strut useInterpolation} & If true bilinear interpolation is used (default).Otherwise the faster nearest neighbor interpolationis used.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & is the shape is inside the image.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-12-2002
\strut}
\cxxSee{SetAnalyzeImage
\strut}
\begin{cxxdoc}


This method samples the image intensities under a user-
supplied shape into a texture vector.

The image is set using the SetAnalyzeImage call.

If a reference image of the shape is needed instead 
call the alternative form of Analyze.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {Analyze}
        {(\ const\ CAAMShape\ \&shape,\ CDMultiBand\<TAAMPixel\>\ \&refImg,\ const\ bool\ useInterpolation\ )\ const\ }
        {Samples the texture under a given shape. }
        {3.6}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut shape} & A shape in �mage coordinates.
\\
{\tt\strut refImg} & Output reference image.
\\
{\tt\strut useInterpolation} & If true bilinear interpolation is used (default).Otherwise the faster nearest neighbor interpolationis used.NOTE: This flag is actually ignored currently inthis OpenGL implementation.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & is the shape is inside the image.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-12-2002
\strut}
\cxxSee{SetAnalyzeImage
\strut}
\begin{cxxdoc}


This method samples the image intensities under a user-
supplied shape into a texture vector.

The image is set using the SetAnalyzeImage call.

If a texture vector of the shape is needed instead 
call the alternative form of Analyze.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {Synthesize}
        {(\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&texture,\ CDMultiBand\<TAAMPixel\>\ \&destImage,\ bool\ renderOntoImage\ )\ const\ }
        {Renders a texture vector into a shape. }
        {3.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut shape} & The shape to synthesize into.
\\
{\tt\strut texture} & The input texture vector in byte range [0;255].
\\
{\tt\strut destImage} & Destination image
\\
{\tt\strut renderOntoImage} & If true the synthesization is done on top of the existing image.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & on success.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-12-2002
\strut}
\begin{cxxdoc}


This method renders a texture vector into a shape 
defined in image coordinates.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMAnalyzeSynthesize*}
        {Clone}
        {(\ const\ CAAMReferenceFrame\ \&rf\ )\ const\ }
        {Clones ifself (smart way to convey type info). }
        {3.8}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut rf} & The reference frame of the cloned object.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & cloned object created on the heap.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Clones ifself (smart way to convey type info).


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMBuilder}
        {:\ public\ CAAMObject}
        {Factory object that produces CAAMModel objects. }
        {4}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-26-2000
\strut}
\cxxSee{CAAMModel
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{4}{CAAMBuilder}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{void}
        {BuildFromFiles}
        {(\ CAAMModel\ \&model,\ const\ CString\ \&inDir,\ const\ CString\ \&acf,\ const\ int\ modelReduction,\ const\ int\ excludeShape\ )}
        {Diver method for model generation. }
        {4.5}
\cxxitem{void}
        {BuildFromFiles}
        {(\ CAAMModel\ \&model,\ const\ std::vector\<CString\>\ \&asfFiles,\ const\ CString\ \&acf,\ const\ int\ modelReduction,\ const\ int\ excludeShape\ )}
        {Diver method for model generation. }
        {4.6}
\cxxitem{bool}
        {LoadShapes}
        {(\ const\ std::vector\<CString\>\ \&asfFiles,\ CAAMShapeCollection\ \&destination,\ int\ modelReduction,\ bool\ addCompleteImage,\ double\ addExtents,\ int\ excludeShape\ )}
        {Loads (and preprocess) all training shapes. }
        {4.7}
\cxxitem{void}
        {MapTextures}
        {()}
        {Performs a mapping of all textures in 'm\_vTexture'. }
        {4.8}
\cxxitem{void}
        {DumpModelDoc}
        {(\ std::vector\<CDVector\>\ bVectors\ )}
        {Write additional documentation output. }
        {4.9}
\cxxitem{void}
        {EstRegressionMatrices}
        {(\ const\ std::vector\<CDVector\>\ \&bVectors,\ const\ int\ ts\_subsampling\ )}
        {Build the regression matrices for pose and parameter prediction. }
        {4.10}
\cxxitem{void}
        {DoPoseExperiments}
        {(\ const\ std::vector\<CDVector\>\ \&vPoseDisps,\ const\ std::vector\<CDVector\>\ \&cVectors,\ CDMatrix\ \&X,\ CDMatrix\ \&C,\ const\ int\ ts\_subsampling\ )\ const\ }
        {Performs a set of pose parameter displacement experiments. }
        {4.11}
\cxxitem{void}
        {DoCParamExperiments}
        {(\ const\ std::vector\<CDVector\>\ \&vCDisps,\ const\ std::vector\<CDVector\>\ \&cVectors,\ CDMatrix\ \&X,\ CDMatrix\ \&C,\ const\ int\ ts\_subsampling\ )\ const\ }
        {Performs a set of model parameter displacement experiments. }
        {4.12}
\cxxitem{void}
        {DisplacementSets}
        {(\ std::vector\<CDVector\>\ \&vCDisps,\ std::vector\<CDVector\>\ \&vPoseDisps,\ const\ std::vector\<CDVector\>\ \&cVectors\ )\ const\ }
        {Generates model parameter and pose displacement sets. }
        {4.13}
\cxxitem{std::vector\<CDVector\>\ }
        {CParamDispVectors}
        {(\ const\ CDVector\ \&vStdDisp,\ const\ std::vector\<CDVector\>\ \&cVectors,\ const\ int\ pStart,\ const\ int\ pLen\ )\ const\ }
        {Generates a set combined model parameter displacement vectors. }
        {4.14}
\cxxitem{std::vector\<CDVector\>\ }
        {PoseDispVectors}
        {(\ const\ CDVector\ \&vXDisp,\ const\ CDVector\ \&vYDisp,\ const\ CDVector\ \&vScaleDisp,\ const\ CDVector\ \&vRotDisp\ )\ const\ }
        {Generates a set pose displacement vectors. }
        {4.15}
\cxxitem{void}
        {BuildTextureVectors}
        {()}
        {Samples all shapes in the training set and build the corresponding texture vectores. }
        {4.16}
\cxxitem{}
        {CAAMBuilder}
        {()}
        {Constructor. }
        {4.17}
\cxxitem{}
        {\cxxtilde CAAMBuilder}
        {()}
        {Destructor. }
        {4.18}
\cxxitem{void}
        {CalcPixel2ShapeWeights}
        {()}
        {Calculates the pixel-to-shape weights. }
        {4.19}
\cxxitem{void}
        {PoseDisplacement}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&c0,\ const\ CDVector\ \&t,\ CDVector\ \&pixel\_diff\ )\ const\ }
        {Performs one pose regression experiment. }
        {4.20}
\cxxitem{void}
        {ModelDisplacement}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&c0,\ const\ CDVector\ \&delta\_c,\ CDVector\ \&pixel\_diff\ )\ const\ }
        {Performs one model parameter regression experiment. }
        {4.21}
\cxxitem{void}
        {DoShapeAlignment}
        {(\ const\ bool\ fUseTangentSpace\ )}
        {Aligns shapes and calc mean- and reference-shape. }
        {4.22}
\cxxitem{void}
        {DumpPCA}
        {(\ const\ std::vector\<CDVector\>\ \&bVectors\ )}
        {Dumps the PC scores of the shape, texture and combined PCA. }
        {4.23}
\cxxitem{void}
        {NormalizeTextureVectors}
        {()}
        {Iterative normalization of the texture samples. }
        {4.24}
\cxxitem{bool}
        {ReadACF}
        {(\ const\ CString\ \&filename\ )}
        {Reads and parses an ACF file. }
        {4.25}
\cxxitem{void}
        {RecalcMeanTexture}
        {(\ )}
        {Recalculates the mean texture vector 'm\_vMeanTexture'.       }
        {4.26}
\cxxitem{std::vector\<CDVector\>\ }
        {DoCombinedPCA}
        {()}
        {Performs PCA on shape and texture data. }
        {4.27}
\cxxitem{void}
        {EstPredictionMatrices}
        {(\ const\ std::vector\<CDVector\>\ \&bVectors,\ const\ int\ ts\_subsampling\ )}
        {Build the prediction matrices for pose and parameter prediction. }
        {4.28}
\cxxitem{void}
        {EstPoseGradientMatrix}
        {(\ const\ std::vector\<CDVector\>\ \&vPoseDisps,\ const\ std::vector\<CDVector\>\ \&cVectors,\ CDMatrix\ \&Gpose,\ const\ int\ ts\_subsampling\ )\ const\ }
        {Estimates the Jacobian of the pose parameters. }
        {4.29}
\cxxitem{void}
        {EstCParamGradientMatrix}
        {(\ const\ std::vector\<CDVector\>\ \&vCDisps,\ const\ std::vector\<CDVector\>\ \&cVectors,\ CDMatrix\ \&Gparam,\ const\ int\ ts\_subsampling)\ const\ }
        {Estimates the Jacobian of the model parameters. }
        {4.30}
\end{cxxpublic}
\begin{cxxprotected}
\cxxitem{CAAMShapeCollection}
        {m\_Shapes}
        {}
        {The raw (unaligned) shapes}
        {4.1}
\cxxitem{CAAMShapeCollection}
        {m\_AlignedShapes}
        {}
        {The aligned shapes}
        {4.2}
\cxxitem{std::vector\<CDVector\>\ }
        {m\_vTexture}
        {}
        {The texture samples}
        {4.3}
\cxxitem{CAAMModel*}
        {m\_pModel}
        {}
        {Pointer to the model we're building}
        {4.4}
\end{cxxprotected}
\begin{cxxdoc}


Factory object that produces CAAMModel objects.
Main tasks are the estimation of parameter update matrices
and verbose dumping of model information. Most other tasks are
simple calls into CAAMModel, CAAMShape etc.


\end{cxxdoc}
\begin{cxxfunction}
{void}
        {BuildFromFiles}
        {(\ CAAMModel\ \&model,\ const\ CString\ \&inDir,\ const\ CString\ \&acf,\ const\ int\ modelReduction,\ const\ int\ excludeShape\ )}
        {Diver method for model generation. }
        {4.5}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut model} & The generated model.
\\
{\tt\strut inDir} & Input directory where annotations (.asf) resides.
\\
{\tt\strut acf} & Filename of an AAM configuration file. If omitted defaults are used.
\\
{\tt\strut modelReduction} & Model reduction multiplier. Default off == 1.                            Useful when building multi-scale AAMs.
\\
{\tt\strut excludeShape} & Excludes one shape number 'excludeShape'from the input directory. Default -1, i.e.no shapes are removed.Used to perform leave-one-out testing.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-14-2000
\strut}
\begin{cxxdoc}


This method automates the model generation as much as possible
by using the various class methods for all the sequences in the
task of producing a model.           


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {BuildFromFiles}
        {(\ CAAMModel\ \&model,\ const\ std::vector\<CString\>\ \&asfFiles,\ const\ CString\ \&acf,\ const\ int\ modelReduction,\ const\ int\ excludeShape\ )}
        {Diver method for model generation. }
        {4.6}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut model} & The generated model.
\\
{\tt\strut asfFiles} & Vector of asf filenames.
\\
{\tt\strut acf} & Filename of an AAM configuration file. If omitted defaults are used.
\\
{\tt\strut modelReduction} & Model reduction multiplier. Default off == 1.                            Useful when building multi-scale AAMs.
\\
{\tt\strut excludeShape} & Excludes one shape number 'excludeShape'from the input directory. Default -1, i.e.no shapes are removed.Used to perform leave-one-out testing.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-14-2000
\strut}
\begin{cxxdoc}


This method automates the model generation as much as possible
by using the various class methods for all the sequences in the
task of producing a model.           


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {LoadShapes}
        {(\ const\ std::vector\<CString\>\ \&asfFiles,\ CAAMShapeCollection\ \&destination,\ int\ modelReduction,\ bool\ addCompleteImage,\ double\ addExtents,\ int\ excludeShape\ )}
        {Loads (and preprocess) all training shapes. }
        {4.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut asfFiles} & An array of asf filenames.
\\
{\tt\strut destination} & Output shape collection.
\\
{\tt\strut modelReduction} & Optional size reduction. Default 1, i.e. no reduction.
\\
{\tt\strut addCompleteImage} & Set this to true if you (for wird reasons) would likeadd the corners of the image to the shape. Default false.
\\
{\tt\strut addExtents} & Simple and somewhat hacked way to add a shape neighborhood(will be removed in later versions).
\\
{\tt\strut excludeShape} & If != -1 the the 'excludeShape'-th shape will be excluded.Zero is the first shape. Used for leave-one-out evaluation.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-4-2002
\strut}
\begin{cxxdoc}


Loads (and preprocess) all training shapes into a CAAMShapeCollection.
This could as well be placed in CAAMUtil actually.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {MapTextures}
        {()}
        {Performs a mapping of all textures in 'm\_vTexture'. }
        {4.8}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-28-2002
\strut}
\begin{cxxdoc}


Performs a mapping of all textures in 'm\_vTexture' using
the texture transfer class of the model.      


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {DumpModelDoc}
        {(\ std::vector\<CDVector\>\ bVectors\ )}
        {Write additional documentation output. }
        {4.9}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut bVectors} & Concatenated and weighted shape and texture vectorsover the training set.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-28-2002
\strut}
\begin{cxxdoc}


Write additional documentation output.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {EstRegressionMatrices}
        {(\ const\ std::vector\<CDVector\>\ \&bVectors,\ const\ int\ ts\_subsampling\ )}
        {Build the regression matrices for pose and parameter prediction. }
        {4.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut bVectors} & The b-vectors for the training set the current AAM is built upon.[Can be optained from the DoCombinedPCA() call]    
\\
{\tt\strut ts\_subsampling} & Controls the sub sampling of the training set - i.e. to use every fifth shape to build the regression matrices upon, setshape\_subsampling = 5;The motivation for doing this is reduction of model building time -- and perhaps most importantly -- conservation of memory resources.                        
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-14-2000
\strut}
\begin{cxxdoc}


Build the regression matrices for pose and parameter prediction.
I.e. calculates the member variables 'regR\_c', 'regR\_t'.
using principal component regression.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {DoPoseExperiments}
        {(\ const\ std::vector\<CDVector\>\ \&vPoseDisps,\ const\ std::vector\<CDVector\>\ \&cVectors,\ CDMatrix\ \&X,\ CDMatrix\ \&C,\ const\ int\ ts\_subsampling\ )\ const\ }
        {Performs a set of pose parameter displacement experiments. }
        {4.11}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vPoseDisps} & A vector of displacement vectors as obtained fromPoseDispVectors() or DisplacementSets().
\\
{\tt\strut cVectors} & The set of optimum c vectors for the training examples.
\\
{\tt\strut X} & Output matrix containing the texture difference vectorsobtained from the displacements.
\\
{\tt\strut Y} & Output matrix containing the model parameter displacementscarried out.
\\
{\tt\strut ts\_subsamplingSubsampling} & factor, i.e. ts\_subsampling==n will carry outdisplacements on every n-th example in the training set.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-13-2002
\strut}
\cxxSee{DoPoseExperiments
\strut}
\begin{cxxdoc}


Performs a set of pose parameter displacement experiments on the
training set given a set of displacment vectors.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {DoCParamExperiments}
        {(\ const\ std::vector\<CDVector\>\ \&vCDisps,\ const\ std::vector\<CDVector\>\ \&cVectors,\ CDMatrix\ \&X,\ CDMatrix\ \&C,\ const\ int\ ts\_subsampling\ )\ const\ }
        {Performs a set of model parameter displacement experiments. }
        {4.12}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vCDisps} & A vector of displacement vectors as obtained fromCParamDispVectors() or DisplacementSets().
\\
{\tt\strut cVectors} & The set of optimum c vectors for the training examples.
\\
{\tt\strut X} & Output matrix containing the texture difference vectorsobtained from the displacements.
\\
{\tt\strut Y} & Output matrix containing the model parameter displacementscarried out.
\\
{\tt\strut ts\_subsamplingSubsampling} & factor, i.e. ts\_subsampling==n will carry outdisplacements on every n-th example in the training set.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-13-2002
\strut}
\cxxSee{DoPoseExperiments
\strut}
\begin{cxxdoc}


Performs a set of model parameter displacement experiments on the
training set given a set of displacment vectors.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {DisplacementSets}
        {(\ std::vector\<CDVector\>\ \&vCDisps,\ std::vector\<CDVector\>\ \&vPoseDisps,\ const\ std::vector\<CDVector\>\ \&cVectors\ )\ const\ }
        {Generates model parameter and pose displacement sets. }
        {4.13}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vCDisps} & Resulting model parameter displacement set.
\\
{\tt\strut vPoseDisps} & Resulting pose parameter displacement set.
\\
{\tt\strut cVectors} & The set of c vectors over the training set.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-14-2000
\strut}
\cxxSee{CParamDispVectors,\ PoseDispVectors
\strut}
\begin{cxxdoc}


Generates model parameter and pose displacement sets.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{std::vector\<CDVector\>\ }
        {CParamDispVectors}
        {(\ const\ CDVector\ \&vStdDisp,\ const\ std::vector\<CDVector\>\ \&cVectors,\ const\ int\ pStart,\ const\ int\ pLen\ )\ const\ }
        {Generates a set combined model parameter displacement vectors. }
        {4.14}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vStdDisp} & A vector of parameter displacements in standard deviations of the correspondingparameter.        
\\
{\tt\strut cVectors} & The set of c vectors over the training set.
\\
{\tt\strut pStart} & The first parameter to displace.(default 0).
\\
{\tt\strut pLen} & The number of parameters to displace.(default 0, which means all parameters).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & vector of displacement vectors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-14-2000
\strut}
\cxxSee{CParamDispVectors
\strut}
\begin{cxxdoc}


Generates a set combined model parameter displacement vectors
where each parameter is displaced at a time according to the 
values in vStdDisp.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{std::vector\<CDVector\>\ }
        {PoseDispVectors}
        {(\ const\ CDVector\ \&vXDisp,\ const\ CDVector\ \&vYDisp,\ const\ CDVector\ \&vScaleDisp,\ const\ CDVector\ \&vRotDisp\ )\ const\ }
        {Generates a set pose displacement vectors. }
        {4.15}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vXDisp} & A vector of x displacements in pixels.
\\
{\tt\strut vYDisp} & A vector of y displacements in pixels.
\\
{\tt\strut vScaleDisp} & A vector of scale displacements (1.0=no scaling).
\\
{\tt\strut vRotDisp} & A vector of rotation displacements in degrees.   
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & vector of displacement vectors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-14-2000
\strut}
\cxxSee{CParamDispVectors
\strut}
\begin{cxxdoc}


Generates a set pose displacement vectors.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {BuildTextureVectors}
        {()}
        {Samples all shapes in the training set and build the corresponding texture vectores. }
        {4.16}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-21-2000
\strut}
\begin{cxxdoc}


Initializes the private member: 'm\_vTexture' by sampling all shapes
using a warp function.
Note that this method calculates the mean texture.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMBuilder}
        {()}
        {Constructor. }
        {4.17}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-26-2000
\strut}
\begin{cxxdoc}


Constructor. Sets up default values for the settings usally
given by an acf file.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMBuilder}
        {()}
        {Destructor. }
        {4.18}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-26-2000
\strut}
\begin{cxxdoc}


Destructor.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {CalcPixel2ShapeWeights}
        {()}
        {Calculates the pixel-to-shape weights. }
        {4.19}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-6-2000
\strut}
\begin{cxxdoc}


Calculates the pixel-to-shape weights used in the combined PCA.
Currently the simple 'split even' strategy is employed, i.e.
normalise shape and texture variance to be equal.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {PoseDisplacement}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&c0,\ const\ CDVector\ \&t,\ CDVector\ \&pixel\_diff\ )\ const\ }
        {Performs one pose regression experiment. }
        {4.20}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & The image corresponding to the equibrilium shape.
\\
{\tt\strut shape} & The equibrilium shape.
\\
{\tt\strut c0} & The equibrilium model parameters.
\\
{\tt\strut t} & The pose displacement parameters.
\\
{\tt\strut pixel\_diff} & The normalized pixel differences resulting from the pose displacement.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-14-2000
\strut}
\cxxSee{ModelDisplacement
\strut}
\begin{cxxdoc}


Performs one pose regression experiment.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ModelDisplacement}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&c0,\ const\ CDVector\ \&delta\_c,\ CDVector\ \&pixel\_diff\ )\ const\ }
        {Performs one model parameter regression experiment. }
        {4.21}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & The image corresponding to the equibrilium shape.
\\
{\tt\strut shape} & The equibrilium shape.
\\
{\tt\strut c0} & The equibrilium model parameters.
\\
{\tt\strut delta\_c} & The model parameter displacements.
\\
{\tt\strut pixel\_diff} & The normalized pixel differences resulting from the pose displacement.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-14-2000
\strut}
\cxxSee{PoseDisplacement
\strut}
\begin{cxxdoc}


Performs one model parameter regression experiment.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {DoShapeAlignment}
        {(\ const\ bool\ fUseTangentSpace\ )}
        {Aligns shapes and calc mean- and reference-shape. }
        {4.22}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fUseTangentSpace} & Use the tangent space projection (bool).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Noting.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-24-2000
\strut}
\begin{cxxdoc}


Alignes shapes and calc mean- and reference-shape.
I.e. initializes 'm\_AlignedShapes', 'm\_sMeanAShape' and
'm\_sReferenceShape'.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {DumpPCA}
        {(\ const\ std::vector\<CDVector\>\ \&bVectors\ )}
        {Dumps the PC scores of the shape, texture and combined PCA. }
        {4.23}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-17-2000
\strut}
\begin{cxxdoc}


Dumps the PC scores of the shape, texture and combined PCA.
These are written to the current directory in Matlab format
as shape\_pc.m, texture\_pc.m and combined\_pc, respectively.

param		bVectors	The b-parameters for all training examples. 
As obtained from DoCombinedPCA().


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {NormalizeTextureVectors}
        {()}
        {Iterative normalization of the texture samples. }
        {4.24}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-22-2000
\strut}
\begin{cxxdoc}


Performs normalization of the texture vectors as described 
by Cootes et al. in "Active Appearance Models" sec. 2.
Recalculates the mean texture.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ReadACF}
        {(\ const\ CString\ \&filename\ )}
        {Reads and parses an ACF file. }
        {4.25}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & The acf file to open.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on file errors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-17-2000
\strut}
\begin{cxxdoc}


Reads and parses an ACF file. In this way the AAM can be 
configured using different setting for model generation.
Note that all parsing is very primitive and in no way 
robust :-( So be careful about the configuration files.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {RecalcMeanTexture}
        {(\ )}
        {Recalculates the mean texture vector 'm\_vMeanTexture'.       }
        {4.26}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-22-2000
\strut}
\begin{cxxdoc}


Recalculates the mean texture vector 'm\_vMeanTexture'.      


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{std::vector\<CDVector\>\ }
        {DoCombinedPCA}
        {()}
        {Performs PCA on shape and texture data. }
        {4.27}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & b-parameters for all training examples. The format isa vector of b-parameter vectors. This vector is used in theBuildRegressionMatrices() call.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-23-2000
\strut}
\begin{cxxdoc}


Performs principal component analysis on the shape and the
texture data.
Uses the Eckhart-Young theorem described in appendix A of
"Statistical Models of Appearance of Computer Vision" by
T.F. Cootes et al. if we have fewer samples than dimensions
which is typically the case.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {EstPredictionMatrices}
        {(\ const\ std::vector\<CDVector\>\ \&bVectors,\ const\ int\ ts\_subsampling\ )}
        {Build the prediction matrices for pose and parameter prediction. }
        {4.28}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut bVectors} & The b-vectors for the training set the current AAM is built upon.[Can be optained from the DoCombinedPCA() call]    
\\
{\tt\strut ts\_subsampling} & Controls the sub sampling of the training set - i.e. to use every fifth shape to build the regression matrices upon, setshape\_subsampling = 5;The motivation for doing this is reduction of model building time.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-18-2002
\strut}
\begin{cxxdoc}


Build the prediction matrices for pose and parameter prediction.
I.e. calculates the member variables 'regR\_c', 'regR\_t'.
using estimates of the gradient matrices.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {EstPoseGradientMatrix}
        {(\ const\ std::vector\<CDVector\>\ \&vPoseDisps,\ const\ std::vector\<CDVector\>\ \&cVectors,\ CDMatrix\ \&Gpose,\ const\ int\ ts\_subsampling\ )\ const\ }
        {Estimates the Jacobian of the pose parameters. }
        {4.29}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vPoseDisps} & A vector of displacement vectors as obtained fromPoseDispVectors() or DisplacementSets().
\\
{\tt\strut cVectors} & The set of optimum c vectors for the training examples.
\\
{\tt\strut Gpose} & The output Jacobian matrix (or gradient matrix if you like).
\\
{\tt\strut ts\_subsamplingSubsampling} & factor, i.e. ts\_subsampling==n will carry outdisplacements on every n-th example in the training set.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-18-2002
\strut}
\cxxSee{EstCParamGradientMatrix
\strut}
\begin{cxxdoc}


Estimates the Jacobian of the pose parameters given a set
of displacement vectors and the optimum model parameters for
the training set.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {EstCParamGradientMatrix}
        {(\ const\ std::vector\<CDVector\>\ \&vCDisps,\ const\ std::vector\<CDVector\>\ \&cVectors,\ CDMatrix\ \&Gparam,\ const\ int\ ts\_subsampling)\ const\ }
        {Estimates the Jacobian of the model parameters. }
        {4.30}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vCDisps} & A vector of displacement vectors as obtained fromCParamDispVectors() or DisplacementSets().
\\
{\tt\strut cVectors} & The set of optimum c vectors for the training examples.
\\
{\tt\strut Gparam} & The output Jacobian matrix (or gradient matrix if you like).
\\
{\tt\strut ts\_subsamplingSubsampling} & factor, i.e. ts\_subsampling==n will carry outdisplacements on every n-th example in the training set.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-18-2002
\strut}
\cxxSee{EstPoseGradientMatrix
\strut}
\begin{cxxdoc}


Estimates the Jacobian of the model parameters given a set
of displacement vectors and the optimum model parameters for
the training set.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxvariable}
{CAAMShapeCollection}
        {m\_Shapes}
        {}
        {The raw (unaligned) shapes}
        {4.1}
\begin{cxxdoc}
The raw (unaligned) shapes
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CAAMShapeCollection}
        {m\_AlignedShapes}
        {}
        {The aligned shapes}
        {4.2}
\begin{cxxdoc}
The aligned shapes
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{std::vector\<CDVector\>\ }
        {m\_vTexture}
        {}
        {The texture samples}
        {4.3}
\begin{cxxdoc}
The texture samples
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CAAMModel*}
        {m\_pModel}
        {}
        {Pointer to the model we're building}
        {4.4}
\begin{cxxdoc}
Pointer to the model we're building
\end{cxxdoc}
\end{cxxvariable}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMDeform}
        {:\ public\ CAAMObject}
        {Abstract deformation basis. }
        {5}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-17-2000
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{5}{CAAMDeform}{}
\cxxInheritanceEntry{\cxxNone\cxxLinkPubright}{6}{CAAMDeformPCA}{}
\end{cxxInheritance}
\begin{cxxprotected}
\cxxitem{bool}
        {m\_bValid}
        {}
        {Flags that signals everything has been setup correctly}
        {5.1}
\end{cxxprotected}
\begin{cxxdoc}


Abstract deformation basis.

\end{cxxdoc}
\begin{cxxvariable}
{bool}
        {m\_bValid}
        {}
        {Flags that signals everything has been setup correctly}
        {5.1}
\begin{cxxdoc}
Flags that signals everything has been setup correctly
\end{cxxdoc}
\end{cxxvariable}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMDeformPCA}
        {:\ public\ CAAMDeform}
        {Performs Principal Component Analysis on a set of data vectors. }
        {6}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-17-2000
\strut}
\cxxSee{CAAMDeform
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft\cxxNone}
\cxxInheritanceEntry{\cxxNone}{5}{CAAMDeform}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone\cxxNone}{6}{CAAMDeformPCA}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{inline\ \ \ CDVector\&}
        {EigenValues}
        {()}
        {Returns the eigen values in vector form}
        {6.1}
\cxxitem{inline\ \ \ const\ CDVector\&}
        {EigenValues}
        {()\ const\ }
        {Returns the eigen values in const vector form}
        {6.2}
\cxxitem{inline\ \ \ const\ CDVector\&}
        {EigenValuesOrg}
        {()\ const\ }
        {Returns the orignal eigen values in const vector form}
        {6.3}
\cxxitem{inline\ \ \ CDMatrix\&}
        {EigenVectors}
        {()}
        {Returns the eigen vectors in matrix form}
        {6.4}
\cxxitem{inline\ \ \ const\ CDMatrix\&}
        {EigenVectors}
        {()\ const\ }
        {Returns the eigen vectors in const matrix form}
        {6.5}
\cxxitem{inline\ \ \ int}
        {NParameters}
        {()\ const\ }
        {Returns the number of princal parameters}
        {6.6}
\cxxitem{inline\ \ \ int}
        {NParametersOrg}
        {()\ const\ }
        {Returns the number of princal parameters before any truncation}
        {6.7}
\cxxitem{void}
        {ClearDataItems}
        {()}
        {Deletes the data matrix}
        {6.8}
\cxxitem{const\ int}
        {NDataItems}
        {()\ const\ }
        {Returns the number of data items this basis is based on}
        {6.9}
\cxxitem{double}
        {ParameterWeight}
        {(\ const\ int\ i,\ bool\ asPercentage\ )\ const\ }
        {Returns the eigenvalue of the i-th parameter. }
        {6.10}
\cxxitem{double}
        {ParameterWeightOrg}
        {(\ const\ int\ i,\ bool\ asPercentage\ )\ const\ }
        {Returns the eigenvalue of the i-th parameter. }
        {6.11}
\cxxitem{void}
        {InsertDataItem}
        {(\ const\ CDVector\ \&v\ )}
        {Inserts a data vector. }
        {6.12}
\cxxitem{void}
        {UseIdentityTransformation}
        {()}
        {Makes the object use an identity basis instead of PCA basis. }
        {6.13}
\cxxitem{void}
        {DoPCA}
        {(\ bool\ bWriteCoVarMarix\ )}
        {Performs the principal component analysis. }
        {6.14}
\cxxitem{const\ CDVector\&}
        {MeanDataItem}
        {()\ const\ }
        {Returns the sample mean. }
        {6.15}
\cxxitem{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Writes a PCA object to file. }
        {6.16}
\cxxitem{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads a PCA object from file. }
        {6.17}
\cxxitem{void}
        {Dump}
        {(\ const\ char*\ szPath\ )\ const\ }
        {Writes eigen vectors and eigen values to matlab text files:  pca\_eigenvectors.m pca\_eigenvalues.m pca\_eigenvalues\_org.m }
        {6.18}
\cxxitem{void}
        {Deform}
        {(\ const\ CDVector\ \&params,\ CDVector\ \&object\ )\ const\ }
        {Projects a set of PC scores to the original space. }
        {6.19}
\cxxitem{double}
        {MahalanobisDistance}
        {(\ const\ CDVector\ \&params\ )\ const\ }
        {Returns the Mahalanobis distance of a set of PCA parameters. }
        {6.20}
\cxxitem{void}
        {ShuffleData}
        {()}
        {Shuffle each dimension in all data items. }
        {6.21}
\cxxitem{int}
        {TruncateParallel}
        {()}
        {Truncate eigenvectors and eigenvalues using parallel analysis. }
        {6.22}
\cxxitem{int}
        {TruncateVar}
        {(\ const\ double\ retained\_variance\ )}
        {Truncate eigenvectors and eigenvalues to retain 'retained\_variance'.  }
        {6.23}
\cxxitem{int}
        {CalcNParam}
        {(\ const\ double\ retained\_variance\ )\ const\ }
        {Calulates the needed number of parameters. }
        {6.24}
\cxxitem{void}
        {Project}
        {(\ const\ CDVector\ \&obs,\ CDVector\ \&param\ )\ const\ }
        {Projects an observation into the PCA space. }
        {6.25}
\cxxitem{void}
        {BackProject}
        {(\ const\ CDVector\ \&param,\ CDVector\ \&synth\_obs\ )\ const\ }
        {Back projects a set of PCA model parameters into the original space. }
        {6.26}
\cxxitem{void}
        {Filter}
        {(\ CDVector\ \&obs\ )\ const\ }
        {Projects an observation into the PCA space and back. }
        {6.27}
\end{cxxpublic}
\begin{cxxdoc}


Performs Principal Component Analysis on a set of data vectors.
The PCA basis can then be used for e.g. shape deformation.


\end{cxxdoc}
\begin{cxxfunction}
{inline\ \ \ CDVector\&}
        {EigenValues}
        {()}
        {Returns the eigen values in vector form}
        {6.1}
\begin{cxxdoc}
Returns the eigen values in vector form
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ const\ CDVector\&}
        {EigenValues}
        {()\ const\ }
        {Returns the eigen values in const vector form}
        {6.2}
\begin{cxxdoc}
Returns the eigen values in const vector form
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ const\ CDVector\&}
        {EigenValuesOrg}
        {()\ const\ }
        {Returns the orignal eigen values in const vector form}
        {6.3}
\begin{cxxdoc}
Returns the orignal eigen values in const vector form
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ CDMatrix\&}
        {EigenVectors}
        {()}
        {Returns the eigen vectors in matrix form}
        {6.4}
\begin{cxxdoc}
Returns the eigen vectors in matrix form
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ const\ CDMatrix\&}
        {EigenVectors}
        {()\ const\ }
        {Returns the eigen vectors in const matrix form}
        {6.5}
\begin{cxxdoc}
Returns the eigen vectors in const matrix form
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ int}
        {NParameters}
        {()\ const\ }
        {Returns the number of princal parameters}
        {6.6}
\begin{cxxdoc}
Returns the number of princal parameters
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ int}
        {NParametersOrg}
        {()\ const\ }
        {Returns the number of princal parameters before any truncation}
        {6.7}
\begin{cxxdoc}
Returns the number of princal parameters before any truncation
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ClearDataItems}
        {()}
        {Deletes the data matrix}
        {6.8}
\begin{cxxdoc}
Deletes the data matrix
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ int}
        {NDataItems}
        {()\ const\ }
        {Returns the number of data items this basis is based on}
        {6.9}
\begin{cxxdoc}
Returns the number of data items this basis is based on
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {ParameterWeight}
        {(\ const\ int\ i,\ bool\ asPercentage\ )\ const\ }
        {Returns the eigenvalue of the i-th parameter. }
        {6.10}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & eigenvalue.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-17-2000
\strut}
\cxxSee{ParameterWeightOrg
\strut}
\begin{cxxdoc}


Returns the eigenvalue of the i-th parameter in absolute 
numbers or as percentage.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {ParameterWeightOrg}
        {(\ const\ int\ i,\ bool\ asPercentage\ )\ const\ }
        {Returns the eigenvalue of the i-th parameter. }
        {6.11}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & eigenvalue.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-17-2000
\strut}
\cxxSee{ParameterWeightOrg
\strut}
\begin{cxxdoc}


Returns the eigenvalue of the i-th parameter in absolute 
numbers or as percentage.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {InsertDataItem}
        {(\ const\ CDVector\ \&v\ )}
        {Inserts a data vector. }
        {6.12}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & A data vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-17-2000
\strut}
\begin{cxxdoc}


Inserts a data vector.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {UseIdentityTransformation}
        {()}
        {Makes the object use an identity basis instead of PCA basis. }
        {6.13}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-30-2002
\strut}
\begin{cxxdoc}


Makes the object use an identity basis instead of PCA basis, i.e.
essentially a by-pass of this object.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {DoPCA}
        {(\ bool\ bWriteCoVarMarix\ )}
        {Performs the principal component analysis. }
        {6.14}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut bWriteCoVarMarix} & If true the covariance matrix is writtento the current dir.NOTE: Only in the case of more data itemsthan dimensions (samples).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-17-2000
\strut}
\begin{cxxdoc}


Performs the principal component analysis on the data
items. Uses the Eckhart-Young theorem if necessary for
reduced memory and computational requirements.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ CDVector\&}
        {MeanDataItem}
        {()\ const\ }
        {Returns the sample mean. }
        {6.15}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & mean vector.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-17-2000
\strut}
\begin{cxxdoc}


Returns the mean of all sample vectors.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Writes a PCA object to file. }
        {6.16}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & File handle to binary file open for writing.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-18-2000
\strut}
\cxxSee{FromFile
\strut}
\begin{cxxdoc}


Writes a PCA object to a binary file.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads a PCA object from file. }
        {6.17}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & File handle to binary file open for reading.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-18-2000
\strut}
\cxxSee{ToFile
\strut}
\begin{cxxdoc}


Reads a PCA object from a binary file.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Dump}
        {(\ const\ char*\ szPath\ )\ const\ }
        {Writes eigen vectors and eigen values to matlab text files:  pca\_eigenvectors.m pca\_eigenvalues.m pca\_eigenvalues\_org.m }
        {6.18}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut szPath} & Path including terminating backslash   where the data is dumped.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & @throws   VisError
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-18-2000
\strut}
\begin{cxxdoc}


Debug method that provides a human readable
file dump of the object data.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Deform}
        {(\ const\ CDVector\ \&params,\ CDVector\ \&object\ )\ const\ }
        {Projects a set of PC scores to the original space. }
        {6.19}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut params} & PC scores, i.e. the model paramerisation.
\\
{\tt\strut object} & Resulting projection into the original space, e.g. a shape.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-18-2000
\strut}
\begin{cxxdoc}


Projects a set of PC scores to the original space.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {MahalanobisDistance}
        {(\ const\ CDVector\ \&params\ )\ const\ }
        {Returns the Mahalanobis distance of a set of PCA parameters. }
        {6.20}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut params} & A set of PCA parameters.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & Mahalanobis distance.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-11-2000
\strut}
\begin{cxxdoc}


Returns the Mahalanobis distance of a set of PCA parameters.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ShuffleData}
        {()}
        {Shuffle each dimension in all data items. }
        {6.21}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-17-2002
\strut}
\begin{cxxdoc}


Shuffle each dimension in all data items over all observations.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {TruncateParallel}
        {()}
        {Truncate eigenvectors and eigenvalues using parallel analysis. }
        {6.22}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & number of parameters in the truncated basis. 
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-15-2002
\strut}
\cxxSee{TruncateVar
\strut}
\begin{cxxdoc}


Truncate eigenvectors and eigenvalues using parallel analysis.            

Also known as Horn's parallel analysis or Humphrey-Ilgen 
parallel analysis. 

Assumes the data items have not been cleared.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {TruncateVar}
        {(\ const\ double\ retained\_variance\ )}
        {Truncate eigenvectors and eigenvalues to retain 'retained\_variance'.  }
        {6.23}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut retained\_variance} & Amount of variance to retain [0\<x\<1].  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & number of parameters in the truncated basis. 
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-11-2000
\strut}
\begin{cxxdoc}


Truncate eigenvectors and eigenvalues to retain
'retained\_variance'. 

I.e. if  retained\_variance = .95 this function calculates how
many eigenvectors we need to explain 95\% of the total
variation in the PCA training set.     


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {CalcNParam}
        {(\ const\ double\ retained\_variance\ )\ const\ }
        {Calulates the needed number of parameters. }
        {6.24}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut retained\_variance} & Amount of variance to retain [0\<x\<1].
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & number of model parameters.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-5-2000
\strut}
\begin{cxxdoc}


Calulates the needed number of parameters to retain
'retained\_variance'. I.e. if 
retained\_variance = .95 then this function calculates how
many eigenvectors we need to explain 95\% of the total
variation in the PCA training set.  

Assumes that no eigenvalue cutoff has been done prior to the
call.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Project}
        {(\ const\ CDVector\ \&obs,\ CDVector\ \&param\ )\ const\ }
        {Projects an observation into the PCA space. }
        {6.25}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut obs} & Input observation.
\\
{\tt\strut param} & Output model parameters of the (possibly truncated)basis.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-6-2003
\strut}
\cxxSee{BackProject,\ Filter
\strut}
\begin{cxxdoc}


Projects an observation into the PCA space.

Notice: Costly, due to the non-cached transpose 
of the eigenvectors.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {BackProject}
        {(\ const\ CDVector\ \&param,\ CDVector\ \&synth\_obs\ )\ const\ }
        {Back projects a set of PCA model parameters into the original space. }
        {6.26}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut param} & Input PCA model parameters.
\\
{\tt\strut synth\_obs} & Synthesized output observation.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-6-2003
\strut}
\cxxSee{Project,\ Filter\ \ 
\strut}
\begin{cxxdoc}


Back projects a set of PCA model parameters into the original space.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Filter}
        {(\ CDVector\ \&obs\ )\ const\ }
        {Projects an observation into the PCA space and back. }
        {6.27}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut obs} & Input observation.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-6-2003
\strut}
\cxxSee{Project,\ BackProject
\strut}
\begin{cxxdoc}


Projects an observation into the PCA space and back.

Notice: Costly, due to the non-cached transpose 
of the eigenvectors in the project call.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMDelaunay}
        {:\ public\ CAAMObject}
        {Delaunay Triangulator.  }
        {7}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-11-2000
\strut}
\cxxSee{CAAMMesh
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{7}{CAAMDelaunay}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{}
        {\cxxtilde CAAMDelaunay}
        {()}
        {Destructor. }
        {7.1}
\cxxitem{void}
        {MakeMesh}
        {(\ const\ CAAMShape\ \&s,\ CAAMMesh\ \&m,\ bool\ bConcaveCleanUp\ )}
        {Generates a triangular mesh. }
        {7.2}
\end{cxxpublic}
\begin{cxxdoc}


This class act as a wrapper for the delaunay triangulator by
Steven Fortune. Copyright (c) 1994 by AT\&T Bell Laboratories.
AT\&T, Bell Laboratories.			

The full diclaimer for the delaunay triangulator is:

The author of this software is Steven Fortune.  Copyright (c) 1994 by AT\&T
Bell Laboratories.
Permission to use, copy, modify, and distribute this software for any
purpose without fee is hereby granted, provided that this entire notice
is included in all copies of any software which is or includes a copy
or modification of this software and in all copies of the supporting
documentation for such software.

THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
WARRANTY.  IN PARTICULAR, NEITHER THE AUTHORS NOR AT\&T MAKE ANY
REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.


\end{cxxdoc}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMDelaunay}
        {()}
        {Destructor. }
        {7.1}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-27-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {MakeMesh}
        {(\ const\ CAAMShape\ \&s,\ CAAMMesh\ \&m,\ bool\ bConcaveCleanUp\ )}
        {Generates a triangular mesh. }
        {7.2}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & The input shape one wants to triangulate.
\\
{\tt\strut m} & The output Delaunay mesh.
\\
{\tt\strut bConcaveCleanUp} & If true convex triangles of concave shapesare removed (default false).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-27-2000
\strut}
\begin{cxxdoc}


Generates a triangular mesh, where all triangles satisfies
the Delaunay property.  


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMInitialize}
        {:\ public\ CAAMObject}
        {Abstract base class for all AAM initialization  classes. }
        {8}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-22-2000
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{8}{CAAMInitialize}{}
\cxxInheritanceEntry{\cxxNone\cxxLinkPubright}{9}{CAAMInitializeStegmann}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{}
        {CAAMInitialize}
        {()}
        {Default constructor}
        {8.1}
\cxxitem{virtual\ \ \ int}
        {Initialize}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ CAAMShape\ \&s,\ CDVector\ \&c\ )}
        {General initialization function}
        {8.2}
\cxxitem{}
        {CAAMInitialize}
        {(\ const\ CAAMModel\ \&aammodel\ )}
        {Constructor. }
        {8.3}
\end{cxxpublic}
\begin{cxxdoc}


Abstract base class for all AAM initialization 
classes.

\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMInitialize}
        {()}
        {Default constructor}
        {8.1}
\begin{cxxdoc}
Default constructor
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{virtual\ \ \ int}
        {Initialize}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ CAAMShape\ \&s,\ CDVector\ \&c\ )}
        {General initialization function}
        {8.2}
\begin{cxxdoc}
General initialization function
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMInitialize}
        {(\ const\ CAAMModel\ \&aammodel\ )}
        {Constructor. }
        {8.3}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut model} & Reference to a model.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-22-2000
\strut}
\begin{cxxdoc}


Constructor.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMInitializeStegmann}
        {:\ public\ CAAMInitialize}
        {Implementation of a simple intialization method.			 }
        {9}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-22-2000
\strut}
\cxxSee{CAAMInitCandidates,\ CAAMInitEntry.
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft\cxxNone}
\cxxInheritanceEntry{\cxxNone}{8}{CAAMInitialize}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone\cxxNone}{9}{CAAMInitializeStegmann}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{void}
        {SetIterations1stPass}
        {(\ const\ int\ i\ )}
        {Sets the number of interations in the coarse search}
        {9.3}
\cxxitem{void}
        {SetIterations2ndPass}
        {(\ const\ int\ i\ )}
        {Sets the number of interations in the refinement search}
        {9.4}
\cxxitem{void}
        {SetXYSpacing}
        {(\ const\ double\ xs,\ const\ double\ ys\ )}
        {Sets the spacing of the search grid in x and y}
        {9.5}
\cxxitem{void}
        {SetScaleSteps}
        {(\ const\ CDVector\ \&v\ )}
        {Sets the number of scale steps}
        {9.6}
\cxxitem{void}
        {SetRotationSteps}
        {(\ const\ CDVector\ \&v\ )}
        {Sets the number of rotation steps}
        {9.7}
\cxxitem{void}
        {SetModelParameterSteps}
        {(\ const\ std::vector\<CDVector\>\ \&av\ )}
        {Sets the number of model parameter steps}
        {9.8}
\cxxitem{}
        {CAAMInitializeStegmann}
        {(\ const\ CAAMModel\ \&aammodel\ )}
        {Constructor. }
        {9.9}
\cxxitem{int}
        {Initialize}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ CAAMShape\ \&s,\ CDVector\ \&c\ )}
        {Performs a somewhat brute force initialization of an AAM. }
        {9.10}
\end{cxxpublic}
\begin{cxxprivate}
\cxxitem{class\ }
        {CAAMInitEntry}
        {}
        {Container for initialization results.  }
        {9.1}
\cxxitem{class\ }
        {CAAMInitCandidates}
        {}
        {Initialization candidate containiner. }
        {9.2}
\end{cxxprivate}
\begin{cxxdoc}


Implementation of a simple intialization method.			


\end{cxxdoc}
\begin{cxxfunction}
{void}
        {SetIterations1stPass}
        {(\ const\ int\ i\ )}
        {Sets the number of interations in the coarse search}
        {9.3}
\begin{cxxdoc}
Sets the number of interations in the coarse search
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetIterations2ndPass}
        {(\ const\ int\ i\ )}
        {Sets the number of interations in the refinement search}
        {9.4}
\begin{cxxdoc}
Sets the number of interations in the refinement search
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetXYSpacing}
        {(\ const\ double\ xs,\ const\ double\ ys\ )}
        {Sets the spacing of the search grid in x and y}
        {9.5}
\begin{cxxdoc}
Sets the spacing of the search grid in x and y
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetScaleSteps}
        {(\ const\ CDVector\ \&v\ )}
        {Sets the number of scale steps}
        {9.6}
\begin{cxxdoc}
Sets the number of scale steps
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetRotationSteps}
        {(\ const\ CDVector\ \&v\ )}
        {Sets the number of rotation steps}
        {9.7}
\begin{cxxdoc}
Sets the number of rotation steps
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetModelParameterSteps}
        {(\ const\ std::vector\<CDVector\>\ \&av\ )}
        {Sets the number of model parameter steps}
        {9.8}
\begin{cxxdoc}
Sets the number of model parameter steps
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMInitializeStegmann}
        {(\ const\ CAAMModel\ \&aammodel\ )}
        {Constructor. }
        {9.9}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut aammodel} & The model to initialize.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-22-2000
\strut}
\begin{cxxdoc}


Constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {Initialize}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ CAAMShape\ \&s,\ CDVector\ \&c\ )}
        {Performs a somewhat brute force initialization of an AAM. }
        {9.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & The image beeing searched in.
\\
{\tt\strut s} & The output shape after initialization.
\\
{\tt\strut c} & The output model parameters after initialization.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut 0} & on succes, non-zero on errors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-22-2000
\strut}
\begin{cxxdoc}


Performs a somewhat brute force initialization of an AAM.        

Assumes one object per image as of now.			


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxclass}
{class\ }
        {CAAMInitEntry}
        {}
        {Container for initialization results.  }
        {9.1}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-19-2000
\strut}
\cxxSee{CAAMInitialize,\ CAAMInitCandidates
\strut}
\begin{cxxpublic}
\cxxitem{}
        {CAAMInitEntry}
        {(\ const\ double\ e\_fit,\ const\ CAAMShape\ s,\ const\ CDVector\ \&c\ )}
        {Constructor}
        {9.1.1}
\cxxitem{inline\ \ \ double}
        {E\_fit}
        {()\ const\ }
        {Returns the fit measure}
        {9.1.2}
\cxxitem{inline\ \ \ CAAMShape}
        {Shape}
        {()\ const\ }
        {Returns the corresponding shape}
        {9.1.3}
\cxxitem{inline\ \ \ CDVector}
        {C}
        {()\ const\ }
        {Returns the corresponding model parameters}
        {9.1.4}
\end{cxxpublic}
\begin{cxxdoc}


Container for initialization results.


\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMInitEntry}
        {(\ const\ double\ e\_fit,\ const\ CAAMShape\ s,\ const\ CDVector\ \&c\ )}
        {Constructor}
        {9.1.1}
\begin{cxxdoc}
Constructor
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ double}
        {E\_fit}
        {()\ const\ }
        {Returns the fit measure}
        {9.1.2}
\begin{cxxdoc}
Returns the fit measure
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ CAAMShape}
        {Shape}
        {()\ const\ }
        {Returns the corresponding shape}
        {9.1.3}
\begin{cxxdoc}
Returns the corresponding shape
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ CDVector}
        {C}
        {()\ const\ }
        {Returns the corresponding model parameters}
        {9.1.4}
\begin{cxxdoc}
Returns the corresponding model parameters
\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMInitCandidates}
        {}
        {Initialization candidate containiner. }
        {9.2}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-19-2000
\strut}
\cxxSee{CAAMInitEntry,\ CAAMInitialize
\strut}
\begin{cxxpublic}
\cxxitem{int}
        {NCandidates}
        {()\ const\ }
        {Returns the number of candidates}
        {9.2.1}
\cxxitem{CAAMInitEntry\&}
        {Candidate}
        {(int\ i)}
        {Returns the i-th candidate}
        {9.2.2}
\cxxitem{}
        {CAAMInitCandidates}
        {(\ int\ n\ )}
        {Allocates a pool with room for 'n' candidates. }
        {9.2.3}
\cxxitem{bool}
        {ApplyForAcceptance}
        {(\ const\ CAAMInitEntry\ e\ )}
        {Apply for acceptance of a new initialization hypothesis. }
        {9.2.4}
\end{cxxpublic}
\begin{cxxdoc}


Initialization candidate containiner. 
Holds the 'n' best candidates that has applieed
for acceptance.


\end{cxxdoc}
\begin{cxxfunction}
{int}
        {NCandidates}
        {()\ const\ }
        {Returns the number of candidates}
        {9.2.1}
\begin{cxxdoc}
Returns the number of candidates
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMInitEntry\&}
        {Candidate}
        {(int\ i)}
        {Returns the i-th candidate}
        {9.2.2}
\begin{cxxdoc}
Returns the i-th candidate
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMInitCandidates}
        {(\ int\ n\ )}
        {Allocates a pool with room for 'n' candidates. }
        {9.2.3}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut n} & The number of candidates.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-19-2000
\strut}
\begin{cxxdoc}


Allocates a pool with room for 'n' candidates.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ApplyForAcceptance}
        {(\ const\ CAAMInitEntry\ e\ )}
        {Apply for acceptance of a new initialization hypothesis. }
        {9.2.4}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut e} & The seach result, which is applieing for acceptance.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if it is accepted, false if not.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-19-2000
\strut}
\begin{cxxdoc}


Apply for acceptance of a new initialization hypothesis.
The entry are accepted if it is better than the worst 
candiate, or if there is less than 'n' candidates in the set.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMLinearReg}
        {:\ public\ CAAMObject}
        {Performs multi-variate linear regression on a set of experiments. }
        {10}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{10}{CAAMLinearReg}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{}
        {CAAMLinearReg}
        {()}
        {Constructor. }
        {10.1}
\cxxitem{}
        {\cxxtilde CAAMLinearReg}
        {()}
        {Destructor. }
        {10.2}
\cxxitem{int}
        {EstimateK}
        {(\ const\ CDMatrix\ \&C,\ CDMatrix\ \&EigenVec\_k,\ CDMatrix\ \&EigenVal\_k\ )}
        {Performs k-estimation.   }
        {10.3}
\cxxitem{int}
        {DoRegression}
        {(\ const\ CDMatrix\ \&C,\ const\ CDMatrix\ \&X,\ CDMatrix\ \&R\ )}
        {Calculates the regression matrix, R. }
        {10.4}
\end{cxxpublic}
\begin{cxxdoc}


Performs multi-variate linear regression on a set of experiments.  

\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMLinearReg}
        {()}
        {Constructor. }
        {10.1}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothning.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-16-2001
\strut}
\begin{cxxdoc}


Constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMLinearReg}
        {()}
        {Destructor. }
        {10.2}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothning.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-16-2001
\strut}
\begin{cxxdoc}


Destructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {EstimateK}
        {(\ const\ CDMatrix\ \&C,\ CDMatrix\ \&EigenVec\_k,\ CDMatrix\ \&EigenVal\_k\ )}
        {Performs k-estimation.   }
        {10.3}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut C} & The parameter matrix.
\\
{\tt\strut EigenVec\_k} & Output k eigenvectors.
\\
{\tt\strut EigenVal\_k} & Output k eigenvalues.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut k} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\begin{cxxdoc}


Performs k-estimation.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {DoRegression}
        {(\ const\ CDMatrix\ \&C,\ const\ CDMatrix\ \&X,\ CDMatrix\ \&R\ )}
        {Calculates the regression matrix, R. }
        {10.4}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut C} & In the AAM case: the input parameters displacements.
\\
{\tt\strut X} & In the AAM case: the input normalized pixel differences.
\\
{\tt\strut R} & The output regression matrix.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut k} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\begin{cxxdoc}


Calculates the regression matrix, R from the set of experiments
in C and X, obtaining the relationship: C = RX.

NOTE: Destroys X!!!


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMLog}
        {:\ public\ CAAMObject}
        {Log facility class. }
        {11}
\cxxAuthor{
Hans P. Palb�l \& Mikkel B. Stegmann
\strut}
\cxxVersion{
03-05-2001
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{11}{CAAMLog}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{}
        {CAAMLog}
        {(\ const\ char*\ service,\ const\ eLogLevel\ level\ )}
        {Default constructor. }
        {11.7}
\cxxitem{void}
        {InitLogFile}
        {(\ const\ char*\ filename\ )}
        {Basic initialization. }
        {11.8}
\cxxitem{void}
        {Printf}
        {(\ eLogLevel\ level,\ char*\ message,\ ...\ )}
        {Prints a message with the given severity level. }
        {11.9}
\cxxitem{void}
        {GetTime}
        {(\ char*\ str\ )}
        {Returns the current (local) time in the string 'str'. }
        {11.10}
\cxxitem{void}
        {SetLevel}
        {(\ eLogLevel\ level\ )}
        {Sets the minimum severity level. }
        {11.11}
\end{cxxpublic}
\begin{cxxprivate}
\cxxitem{static\ \ \ char*}
        {m\_logfile}
        {}
        {Common filname of the logfile.}
        {11.1}
\cxxitem{static\ \ \ FILE*}
        {m\_file\_hndl}
        {}
        {Common file handle}
        {11.2}
\cxxitem{char*}
        {m\_service}
        {}
        {Name identifying the service}
        {11.3}
\cxxitem{eLogLevel}
        {m\_level}
        {}
        {Notify level}
        {11.4}
\cxxitem{bool}
        {m\_bFileLogging}
        {}
        {Used to set whether file logging should be used or not}
        {11.5}
\cxxitem{static\ \ \ int}
        {m\_init}
        {}
        {Keeps track of whether the info service has been initialized}
        {11.6}
\end{cxxprivate}
\begin{cxxdoc}


Log facility class. 
Built directly upon the CInfo class from the Verticle 
project by Hans P. Palb�l.

\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMLog}
        {(\ const\ char*\ service,\ const\ eLogLevel\ level\ )}
        {Default constructor. }
        {11.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut service} & Name of the calling class or function.  
\\
{\tt\strut level} & The minimum level that will be reported.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Hans P. Palb�l \& Mikkel B. Stegmann
\strut}
\cxxVersion{
3-5-2001
\strut}
\begin{cxxdoc}


Default constructor.   


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {InitLogFile}
        {(\ const\ char*\ filename\ )}
        {Basic initialization. }
        {11.8}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & The log filename. If   
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Hans P. Palb�l \& Mikkel B. Stegmann
\strut}
\cxxVersion{
3-5-2001
\strut}
\begin{cxxdoc}


Basic initialization. Sets up the optional log file.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Printf}
        {(\ eLogLevel\ level,\ char*\ message,\ ...\ )}
        {Prints a message with the given severity level. }
        {11.9}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut level} & Severity level of the incoming message.
\\
{\tt\strut message} & Format string in printf() format.
\\
{\tt\strut ...} & Optional arguments for the printf() format string.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Hans P. Palb�l \& Mikkel B. Stegmann
\strut}
\cxxVersion{
3-5-2001
\strut}
\begin{cxxdoc}


Prints a message with the given severity level.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {GetTime}
        {(\ char*\ str\ )}
        {Returns the current (local) time in the string 'str'. }
        {11.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut str} & Output string. Must be pre-allocated.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Hans P. Palb�l
\strut}
\cxxVersion{
3-5-2001
\strut}
\begin{cxxdoc}


Returns the current (local) time in the string 'str'.
Format: "hh:mm:ss".  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetLevel}
        {(\ eLogLevel\ level\ )}
        {Sets the minimum severity level. }
        {11.11}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut str} & Output string. Must be pre-allocated.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Hans P. Palb�l
\strut}
\cxxVersion{
3-5-2001
\strut}
\begin{cxxdoc}


Sets the minimum severity level. All messages at this level and above
are reported.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxvariable}
{static\ \ \ char*}
        {m\_logfile}
        {}
        {Common filname of the logfile.}
        {11.1}
\begin{cxxdoc}
Common filname of the logfile.	 
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{static\ \ \ FILE*}
        {m\_file\_hndl}
        {}
        {Common file handle}
        {11.2}
\begin{cxxdoc}
Common file handle
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{char*}
        {m\_service}
        {}
        {Name identifying the service}
        {11.3}
\begin{cxxdoc}
Name identifying the service
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{eLogLevel}
        {m\_level}
        {}
        {Notify level}
        {11.4}
\begin{cxxdoc}
Notify level
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{bool}
        {m\_bFileLogging}
        {}
        {Used to set whether file logging should be used or not}
        {11.5}
\begin{cxxdoc}
Used to set whether file logging should be used or not
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{static\ \ \ int}
        {m\_init}
        {}
        {Keeps track of whether the info service has been initialized}
        {11.6}
\begin{cxxdoc}
Keeps track of whether the info service has been initialized
\end{cxxdoc}
\end{cxxvariable}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMMathUtil}
        {}
        {Utility math/statistical methods for the AAM project. }
        {12}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-28-2002
\strut}
\begin{cxxpublic}
\cxxitem{void}
        {Hist}
        {(\ CDVector\ \&v,\ const\ double\ min,\ const\ double\ max,\ CDVector\ \&hist,\ const\ int\ nbins,\ bool\ normalize,\ bool\ transform\ )}
        {Calculates the histogram. }
        {12.1}
\cxxitem{void}
        {CumSum}
        {(\ const\ CDVector\ \&v,\ CDVector\ \&cumsum,\ bool\ normalize\ )}
        {Cumulative sum of elements. }
        {12.2}
\cxxitem{double}
        {MutualInformation}
        {(\ const\ CDVector\ \&v1,\ const\ CDVector\ \&v2,\ int\ nbins\ )}
        {Calulates the Mutual Information (MI) between two vectors. }
        {12.3}
\cxxitem{void}
        {GaussianHistogramMatching}
        {(\ const\ CDVector\ \&v,\ CDVector\ \&out,\ const\ int\ nbins,\ CDVector*\ gaussLUT\ )}
        {Maps the distibution of v into an approximate Gaussian distribution. }
        {12.4}
\cxxitem{void}
        {ExpandMatrix2DyadicSize}
        {(\ const\ CDMatrix\ \&m,\ CDMatrix\ \&dyad\ )}
        {Expands a matrix to have dyadic size. }
        {12.5}
\cxxitem{void}
        {CalcElementVar}
        {(\ const\ std::vector\<CDVector\>\ \&vVectors,\ CDVector\ \&varVec,\ CDVector*\ vpMean\ )}
        {Calculates the variance of each component in a set of vectors. }
        {12.6}
\cxxitem{void}
        {LinearStretchMinMax}
        {(\ CDVector\ \&v,\ const\ double\ new\_min,\ const\ double\ new\_max\ )}
        {Maps a vector linearly from [min;max] to [new\_min;new\_max]. }
        {12.7}
\cxxitem{void}
        {LinearStretchClamp}
        {(\ CDVector\ \&v,\ const\ double\ x1,\ const\ double\ x2,\ const\ double\ new\_min,\ const\ double\ new\_max\ )}
        {Maps a vector linearly from [x1;x2] to [new\_min;new\_max]. }
        {12.8}
\cxxitem{void}
        {MeanFilter}
        {(\ const\ CDMatrix\ \&in,\ CDMatrix\ \&out\ )}
        {Performs a 3x3 mean filtering of a matrix. }
        {12.9}
\cxxitem{void}
        {ZeroMeanUnitLength}
        {(\ CDVector\ \&v\ )}
        {Normalises a vector to zero mean and unit length. }
        {12.10}
\cxxitem{void}
        {PseudoInv}
        {(\ const\ CDMatrix\ \&A,\ CDMatrix\ \&P\ )}
        {Calculates the pseudo inverse of a matrix. }
        {12.11}
\end{cxxpublic}
\begin{cxxdoc}


This is the mathematical / statistical garbage bin.

It consists of methods that for some reason haven't found its
way into other (and more meaningful) classes.			

All methods are static, so there is never need for an
instantiation of this class.  
\end{cxxdoc}
\begin{cxxfunction}
{void}
        {Hist}
        {(\ CDVector\ \&v,\ const\ double\ min,\ const\ double\ max,\ CDVector\ \&hist,\ const\ int\ nbins,\ bool\ normalize,\ bool\ transform\ )}
        {Calculates the histogram. }
        {12.1}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Input vector.  
\\
{\tt\strut min} & Value for the first bin (values lower are clamped to min).
\\
{\tt\strut max} & Value for the last bin (values lower are clamped to max).
\\
{\tt\strut hist} & Output histogram vector.
\\
{\tt\strut nbins} & The number of bins. Default 256.
\\
{\tt\strut normalize} & Optional normalization, i.e. make the histogram entries sum to 1.Default true.
\\
{\tt\strut transform} & Optional transformation of v into 'nbins' integer intervals between [min;max].Default false.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-25-2002
\strut}
\begin{cxxdoc}


Calculates the histogram of a vector within [min;max]
with optional nomalization. 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {CumSum}
        {(\ const\ CDVector\ \&v,\ CDVector\ \&cumsum,\ bool\ normalize\ )}
        {Cumulative sum of elements. }
        {12.2}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Input vector.
\\
{\tt\strut cumsum} & Output vector containing the cumulative sum of elements.
\\
{\tt\strut normalize} & Optional normalization of output, i.e. cumsum[end] = 1.0.Default true.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-25-2002
\strut}
\begin{cxxdoc}


Cumulative sum of elements.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {MutualInformation}
        {(\ const\ CDVector\ \&v1,\ const\ CDVector\ \&v2,\ int\ nbins\ )}
        {Calulates the Mutual Information (MI) between two vectors. }
        {12.3}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v1} & Signal 1.
\\
{\tt\strut v2} & Signal 2.
\\
{\tt\strut nbins} & The number of bins in the single and joint histograms.Default 256.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & Mutual Information (MI).
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-22-2002
\strut}
\begin{cxxdoc}


Calulates the Mutual Information (MI) between two vectors.
See e.g. C. Studholme et al. or Viola et al.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {GaussianHistogramMatching}
        {(\ const\ CDVector\ \&v,\ CDVector\ \&out,\ const\ int\ nbins,\ CDVector*\ gaussLUT\ )}
        {Maps the distibution of v into an approximate Gaussian distribution. }
        {12.4}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Input vector.
\\
{\tt\strut out} & Output vector.
\\
{\tt\strut nbins} & Number of bins used to approx the distribution. Default 256.
\\
{\tt\strut gaussLUT} & If not null, the calulated LUT is returned here.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-25-2002
\strut}
\begin{cxxdoc}


Maps the distibution of v into an approximate Gaussian distribution.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ExpandMatrix2DyadicSize}
        {(\ const\ CDMatrix\ \&m,\ CDMatrix\ \&dyad\ )}
        {Expands a matrix to have dyadic size. }
        {12.5}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut m} & Input matrix.
\\
{\tt\strut dyad} & Output dyadic version.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-24-2002
\strut}
\begin{cxxdoc}


This method expands a matrix to have dyadic size, i.e.
nrows and ncols that are powers of two.

Expansion are done using zero-padding.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {CalcElementVar}
        {(\ const\ std::vector\<CDVector\>\ \&vVectors,\ CDVector\ \&varVec,\ CDVector*\ vpMean\ )}
        {Calculates the variance of each component in a set of vectors. }
        {12.6}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut cVectors} & Input set of vectors.
\\
{\tt\strut varVec} & A vector containing the variance of each compomentin cVectors.
\\
{\tt\strut vpMean} & Optional vector pointer to return the mean vector in.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-22-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {LinearStretchMinMax}
        {(\ CDVector\ \&v,\ const\ double\ new\_min,\ const\ double\ new\_max\ )}
        {Maps a vector linearly from [min;max] to [new\_min;new\_max]. }
        {12.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Input vector.
\\
{\tt\strut new\_min} & Desired minimum.
\\
{\tt\strut new\_max} & Desired maximum.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-25-2002
\strut}
\cxxSee{LinearStretchClamp
\strut}
\begin{cxxdoc}


Maps a vector linearly from [min;max] to [new\_min;new\_max].


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {LinearStretchClamp}
        {(\ CDVector\ \&v,\ const\ double\ x1,\ const\ double\ x2,\ const\ double\ new\_min,\ const\ double\ new\_max\ )}
        {Maps a vector linearly from [x1;x2] to [new\_min;new\_max]. }
        {12.8}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Input vector.
\\
{\tt\strut x1} & Starting point of stretch.
\\
{\tt\strut x2} & Ending point of stretch.
\\
{\tt\strut new\_min} & Desired minimum.
\\
{\tt\strut new\_max} & Desired maximum.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-25-2002
\strut}
\cxxSee{LinearStretchMinMax
\strut}
\begin{cxxdoc}


Maps a vector linearly from [x1;x2] to [new\_min;new\_max]. 
Values outside [x1;x2] are clamped to x1, x2 respectively.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {MeanFilter}
        {(\ const\ CDMatrix\ \&in,\ CDMatrix\ \&out\ )}
        {Performs a 3x3 mean filtering of a matrix. }
        {12.9}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut in} & Input matrix.
\\
{\tt\strut out} & Output mean filtered matrix.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2002
\strut}
\begin{cxxdoc}


Performs a 3x3 mean filtering of a matrix.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ZeroMeanUnitLength}
        {(\ CDVector\ \&v\ )}
        {Normalises a vector to zero mean and unit length. }
        {12.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Input vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & The result is returned in v.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-12-2002
\strut}
\begin{cxxdoc}


Normalises a vector to zero mean and unit length.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {PseudoInv}
        {(\ const\ CDMatrix\ \&A,\ CDMatrix\ \&P\ )}
        {Calculates the pseudo inverse of a matrix. }
        {12.11}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & Input matrix.
\\
{\tt\strut P} & Pseudo inverse of A.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-19-2002
\strut}
\begin{cxxdoc}


Calculates the pseudo inverse of a matrix.  


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMPoint}
        {}
        {Point container. }
        {13}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-10-2000
\strut}
\cxxSee{CAAMTriangle,\ CAAMMesh
\strut}
\begin{cxxpublic}
\cxxitem{double}
        {x}
        {}
        {x-position}
        {13.1}
\cxxitem{double}
        {y}
        {}
        {y position}
        {13.2}
\cxxitem{}
        {CAAMPoint}
        {()}
        {Constructor}
        {13.3}
\cxxitem{}
        {CAAMPoint}
        {(const\ double\ \_x,\ const\ double\ \_y)}
        {Constructor}
        {13.4}
\end{cxxpublic}
\begin{cxxdoc}


This class act as a very simple container for
the concept 'a real-precision point'. It's merely a struct
with a constructor. Used in the mesh and triangle  
representation.


\end{cxxdoc}
\begin{cxxvariable}
{double}
        {x}
        {}
        {x-position}
        {13.1}
\begin{cxxdoc}
x-position
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{double}
        {y}
        {}
        {y position}
        {13.2}
\begin{cxxdoc}
y position
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxfunction}
{}
        {CAAMPoint}
        {()}
        {Constructor}
        {13.3}
\begin{cxxdoc}
Constructor
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMPoint}
        {(const\ double\ \_x,\ const\ double\ \_y)}
        {Constructor}
        {13.4}
\begin{cxxdoc}
Constructor
\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMTriangle}
        {}
        {Triangle container with built-in hit test. }
        {14}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-10-2000
\strut}
\cxxSee{CAAMMesh,\ CAAMPoint.
\strut}
\begin{cxxpublic}
\cxxitem{inline\ \ \ int}
        {V1}
        {()\ const\ }
        {Returns index to point 1}
        {14.5}
\cxxitem{inline\ \ \ int}
        {V2}
        {()\ const\ }
        {Returns index to point 2}
        {14.6}
\cxxitem{inline\ \ \ int}
        {V3}
        {()\ const\ }
        {Returns index to point 3}
        {14.7}
\cxxitem{}
        {CAAMTriangle}
        {(\ int\ \_v1,\ int\ \_v2,\ int\ \_v3,\ std::vector\<CAAMPoint\>*\ pPoints\ )}
        {Constructor. }
        {14.8}
\cxxitem{void}
        {Calc\_dD}
        {()}
        {Cache function. }
        {14.9}
\cxxitem{bool}
        {IsInside}
        {(const\ CAAMPoint\ \&p)\ const\ }
        {}
        {14.10}
\cxxitem{bool}
        {IsInside}
        {(const\ CAAMPoint\ \&p,\ double\ \&alpha,\ double\ \&beta,\ double\ \&gamma)\ const\ }
        {}
        {14.11}
\cxxitem{CAAMPoint}
        {CenterPoint}
        {(\ )\ const\ }
        {}
        {14.12}
\cxxitem{double}
        {Area}
        {()\ const\ }
        {Returns the area. }
        {14.13}
\end{cxxpublic}
\begin{cxxprivate}
\cxxitem{std::vector\<CAAMPoint\>\ *}
        {m\_pPoints}
        {}
        {The point vector from which the triangle is defined}
        {14.1}
\cxxitem{int}
        {m\_v1}
        {}
        {Index to point 1}
        {14.2}
\cxxitem{int}
        {m\_v2}
        {}
        {Index to point 2}
        {14.3}
\cxxitem{int}
        {m\_v3}
        {}
        {Index to point 3}
        {14.4}
\end{cxxprivate}
\begin{cxxdoc}


This class is a simple triangle structure defined by
three indexes to a list of points.
Included functionality is a hit test.


\end{cxxdoc}
\begin{cxxfunction}
{inline\ \ \ int}
        {V1}
        {()\ const\ }
        {Returns index to point 1}
        {14.5}
\begin{cxxdoc}
Returns index to point 1
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ int}
        {V2}
        {()\ const\ }
        {Returns index to point 2}
        {14.6}
\begin{cxxdoc}
Returns index to point 2
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ int}
        {V3}
        {()\ const\ }
        {Returns index to point 3}
        {14.7}
\begin{cxxdoc}
Returns index to point 3
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMTriangle}
        {(\ int\ \_v1,\ int\ \_v2,\ int\ \_v3,\ std::vector\<CAAMPoint\>*\ pPoints\ )}
        {Constructor. }
        {14.8}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-15-2000
\strut}
\begin{cxxdoc}


Constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Calc\_dD}
        {()}
        {Cache function. }
        {14.9}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-15-2000
\strut}
\begin{cxxdoc}


Cache function.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {IsInside}
        {(const\ CAAMPoint\ \&p)\ const\ }
        {}
        {14.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut p} & The point to test  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if the point is inside, otherwise false.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-14-2000
\strut}
\begin{cxxdoc}


Returns true if the point 'p' is inside the triangle.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {IsInside}
        {(const\ CAAMPoint\ \&p,\ double\ \&alpha,\ double\ \&beta,\ double\ \&gamma)\ const\ }
        {}
        {14.11}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut p} & The point to test  alpha	Relative x1 position.beta	Relative x2 position.gamma	Relative x3 position.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if the point is inside, otherwise false.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-14-2000
\strut}
\begin{cxxdoc}


Performs a hit test on the point p. If p is inside -- the
position of p relative to the triangle is returned.

The relative position is:

p = alpha*p1 + beta*p2 + gamma*p3

Where p1-3 is the three points of the triangle.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMPoint}
        {CenterPoint}
        {(\ )\ const\ }
        {}
        {14.12}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-4-2000
\strut}
\begin{cxxdoc}


Returns the center point of the triangle.		  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {Area}
        {()\ const\ }
        {Returns the area. }
        {14.13}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & area.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-15-2000
\strut}
\begin{cxxdoc}


Returns the area.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxvariable}
{std::vector\<CAAMPoint\>\ *}
        {m\_pPoints}
        {}
        {The point vector from which the triangle is defined}
        {14.1}
\begin{cxxdoc}
The point vector from which the triangle is defined
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{int}
        {m\_v1}
        {}
        {Index to point 1}
        {14.2}
\begin{cxxdoc}
Index to point 1
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{int}
        {m\_v2}
        {}
        {Index to point 2}
        {14.3}
\begin{cxxdoc}
Index to point 2
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{int}
        {m\_v3}
        {}
        {Index to point 3}
        {14.4}
\begin{cxxdoc}
Index to point 3
\end{cxxdoc}
\end{cxxvariable}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMMesh}
        {:\ public\ CAAMObject}
        {2D triangular mesh container. }
        {15}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-10-2000
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{15}{CAAMMesh}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{std::vector\<CAAMTriangle\>\ \&}
        {Triangles}
        {()}
        {Returns a vector of triangles}
        {15.3}
\cxxitem{std::vector\<CAAMPoint\>\ \&}
        {Points}
        {()}
        {Returns a vector of points}
        {15.4}
\cxxitem{const\ std::vector\<CAAMTriangle\>\ \&}
        {Triangles}
        {()\ const\ }
        {Returns a const vector of triangles}
        {15.5}
\cxxitem{const\ std::vector\<CAAMPoint\>\ \&}
        {Points}
        {()\ const\ }
        {Returns a const vector of points}
        {15.6}
\cxxitem{inline\ \ \ int}
        {NPoints}
        {()\ const\ }
        {Returns the total number of points in the mesh}
        {15.7}
\cxxitem{inline\ \ \ int}
        {NTriangles}
        {()\ const\ }
        {Returns the total number of triangles in the mesh}
        {15.8}
\cxxitem{void}
        {Clear}
        {()}
        {Deletes all points and triangles}
        {15.9}
\cxxitem{bool}
        {IsInside}
        {(\ const\ CAAMPoint\ \&p\ )\ const\ }
        {}
        {15.10}
\cxxitem{bool}
        {IsInside}
        {(\ const\ CAAMPoint\ \&p,\ int\ \&triangle,\ double\ \&alpha,\ double\ \&beta,\ double\ \&gamma\ )\ const\ }
        {Performs a hit test on the point p. }
        {15.11}
\cxxitem{}
        {CAAMMesh}
        {()}
        {Constructor. }
        {15.12}
\cxxitem{}
        {\cxxtilde CAAMMesh}
        {()}
        {Destructor. }
        {15.13}
\cxxitem{void}
        {Insert}
        {(\ const\ CAAMPoint\ \&p\ )}
        {Adds a point to the end. }
        {15.14}
\cxxitem{void}
        {ReplacePoints}
        {(const\ CAAMShape\ \&s)}
        {Replaces the points in the mesh. }
        {15.15}
\cxxitem{void}
        {Insert}
        {(\ const\ CAAMTriangle\ \&t\ )}
        {Adds a triangle to the end. }
        {15.16}
\cxxitem{int}
        {ToMatlab}
        {(const\ CString\&\ sFilename)\ const\ }
        {}
        {15.17}
\cxxitem{double}
        {Area}
        {()\ const\ }
        {Returns the total area of all triangles in the mesh. }
        {15.18}
\cxxitem{CAAMMesh\&}
        {operator=}
        {(const\ CAAMMesh\ \&m)}
        {Assignment operator. }
        {15.19}
\cxxitem{}
        {CAAMMesh}
        {(\ const\ CAAMMesh\ \&m\ )}
        {Copy constructor. }
        {15.20}
\end{cxxpublic}
\begin{cxxprivate}
\cxxitem{std::vector\<CAAMTriangle\>\ }
        {m\_vTriangles}
        {}
        {A vector of triangles}
        {15.1}
\cxxitem{std::vector\<CAAMPoint\>\ }
        {m\_vPoints}
        {}
        {A vector of points}
        {15.2}
\end{cxxprivate}
\begin{cxxdoc}


This class implements the concept of a 2D triangular mesh.
Included functionality is a hit test and matlab export
capability.

\end{cxxdoc}
\begin{cxxfunction}
{std::vector\<CAAMTriangle\>\ \&}
        {Triangles}
        {()}
        {Returns a vector of triangles}
        {15.3}
\begin{cxxdoc}
Returns a vector of triangles
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{std::vector\<CAAMPoint\>\ \&}
        {Points}
        {()}
        {Returns a vector of points}
        {15.4}
\begin{cxxdoc}
Returns a vector of points
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ std::vector\<CAAMTriangle\>\ \&}
        {Triangles}
        {()\ const\ }
        {Returns a const vector of triangles}
        {15.5}
\begin{cxxdoc}
Returns a const vector of triangles
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ std::vector\<CAAMPoint\>\ \&}
        {Points}
        {()\ const\ }
        {Returns a const vector of points}
        {15.6}
\begin{cxxdoc}
Returns a const vector of points
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ int}
        {NPoints}
        {()\ const\ }
        {Returns the total number of points in the mesh}
        {15.7}
\begin{cxxdoc}
Returns the total number of points in the mesh
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ int}
        {NTriangles}
        {()\ const\ }
        {Returns the total number of triangles in the mesh}
        {15.8}
\begin{cxxdoc}
Returns the total number of triangles in the mesh
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Clear}
        {()}
        {Deletes all points and triangles}
        {15.9}
\begin{cxxdoc}
Deletes all points and triangles
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {IsInside}
        {(\ const\ CAAMPoint\ \&p\ )\ const\ }
        {}
        {15.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut p} & The point to test  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if the point is inside, otherwise false.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-14-2000
\strut}
\begin{cxxdoc}


Performs a hit test on the point p.                        


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {IsInside}
        {(\ const\ CAAMPoint\ \&p,\ int\ \&triangle,\ double\ \&alpha,\ double\ \&beta,\ double\ \&gamma\ )\ const\ }
        {Performs a hit test on the point p. }
        {15.11}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut p} & The point to test  
\\
{\tt\strut triangle} & Triangle index.
\\
{\tt\strut alpha} & Relative position on triangle (barycentric coordinate).
\\
{\tt\strut beta} & Relative position on triangle (barycentric coordinate).
\\
{\tt\strut gamme} & Relative position on triangle (barycentric coordinate).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if the point is inside, otherwise false.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-14-2000
\strut}
\begin{cxxdoc}


Performs a hit test on the point p.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMMesh}
        {()}
        {Constructor. }
        {15.12}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-15-2000
\strut}
\begin{cxxdoc}


Constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMMesh}
        {()}
        {Destructor. }
        {15.13}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-15-2000
\strut}
\begin{cxxdoc}


Destructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Insert}
        {(\ const\ CAAMPoint\ \&p\ )}
        {Adds a point to the end. }
        {15.14}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut p} & Point to add.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-15-2000
\strut}
\begin{cxxdoc}


Adds a point to the end.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ReplacePoints}
        {(const\ CAAMShape\ \&s)}
        {Replaces the points in the mesh. }
        {15.15}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & Shape to fecth points from.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-14-2003
\strut}
\begin{cxxdoc}


Replaces the points in the mesh with the one given by a
shape. Preserves the triangles.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Insert}
        {(\ const\ CAAMTriangle\ \&t\ )}
        {Adds a triangle to the end. }
        {15.16}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut t} & Triangle to add.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-15-2000
\strut}
\begin{cxxdoc}


Adds a triangle to the end.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {ToMatlab}
        {(const\ CString\&\ sFilename)\ const\ }
        {}
        {15.17}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & The filename to be written. The file isoverwritten if it already exists.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Zero} & on succes, non-zero if the mesh is empty.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-11-2000
\strut}
\begin{cxxdoc}


Writes mesh structure to a matlab file containing three
vectors:

xTri	X-points.
yTri	Y-points.
Tri		Triangles defined as an (ntriangles x 3) matrix.
Thus each row defines a triangle using three
indices pointing to the point-vectors.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {Area}
        {()\ const\ }
        {Returns the total area of all triangles in the mesh. }
        {15.18}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & area.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-15-2000
\strut}
\begin{cxxdoc}


Returns the total area of all triangles in the mesh.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMMesh\&}
        {operator=}
        {(const\ CAAMMesh\ \&m)}
        {Assignment operator. }
        {15.19}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-14-2000
\strut}
\begin{cxxdoc}


Assignment operator.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMMesh}
        {(\ const\ CAAMMesh\ \&m\ )}
        {Copy constructor. }
        {15.20}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut m} & Mesh to copy.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-14-2000
\strut}
\begin{cxxdoc}


Copy constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxvariable}
{std::vector\<CAAMTriangle\>\ }
        {m\_vTriangles}
        {}
        {A vector of triangles}
        {15.1}
\begin{cxxdoc}
A vector of triangles
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{std::vector\<CAAMPoint\>\ }
        {m\_vPoints}
        {}
        {A vector of points}
        {15.2}
\begin{cxxdoc}
A vector of points
\end{cxxdoc}
\end{cxxvariable}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMModel}
        {:\ public\ CAAMObject}
        {The core Active Apperance Model object. }
        {16}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-19-2000
\strut}
\cxxSee{CAAMBuilder
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{16}{CAAMModel}{}
\cxxInheritanceEntry{\cxxNone\cxxLinkPubright}{17}{CAAMModelMS}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{struct\ }
        {CAAMOptState}
        {}
        {Stores interates from the optimization process. }
        {16.1}
\cxxitem{class\ }
        {CAAMOptRes}
        {}
        {Stores optimization results. }
        {16.2}
\cxxitem{const\ CDMatrix\&}
        {Rc}
        {()\ const\ }
        {Texture parameter update prediction matrix}
        {16.18}
\cxxitem{const\ CDMatrix\&}
        {Rt}
        {()\ const\ }
        {Pose parameter update prediction matrix}
        {16.19}
\cxxitem{const\ CDMatrix\&}
        {Qg}
        {()\ const\ }
        {The texture part of the combined PCA eigenvectors}
        {16.20}
\cxxitem{const\ CDMatrix\&}
        {Qs}
        {()\ const\ }
        {The shape part of the combined PCA eigenvectors}
        {16.21}
\cxxitem{const\ CAAMReferenceFrame\&}
        {ReferenceFrame}
        {()\ const\ }
        {Returns the reference frame of the model}
        {16.22}
\cxxitem{inline\ \ \ int}
        {NBands}
        {()\ const\ }
        {Returns the number of bands in the model}
        {16.23}
\cxxitem{int}
        {NTextureSamples}
        {()\ const\ }
        {Returns the number of samples in the texture model}
        {16.24}
\cxxitem{inline\ \ \ bool}
        {IsConvexHullUsed}
        {()\ const\ }
        {Returns true if the texture model is based on the convex hull}
        {16.25}
\cxxitem{inline\ \ \ double}
        {AddExtents}
        {()\ const\ }
        {Returns the amount shape extents added (warning: shape extents will be remove in later versions)}
        {16.26}
\cxxitem{inline\ \ \ const\ CAAMShape\&}
        {MeanShape}
        {()\ const\ }
        {Returns the mean shape}
        {16.27}
\cxxitem{inline\ \ \ const\ CDVector\&}
        {MeanTexture}
        {()\ const\ }
        {Returns the mean texture}
        {16.28}
\cxxitem{inline\ \ \ int}
        {ReductionFactor}
        {()\ const\ }
        {Returns the reduction factor of the training set that this model was built on}
        {16.29}
\cxxitem{inline\ \ \ const\ CAAMDeformPCA\&}
        {ShapePCA}
        {()\ const\ }
        {Returns the shape PCA}
        {16.30}
\cxxitem{inline\ \ \ const\ CAAMDeformPCA\&}
        {TexturePCA}
        {()\ const\ }
        {Returns the texture PCA}
        {16.31}
\cxxitem{inline\ \ \ const\ CAAMDeformPCA\&}
        {CombinedPCA}
        {()\ const\ }
        {Returns the combined PCA}
        {16.32}
\cxxitem{inline\ \ \ double}
        {MeanShapeSize}
        {()\ const\ }
        {Returns the mean shape size, ie.}
        {16.33}
\cxxitem{}
        {CAAMModel}
        {()}
        {Constructor. Set up the default settings. }
        {16.34}
\cxxitem{}
        {\cxxtilde CAAMModel}
        {()}
        {Destructor. }
        {16.35}
\cxxitem{bool}
        {ApproxExample}
        {(\ const\ CString\ \&filename,\ CDMultiBand\<TAAMPixel\>\ \&outImg\ )\ const\ }
        {Doing model approximation of an (unseen) example. }
        {16.36}
\cxxitem{void}
        {SetPoseParameterUpdateConstraints}
        {(\ const\ CDVector\ \&pc\ )}
        {Sets constraints on the pose parameter updates. }
        {16.37}
\cxxitem{void}
        {SetShapeParameterUpdateConstraints}
        {(\ const\ CDVector\ \&mean,\ const\ CDVector\ \&sd\ )}
        {Sets user-specified shape parameter update constraints. }
        {16.38}
\cxxitem{void}
        {ConstrainSearchParameters}
        {(\ CDVector\ \&c,\ CDVector\ \&pose\ )\ const\ }
        {Constrain the pose and model parameters. }
        {16.39}
\cxxitem{bool}
        {EstimatePose}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ image,\ const\ CAAMShape\ \&shape,\ CDVector\ \&pose\ )\ const\ }
        {Estimate the pose of a shape using the pose regression matrix. }
        {16.40}
\cxxitem{void}
        {ModelImage}
        {(\ const\ CDVector\ \&c,\ CDMultiBand\<TAAMPixel\>\ \&outImg,\ const\ CAAMShape*\ matchPose,\ const\ bool\ fitTexture\ )\ const\ }
        {Generates a model image based on the parameters in 'c'. }
        {16.41}
\cxxitem{void}
        {ModelImageEx}
        {(\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&texture,\ CDMultiBand\<TAAMPixel\>\ \&outImg,\ const\ bool\ renderImage,\ const\ bool\ fitTexture\ )\ const\ }
        {Generates a synthetic image from the AAM.			 }
        {16.42}
\cxxitem{void}
        {ShapeFreeImage}
        {(\ const\ CDVector\ \&textureSamples,\ CDMultiBand\<TAAMPixel\>\ \&outImg,\ const\ bool\ deMap\ )\ const\ }
        {Generates a shape free image using a vector of texture samples. }
        {16.43}
\cxxitem{void}
        {ShapeFreeImage}
        {(\ const\ CDVector\ \&textureSamples,\ CDMatrix\ \&m,\ const\ bool\ deMap,\ const\ bool\ normalize\ )\ const\ }
        {Generates a shape free image using a vector of texture samples. }
        {16.44}
\cxxitem{double}
        {ModelEstimateTexDiff}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ const\ CDVector\ \&c,\ CAAMShape\ \&estimate,\ CDVector\ \&diff,\ const\ int\ similaritym,\ const\ bool\ useInterpolation\ )\ const\ }
        {Calculates the pixel difference from a model instance and an image. }
        {16.45}
\cxxitem{void}
        {NormalizeTexture}
        {(CDVector\ \&texture)\ const\ }
        {Normalizes a texture vector. }
        {16.46}
\cxxitem{CAAMModel::CAAMOptRes}
        {OptimizeModel}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ CAAMShape\ \&s,\ CDVector\ \&c,\ const\ int\ maxIterations,\ std::vector\<CAAMOptState\>*\ pOptStates,\ bool\ disableDamping\ )\ const\ }
        {Performs AAM optimization of a shape. }
        {16.47}
\cxxitem{CAAMModel::CAAMOptRes}
        {OptimizeModelByFineTuning}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ CAAMShape\ \&s,\ CDVector\ \&c,\ const\ int\ maxIterations,\ const\ int\ similaritym,\ const\ int\ optimizer\ )\ const\ }
        {Perform general-purpose optimization of the AAM.  }
        {16.48}
\cxxitem{bool}
        {ReadModel}
        {(\ const\ CString\ \&filename\ )}
        {Reads the complete AAMModel from disk. }
        {16.49}
\cxxitem{int}
        {SampleShape}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ const\ CAAMShape\ \&shape,\ CDVector\ \&textureSamples,\ const\ bool\ normalize,\ const\ bool\ useInterpolation,\ const\ bool\ map\ )\ const\ }
        {Builds a texture vector from an image and a shape. }
        {16.50}
\cxxitem{void}
        {ShapeInstance}
        {(\ const\ CDVector\ \&c,\ CAAMShape\ \&outShape\ )\ const\ }
        {Generates a shape based on a set of model parameters. }
        {16.51}
\cxxitem{void}
        {TextureInstance}
        {(\ const\ CDVector\ \&c,\ CDVector\ \&outTexture\ )\ const\ }
        {Generates a texture based on a set of model parameters. }
        {16.52}
\cxxitem{void}
        {ShapePCAInstance}
        {(\ const\ CDVector\ \&b\_s,\ CAAMShape\ \&outShape\ )\ const\ }
        {Generates a shape based on a set of shape b-parameters. }
        {16.53}
\cxxitem{void}
        {ShapeTex2Combined}
        {(\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&texture,\ CDVector\ \&c\ )\ const\ }
        {Projects the shape and texture into c-space. }
        {16.54}
\cxxitem{void}
        {ShapeTex2Param}
        {(\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&texture,\ CDVector\ \&b\ )\ const\ }
        {Extract the b-parameters from a shape and corresponding texture. }
        {16.55}
\cxxitem{void}
        {ShapeTexParam2Combined}
        {(\ const\ CDVector\ \&b,\ CDVector\ \&c\ )\ const\ }
        {Transforms the concatenated b-parameters into c-parameters. }
        {16.56}
\cxxitem{bool}
        {WriteModel}
        {(\ const\ CString\ \&filename,\ const\ bool\ txt\_only\ )\ const\ }
        {Writes the complete AAMModel to disk as a .txt and an .amf file. }
        {16.57}
\cxxitem{void}
        {WriteVarianceMap}
        {(\ const\ CString\ \&filename\ )\ const\ }
        {Plots the pixel variance into the mean shape. }
        {16.58}
\cxxitem{const\ CAAMShape\&}
        {ReferenceShape}
        {()\ const\ }
        {Returns the reference shape. }
        {16.59}
\cxxitem{void}
        {ShapeTexParam2Combined}
        {(\ const\ std::vector\<CDVector\>\ \&bVectors,\ std::vector\<CDVector\>\ \&cVectors\ )\ const\ }
        {Converts a set of b-vectors to combined model parameters (c-vectors). }
        {16.60}
\cxxitem{}
        {CAAMModel}
        {(\ const\ CAAMModel\ \&m\ )}
        {Copy constructor. }
        {16.61}
\cxxitem{CAAMModel\&}
        {operator=}
        {(const\ CAAMModel\ \&m)}
        {Assignment operator. }
        {16.62}
\cxxitem{void}
        {Shape2Combined}
        {(\ const\ CAAMShape\ \&shape,\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ CDVector\ \&c\ )\ const\ }
        {Projects a shape into a set of c parameters. }
        {16.63}
\cxxitem{void}
        {Shape2Param}
        {(\ const\ CAAMShape\ \&shape,\ CDVector\ \&b\_s\ )\ const\ }
        {Projects a shape into a set of shape parameters. }
        {16.64}
\cxxitem{void}
        {Combined2ShapeParam}
        {(\ const\ CDVector\ \&c,\ CDVector\ \&b\_s\ )\ const\ }
        {Converts combined model parameters to shape parameters. }
        {16.65}
\cxxitem{void}
        {Combined2TexParam}
        {(\ const\ CDVector\ \&c,\ CDVector\ \&b\_g\ )\ const\ }
        {Converts combined model parameters to texture parameters. }
        {16.66}
\cxxitem{void}
        {ShapeTexParam2Combined}
        {(\ const\ CDVector\ \&b\_s,\ const\ CDVector\ \&b\_g,\ CDVector\ \&c\ )\ const\ }
        {Projects shape and texture parameters into the combined eigenspace. }
        {16.67}
\end{cxxpublic}
\begin{cxxprotected}
\cxxitem{CAAMDeformPCA}
        {m\_ShapePCA}
        {}
        {The shape PCA}
        {16.3}
\cxxitem{CAAMDeformPCA}
        {m\_TexturePCA}
        {}
        {The texture PCA}
        {16.4}
\cxxitem{CAAMDeformPCA}
        {m\_CombinedPCA}
        {}
        {The combined PCA}
        {16.5}
\cxxitem{CDMatrix}
        {m\_mShape2PixelWeights}
        {}
        {The shape-to-pixel weights}
        {16.6}
\cxxitem{double}
        {m\_dAMFVersion}
        {}
        {The AMF format version}
        {16.7}
\cxxitem{CDMatrix}
        {m\_mQsEV}
        {}
        {The shape part of the combined eigenvectors}
        {16.8}
\cxxitem{CDMatrix}
        {m\_mQgEV}
        {}
        {The texture part of the combined eigenvectors}
        {16.9}
\cxxitem{CDVector}
        {m\_vMeanTexture}
        {}
        {The mean texture}
        {16.10}
\cxxitem{CAAMShape}
        {m\_sMeanAShape}
        {}
        {Cached mean shape}
        {16.11}
\cxxitem{CDMatrix}
        {m\_mShapeInstance}
        {}
        {Cache matrix}
        {16.12}
\cxxitem{CDMatrix}
        {m\_mTextureInstance}
        {}
        {Cache matrix}
        {16.13}
\cxxitem{CDVector}
        {m\_vTextureVar}
        {}
        {The variance of each normalized pixel in the texture model}
        {16.14}
\cxxitem{int}
        {m\_iTextureSamples}
        {}
        {The number of texture samples in the model}
        {16.15}
\cxxitem{CDMatrix}
        {m\_R\_c}
        {}
        {The parameter prediction matricies}
        {16.16}
\cxxitem{CAAMTransferFunction*}
        {m\_pTextureTF}
        {}
        {The texture transfer function}
        {16.17}
\end{cxxprotected}
\begin{cxxdoc}


The core Active Apperance Model object that hold all eigenmodels,
prediction matrices etc. Build by a CAAMBuilder.


\end{cxxdoc}
\begin{cxxunion}
{struct\ }
        {CAAMOptState}
        {}
        {Stores interates from the optimization process. }
        {16.1}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-10-2000
\strut}
\begin{cxxnames}
\cxxitem{}
        {CAAMOptState}
        {(\ double\ e,\ const\ CAAMShape\ \&s,\ const\ CDVector\ \&\_c,\ int\ d\ )}
        {Constructor}
        {16.1.1}
\cxxitem{CAAMOptState\&}
        {operator=}
        {(const\ CAAMOptState\ \&os)}
        {Assignment operator}
        {16.1.2}
\end{cxxnames}
\begin{cxxdoc}


Stores interates from the optimization process.

\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMOptState}
        {(\ double\ e,\ const\ CAAMShape\ \&s,\ const\ CDVector\ \&\_c,\ int\ d\ )}
        {Constructor}
        {16.1.1}
\begin{cxxdoc}
Constructor
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMOptState\&}
        {operator=}
        {(const\ CAAMOptState\ \&os)}
        {Assignment operator}
        {16.1.2}
\begin{cxxdoc}
Assignment operator
\end{cxxdoc}
\end{cxxfunction}
\end{cxxunion}
\begin{cxxclass}
{class\ }
        {CAAMOptRes}
        {}
        {Stores optimization results. }
        {16.2}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-10-2000
\strut}
\begin{cxxpublic}
\cxxitem{}
        {CAAMOptRes}
        {()}
        {Constructor}
        {16.2.4}
\cxxitem{}
        {CAAMOptRes}
        {(\ const\ double\ maha,\ const\ int\ nIterations,\ const\ double\ sm\ )}
        {Constructor}
        {16.2.5}
\cxxitem{inline\ \ \ int}
        {NIter}
        {()\ const\ }
        {Returns the number of iterations}
        {16.2.6}
\cxxitem{inline\ \ \ double}
        {Mahalanobis}
        {()\ const\ }
        {Returns the Mahalanobis Distance of the model parameters}
        {16.2.7}
\cxxitem{inline\ \ \ double}
        {SimilarityMeasure}
        {()\ const\ }
        {Returns the similarity measure}
        {16.2.8}
\end{cxxpublic}
\begin{cxxprivate}
\cxxitem{int}
        {m\_nIterations}
        {}
        {The number of iterations}
        {16.2.1}
\cxxitem{double}
        {m\_dMaha}
        {}
        {The Mahalanobis Distance of the model parameters}
        {16.2.2}
\cxxitem{double}
        {m\_dSimilarityMeasure}
        {}
        {The similarity measure value at optimum}
        {16.2.3}
\end{cxxprivate}
\begin{cxxdoc}


Stores optimization results.

\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMOptRes}
        {()}
        {Constructor}
        {16.2.4}
\begin{cxxdoc}
Constructor
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMOptRes}
        {(\ const\ double\ maha,\ const\ int\ nIterations,\ const\ double\ sm\ )}
        {Constructor}
        {16.2.5}
\begin{cxxdoc}
Constructor
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ int}
        {NIter}
        {()\ const\ }
        {Returns the number of iterations}
        {16.2.6}
\begin{cxxdoc}
Returns the number of iterations
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ double}
        {Mahalanobis}
        {()\ const\ }
        {Returns the Mahalanobis Distance of the model parameters}
        {16.2.7}
\begin{cxxdoc}
Returns the Mahalanobis Distance of the model parameters
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ double}
        {SimilarityMeasure}
        {()\ const\ }
        {Returns the similarity measure}
        {16.2.8}
\begin{cxxdoc}
Returns the similarity measure
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxvariable}
{int}
        {m\_nIterations}
        {}
        {The number of iterations}
        {16.2.1}
\begin{cxxdoc}
The number of iterations
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{double}
        {m\_dMaha}
        {}
        {The Mahalanobis Distance of the model parameters}
        {16.2.2}
\begin{cxxdoc}
The Mahalanobis Distance of the model parameters
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{double}
        {m\_dSimilarityMeasure}
        {}
        {The similarity measure value at optimum}
        {16.2.3}
\begin{cxxdoc}
The similarity measure value at optimum
\end{cxxdoc}
\end{cxxvariable}
\end{cxxclass}
\begin{cxxfunction}
{const\ CDMatrix\&}
        {Rc}
        {()\ const\ }
        {Texture parameter update prediction matrix}
        {16.18}
\begin{cxxdoc}
Texture parameter update prediction matrix
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ CDMatrix\&}
        {Rt}
        {()\ const\ }
        {Pose parameter update prediction matrix}
        {16.19}
\begin{cxxdoc}
Pose parameter update prediction matrix
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ CDMatrix\&}
        {Qg}
        {()\ const\ }
        {The texture part of the combined PCA eigenvectors}
        {16.20}
\begin{cxxdoc}
The texture part of the combined PCA eigenvectors
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ CDMatrix\&}
        {Qs}
        {()\ const\ }
        {The shape part of the combined PCA eigenvectors}
        {16.21}
\begin{cxxdoc}
The shape part of the combined PCA eigenvectors
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ CAAMReferenceFrame\&}
        {ReferenceFrame}
        {()\ const\ }
        {Returns the reference frame of the model}
        {16.22}
\begin{cxxdoc}
Returns the reference frame of the model
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ int}
        {NBands}
        {()\ const\ }
        {Returns the number of bands in the model}
        {16.23}
\begin{cxxdoc}
Returns the number of bands in the model
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {NTextureSamples}
        {()\ const\ }
        {Returns the number of samples in the texture model}
        {16.24}
\begin{cxxdoc}
Returns the number of samples in the texture model
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ bool}
        {IsConvexHullUsed}
        {()\ const\ }
        {Returns true if the texture model is based on the convex hull}
        {16.25}
\begin{cxxdoc}
Returns true if the texture model is based on the convex hull
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ double}
        {AddExtents}
        {()\ const\ }
        {Returns the amount shape extents added (warning: shape extents will be remove in later versions)}
        {16.26}
\begin{cxxdoc}
Returns the amount shape extents added (warning: shape extents will be remove in later versions)
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ const\ CAAMShape\&}
        {MeanShape}
        {()\ const\ }
        {Returns the mean shape}
        {16.27}
\begin{cxxdoc}
Returns the mean shape
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ const\ CDVector\&}
        {MeanTexture}
        {()\ const\ }
        {Returns the mean texture}
        {16.28}
\begin{cxxdoc}
Returns the mean texture
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ int}
        {ReductionFactor}
        {()\ const\ }
        {Returns the reduction factor of the training set that this model was built on}
        {16.29}
\begin{cxxdoc}
Returns the reduction factor of the training set that this model was built on
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ const\ CAAMDeformPCA\&}
        {ShapePCA}
        {()\ const\ }
        {Returns the shape PCA}
        {16.30}
\begin{cxxdoc}
Returns the shape PCA
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ const\ CAAMDeformPCA\&}
        {TexturePCA}
        {()\ const\ }
        {Returns the texture PCA}
        {16.31}
\begin{cxxdoc}
Returns the texture PCA
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ const\ CAAMDeformPCA\&}
        {CombinedPCA}
        {()\ const\ }
        {Returns the combined PCA}
        {16.32}
\begin{cxxdoc}
Returns the combined PCA
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ double}
        {MeanShapeSize}
        {()\ const\ }
        {Returns the mean shape size, ie.}
        {16.33}
\begin{cxxdoc}
Returns the mean shape size, ie. the size of the reference shape.
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMModel}
        {()}
        {Constructor. Set up the default settings. }
        {16.34}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-16-2000
\strut}
\begin{cxxdoc}


Constructor. Set up the default settings.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMModel}
        {()}
        {Destructor. }
        {16.35}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-16-2000
\strut}
\begin{cxxdoc}


Destructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ApproxExample}
        {(\ const\ CString\ \&filename,\ CDMultiBand\<TAAMPixel\>\ \&outImg\ )\ const\ }
        {Doing model approximation of an (unseen) example. }
        {16.36}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & The base filename of an annotation. Ex. "scan.asf"						
\\
{\tt\strut outImg} & The output image where the model approximation hasbeen overlaid.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false if the image and/or annotation could not be read.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-6-2000
\strut}
\begin{cxxdoc}


Synthesizes an unseen example by projecting the shape and
(normalized) texture into c-parameter space, generating a
model instance and assigning it the appropriate pose 
(incl. denormalization).


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetPoseParameterUpdateConstraints}
        {(\ const\ CDVector\ \&pc\ )}
        {Sets constraints on the pose parameter updates. }
        {16.37}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut pc} & Parameter constraints (in absolute numbers). 
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-30-2002
\strut}
\cxxSee{ConstrainSearchParameters
\strut}
\begin{cxxdoc}


Sets constraints on the pose parameter updates.

NOTICE: Currently, these are *not* saved along
with the model and thus must be set each
time a model is loaded.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetShapeParameterUpdateConstraints}
        {(\ const\ CDVector\ \&mean,\ const\ CDVector\ \&sd\ )}
        {Sets user-specified shape parameter update constraints. }
        {16.38}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut mean} & Some shape parameter configuration.
\\
{\tt\strut sd} & The standard diviations of the 'mean'.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-4-2002
\strut}
\begin{cxxdoc}


Sets user-specified shape parameter update constraints.
NOTICE: These are currently not saved with the model.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ConstrainSearchParameters}
        {(\ CDVector\ \&c,\ CDVector\ \&pose\ )\ const\ }
        {Constrain the pose and model parameters. }
        {16.39}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut c} & The model parameters.
\\
{\tt\strut pose} & The pose parameters.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-20-2000
\strut}
\begin{cxxdoc}


Constrain the pose and model parameters to be within some
reasonable limits.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {EstimatePose}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ image,\ const\ CAAMShape\ \&shape,\ CDVector\ \&pose\ )\ const\ }
        {Estimate the pose of a shape using the pose regression matrix. }
        {16.40}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & The image to search in.
\\
{\tt\strut shape} & The shape to determine the pose from.
\\
{\tt\strut pose} & The output pose vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & is ok, false if the shape is outside the image.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-27-2000
\strut}
\cxxSee{ ($\rightarrow$, {\em page \pageref{cxx.}})\strut}
\begin{cxxdoc}


Estimate the pose of a shape using the pose regression
matrix.

\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ModelImage}
        {(\ const\ CDVector\ \&c,\ CDMultiBand\<TAAMPixel\>\ \&outImg,\ const\ CAAMShape*\ matchPose,\ const\ bool\ fitTexture\ )\ const\ }
        {Generates a model image based on the parameters in 'c'. }
        {16.41}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut c} & A set of model parameters.
\\
{\tt\strut outImg} & The output imge.  
\\
{\tt\strut matchPose} & A pointer to a shape. If not NULL the modelgenerated by the set of c-parameters will bealigned wrt. pose to this shape.
\\
{\tt\strut fitTexture} & If matchPose is not NULL, the de-mapped and de-normalized texture will be fitted in a least squares sense to the texture in outImg given by the shape. Default true.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-29-2000
\strut}
\begin{cxxdoc}


Generates a model image based on the parameters in 'c'
with various options.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ModelImageEx}
        {(\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&texture,\ CDMultiBand\<TAAMPixel\>\ \&outImg,\ const\ bool\ renderImage,\ const\ bool\ fitTexture\ )\ const\ }
        {Generates a synthetic image from the AAM.			 }
        {16.42}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut shape} & The shape the texture vector should be mapped to.							
\\
{\tt\strut textureSamples} & The texture vector to be warped into an image.Will be de-mapped and de-normalized.
\\
{\tt\strut outImg} & The output image (sized correctly inside thismethod, if renderInImage is false).
\\
{\tt\strut renderImage} & If true:1) outImg is expected to be allocated.2) the model is rendered with it'spose unchanged, thus the shape isexpected to lie within the outImg	                                                               This option is used for drawing the final optimization into the image or to draw amodel approximation into the image 'outImg'.Default false.
\\
{\tt\strut fitTexture} & If renderImage is true, the de-mapped and de-normalized texture will be fitted in a least squares sense to the texture in outImg given by the shape. Default true.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-24-2000
\strut}
\cxxSee{ ($\rightarrow$, {\em page \pageref{cxx.}})\strut}
\begin{cxxdoc}


Generates a synthetic image from the AAM using the model
parameters in 'c'.

\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ShapeFreeImage}
        {(\ const\ CDVector\ \&textureSamples,\ CDMultiBand\<TAAMPixel\>\ \&outImg,\ const\ bool\ deMap\ )\ const\ }
        {Generates a shape free image using a vector of texture samples. }
        {16.43}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut textureSamples} & The texture vector to be warped into an image.De-normalizes (and demaps) inside this method.
\\
{\tt\strut outImg} & A reference to an output image. Resize of theimage is done inside this method.                               
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-21-2000
\strut}
\cxxSee{ModelImage
\strut}
\begin{cxxdoc}


Generates a shape free image (that is; a mean shape image) 
using a vector of texture samples.			


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ShapeFreeImage}
        {(\ const\ CDVector\ \&textureSamples,\ CDMatrix\ \&m,\ const\ bool\ deMap,\ const\ bool\ normalize\ )\ const\ }
        {Generates a shape free image using a vector of texture samples. }
        {16.44}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut textureSamples} & The texture vector to be warped into an image.De-normalizes (and demaps) inside this method.
\\
{\tt\strut m} & A reference to an output image on matrix form. Resize of the matrix is done inside this method.                               
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-21-2000
\strut}
\cxxSee{ModelImage
\strut}
\begin{cxxdoc}


Generates a shape free image (that is; a mean shape image) 
using a vector of texture samples.			


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {ModelEstimateTexDiff}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ const\ CDVector\ \&c,\ CAAMShape\ \&estimate,\ CDVector\ \&diff,\ const\ int\ similaritym,\ const\ bool\ useInterpolation\ )\ const\ }
        {Calculates the pixel difference from a model instance and an image. }
        {16.45}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & The image (input)
\\
{\tt\strut c} & Model parameters (in/output).
\\
{\tt\strut estimate} & The shape estimate (in/output).
\\
{\tt\strut diff} & The pixel difference vector (output) Resized inside.  
\\
{\tt\strut similaritym} & Set the used similarity measure:0	Non-normalised L\_2 norm (default)1	The "Mahalanobis" distance (texture samples areregarded independent to increase performance).2	The Lorentzian error norm.3   Absolute auto correlation of the residuals.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & similarity measure.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-27-2000
\strut}
\begin{cxxdoc}


Calculates the pixel difference from a model instance and an image.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {NormalizeTexture}
        {(CDVector\ \&texture)\ const\ }
        {Normalizes a texture vector. }
        {16.46}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut texture} & Texture to be normalized.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-6-2000
\strut}
\begin{cxxdoc}


Normalizes a texture vector.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMModel::CAAMOptRes}
        {OptimizeModel}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ CAAMShape\ \&s,\ CDVector\ \&c,\ const\ int\ maxIterations,\ std::vector\<CAAMOptState\>*\ pOptStates,\ bool\ disableDamping\ )\ const\ }
        {Performs AAM optimization of a shape. }
        {16.47}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & The image to search in.
\\
{\tt\strut s} & The initial shape (also containing the inital pose, thus;not a normalized shape). Actually only the pose of 's' is used (to align the reference shape as the initial shape).NOTE: The optimal shape is returned in 's' after execution.
\\
{\tt\strut c} & The initial model parameters. If this vector is empty, it isresized correctly and set equal to zero, thus the mean model.NOTE: The optimal model parameters are returned in 'c' after execution. 
\\
{\tt\strut maxIterations} & The maximum iterations allowed.  
\\
{\tt\strut pOptStates} & Optional parameter all convergence info can be returned in.See CAAMOptState.
\\
{\tt\strut disableDamping} & Disables the damping steps (default false).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & results of the optimization in the form of a 'CAAMOptRes' instance.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-7-2002
\strut}
\begin{cxxdoc}


Performs AAM optimization of a shape containing initial pose and
a set of model parameters (c).  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMModel::CAAMOptRes}
        {OptimizeModelByFineTuning}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ CAAMShape\ \&s,\ CDVector\ \&c,\ const\ int\ maxIterations,\ const\ int\ similaritym,\ const\ int\ optimizer\ )\ const\ }
        {Perform general-purpose optimization of the AAM.  }
        {16.48}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & The image beeing searched in.
\\
{\tt\strut s} & The inital shape pose.
\\
{\tt\strut c} & The initial model parameters.
\\
{\tt\strut maxIterations} & The maximum allowed number of iterations.
\\
{\tt\strut similaritym} & The used similarity measure for the optimization:0	Non-normalized L\_2 norm (default).1	The "Mahalanobis" distance (texture samples areregarded independent to increase performance).2	The Lorentzian error norm.
\\
{\tt\strut optimizer} & Sets the optimer to use:1	Steepest Descent (default)2	Conjugate Gradient3	Quasi-Newton, BFGS4	Pattern search5	Simulated annealing
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & final fit.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-7-2000
\strut}
\begin{cxxdoc}


Perform general-purpose optimization of the AAM using 
simulated annealing, conjugate gradient, steepest 
descent, BGFS or pattern search.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ReadModel}
        {(\ const\ CString\ \&filename\ )}
        {Reads the complete AAMModel from disk. }
        {16.49}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Input filename without any extension.  E.g. if the files on disk are'model.txt' \& 'model.amf' -\> filename = 'model'
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on file errors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-10-2000
\strut}
\cxxSee{WriteModel\ 
\strut}
\begin{cxxdoc}


Reads the complete AAMModel from disk.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {SampleShape}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ const\ CAAMShape\ \&shape,\ CDVector\ \&textureSamples,\ const\ bool\ normalize,\ const\ bool\ useInterpolation,\ const\ bool\ map\ )\ const\ }
        {Builds a texture vector from an image and a shape. }
        {16.50}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & The image to sample in.
\\
{\tt\strut textureSamples} & The normalized destination texture vector.
\\
{\tt\strut shape} & The shape to sample from (in image coordinates).							    
\\
{\tt\strut normalize} & Perform normalization after sampling.Default true.
\\
{\tt\strut map} & Perform mapping after sampling.Default true.   
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & number of samples done (zero if the shape is outside the image).
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-21-2000
\strut}
\begin{cxxdoc}


Builds a texture vector from an image and a shape.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ShapeInstance}
        {(\ const\ CDVector\ \&c,\ CAAMShape\ \&outShape\ )\ const\ }
        {Generates a shape based on a set of model parameters. }
        {16.51}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut c} & Input model parameters.
\\
{\tt\strut outShape} & The generated shape (resizing are done inside this method). 
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-24-2000
\strut}
\begin{cxxdoc}


Generates a shape based on a set of model parameters.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {TextureInstance}
        {(\ const\ CDVector\ \&c,\ CDVector\ \&outTexture\ )\ const\ }
        {Generates a texture based on a set of model parameters. }
        {16.52}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut c} & Input model parameters.
\\
{\tt\strut outShape} & The generated texture (resizing are done inside this method). 
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-24-2000
\strut}
\begin{cxxdoc}


Generates a texture based on a set of model parameters.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ShapePCAInstance}
        {(\ const\ CDVector\ \&b\_s,\ CAAMShape\ \&outShape\ )\ const\ }
        {Generates a shape based on a set of shape b-parameters. }
        {16.53}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut b\_s} & Shape parameters
\\
{\tt\strut outShape} & Output shape (resized inside method).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-28-2000
\strut}
\begin{cxxdoc}


Generates a shape based on a set of shape b-parameters.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ShapeTex2Combined}
        {(\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&texture,\ CDVector\ \&c\ )\ const\ }
        {Projects the shape and texture into c-space. }
        {16.54}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut shape} & The input shape aligned to the (aligned) mean shape.
\\
{\tt\strut texture} & The corresponding normalized texture.
\\
{\tt\strut c} & The resulting model parameters.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-27-2000
\strut}
\begin{cxxdoc}


Projects the shape and texture into c-space i.e. the
combined model parameters. 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ShapeTex2Param}
        {(\ const\ CAAMShape\ \&shape,\ const\ CDVector\ \&texture,\ CDVector\ \&b\ )\ const\ }
        {Extract the b-parameters from a shape and corresponding texture. }
        {16.55}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut shape} & The input shape aligned to the (aligned) mean shape.
\\
{\tt\strut texture} & The corresponding normalized texture.
\\
{\tt\strut b} & The resulting concatenated b vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-6-2000
\strut}
\begin{cxxdoc}


Extract the b-parameters from a shape and corresponding texture by
inverting the shape and texture pca projection.  

Assumes that the shape and texture PCA are done beforehand.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ShapeTexParam2Combined}
        {(\ const\ CDVector\ \&b,\ CDVector\ \&c\ )\ const\ }
        {Transforms the concatenated b-parameters into c-parameters. }
        {16.56}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut b} & Concatenated shape (weighted) and texture parameters
\\
{\tt\strut c} & Combined model parameters (resized inside function).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-28-2000
\strut}
\cxxSee{ShapeTex2Param
\strut}
\begin{cxxdoc}


Transforms the concatenated b-parameters into combined model
parameters.

\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {WriteModel}
        {(\ const\ CString\ \&filename,\ const\ bool\ txt\_only\ )\ const\ }
        {Writes the complete AAMModel to disk as a .txt and an .amf file. }
        {16.57}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Output filename without any extension.
\\
{\tt\strut txt\_only} & If true binary model data is not written.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on file errors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-10-2000
\strut}
\cxxSee{ReadModel
\strut}
\begin{cxxdoc}


Writes the complete AAMModel to disk as a .txt and an .amf file.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {WriteVarianceMap}
        {(\ const\ CString\ \&filename\ )\ const\ }
        {Plots the pixel variance into the mean shape. }
        {16.58}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Output image filename.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-4-2000
\strut}
\begin{cxxdoc}


Plots the variance of each pixel in the model over
the training set into the mean shape and saves the
image.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ CAAMShape\&}
        {ReferenceShape}
        {()\ const\ }
        {Returns the reference shape. }
        {16.59}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & reference shape.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-27-2000
\strut}
\begin{cxxdoc}


Returns the reference shape where all texture sampling
and comparison should be done. 

The reference shape is defined as the mean shape size to 
mean size and moved to the fourth quadrant.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ShapeTexParam2Combined}
        {(\ const\ std::vector\<CDVector\>\ \&bVectors,\ std::vector\<CDVector\>\ \&cVectors\ )\ const\ }
        {Converts a set of b-vectors to combined model parameters (c-vectors). }
        {16.60}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut bVectors} & The input b-vectors.
\\
{\tt\strut cVectors} & The output c-vectors.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-22-2000
\strut}
\begin{cxxdoc}


Converts a set of b-vectors to combined model parameters (c-vectors).


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMModel}
        {(\ const\ CAAMModel\ \&m\ )}
        {Copy constructor. }
        {16.61}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut m} & Object to copy from.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-27-2000
\strut}
\begin{cxxdoc}


Copy constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMModel\&}
        {operator=}
        {(const\ CAAMModel\ \&m)}
        {Assignment operator. }
        {16.62}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut m} & Object to copy from.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut This;} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-30-2000
\strut}
\begin{cxxdoc}


Assignment operator.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Shape2Combined}
        {(\ const\ CAAMShape\ \&shape,\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ CDVector\ \&c\ )\ const\ }
        {Projects a shape into a set of c parameters. }
        {16.63}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut shape} & The input shape (assumed to be in abs coordinates).
\\
{\tt\strut image} & The image where the shape is placed.
\\
{\tt\strut c} & The output combined model parameters.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-5-2000
\strut}
\begin{cxxdoc}


Projects a shape into a set of c parameters.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Shape2Param}
        {(\ const\ CAAMShape\ \&shape,\ CDVector\ \&b\_s\ )\ const\ }
        {Projects a shape into a set of shape parameters. }
        {16.64}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut shape} & The input shape (assumed to be in abs parameters).  
\\
{\tt\strut b} & The output shape model parameters.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-5-2000
\strut}
\begin{cxxdoc}


Projects a shape into a set of shape parameters,            


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Combined2ShapeParam}
        {(\ const\ CDVector\ \&c,\ CDVector\ \&b\_s\ )\ const\ }
        {Converts combined model parameters to shape parameters. }
        {16.65}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut c} & Combined model parameters.
\\
{\tt\strut b\_s} & Output non-weighted shape parameters.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-4-2002
\strut}
\begin{cxxdoc}


Converts combined model parameters to shape parameters.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Combined2TexParam}
        {(\ const\ CDVector\ \&c,\ CDVector\ \&b\_g\ )\ const\ }
        {Converts combined model parameters to texture parameters. }
        {16.66}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut c} & Combined model parameters.
\\
{\tt\strut b\_g} & Output texture parameters.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-4-2002
\strut}
\begin{cxxdoc}


Converts combined model parameters to texture parameters.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ShapeTexParam2Combined}
        {(\ const\ CDVector\ \&b\_s,\ const\ CDVector\ \&b\_g,\ CDVector\ \&c\ )\ const\ }
        {Projects shape and texture parameters into the combined eigenspace. }
        {16.67}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut b\_s} & Input shape parameters.
\\
{\tt\strut b\_g} & Input texture parameters.
\\
{\tt\strut c} & Resulting combined model parameters.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-4-2002
\strut}
\cxxSee{Combined2TexParam,\ Combined2ShapeParam
\strut}
\begin{cxxdoc}


Projects shape and texture parameters into the combined eigenspace.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxvariable}
{CAAMDeformPCA}
        {m\_ShapePCA}
        {}
        {The shape PCA}
        {16.3}
\begin{cxxdoc}
The shape PCA
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CAAMDeformPCA}
        {m\_TexturePCA}
        {}
        {The texture PCA}
        {16.4}
\begin{cxxdoc}
The texture PCA
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CAAMDeformPCA}
        {m\_CombinedPCA}
        {}
        {The combined PCA}
        {16.5}
\begin{cxxdoc}
The combined PCA
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CDMatrix}
        {m\_mShape2PixelWeights}
        {}
        {The shape-to-pixel weights}
        {16.6}
\begin{cxxdoc}
The shape-to-pixel weights
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{double}
        {m\_dAMFVersion}
        {}
        {The AMF format version}
        {16.7}
\begin{cxxdoc}
The AMF format version
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CDMatrix}
        {m\_mQsEV}
        {}
        {The shape part of the combined eigenvectors}
        {16.8}
\begin{cxxdoc}
The shape part of the combined eigenvectors
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CDMatrix}
        {m\_mQgEV}
        {}
        {The texture part of the combined eigenvectors}
        {16.9}
\begin{cxxdoc}
The texture part of the combined eigenvectors
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CDVector}
        {m\_vMeanTexture}
        {}
        {The mean texture}
        {16.10}
\begin{cxxdoc}
The mean texture
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CAAMShape}
        {m\_sMeanAShape}
        {}
        {Cached mean shape}
        {16.11}
\begin{cxxdoc}
Cached mean shape
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CDMatrix}
        {m\_mShapeInstance}
        {}
        {Cache matrix}
        {16.12}
\begin{cxxdoc}
Cache matrix
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CDMatrix}
        {m\_mTextureInstance}
        {}
        {Cache matrix}
        {16.13}
\begin{cxxdoc}
Cache matrix
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CDVector}
        {m\_vTextureVar}
        {}
        {The variance of each normalized pixel in the texture model}
        {16.14}
\begin{cxxdoc}
The variance of each normalized pixel in the texture model
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{int}
        {m\_iTextureSamples}
        {}
        {The number of texture samples in the model}
        {16.15}
\begin{cxxdoc}
The number of texture samples in the model
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CDMatrix}
        {m\_R\_c}
        {}
        {The parameter prediction matricies}
        {16.16}
\begin{cxxdoc}
The parameter prediction matricies
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CAAMTransferFunction*}
        {m\_pTextureTF}
        {}
        {The texture transfer function}
        {16.17}
\begin{cxxdoc}
The texture transfer function
\end{cxxdoc}
\end{cxxvariable}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMModelMS}
        {:\ public\ CAAMModel}
        {Multi-scale derivation of CAAModel. }
        {17}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-6-2002
\strut}
\cxxSee{CAAMModel
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft\cxxNone}
\cxxInheritanceEntry{\cxxNone}{16}{CAAMModel}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone\cxxNone}{17}{CAAMModelMS}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{inline\ \ \ const\ CAAMModel\&}
        {Model}
        {(\ const\ int\ i\ )\ const\ }
        {Get the model at level i}
        {17.1}
\cxxitem{inline\ \ \ const\ int}
        {NLevels}
        {()\ const\ }
        {Get the number of levels}
        {17.2}
\cxxitem{}
        {CAAMModelMS}
        {()}
        {Default multi-scale constructor. }
        {17.3}
\cxxitem{}
        {\cxxtilde CAAMModelMS}
        {()}
        {multi-scale destructor. }
        {17.4}
\cxxitem{void}
        {BuildAllLevels}
        {(\ const\ int\ nLevels,\ const\ CString\ \&inDir,\ const\ CString\ \&acf,\ const\ int\ modelReduction,\ const\ int\ excludeShape\ )}
        {Diver method for model generation. }
        {17.5}
\cxxitem{void}
        {BuildAllLevels}
        {(\ const\ int\ nLevels,\ const\ std::vector\<CString\>\ \&asfFiles,\ const\ CString\ \&acf,\ const\ int\ modelReduction,\ const\ int\ excludeShape\ )}
        {Diver method for model generation. }
        {17.6}
\cxxitem{bool}
        {WriteModel}
        {(\ const\ CString\ \&filename,\ const\ bool\ txt\_only\ )\ const\ }
        {Writes the complete multi-scale AAMModel to disk as a set of .txt and an .amf files. }
        {17.7}
\cxxitem{bool}
        {ReadModel}
        {(\ const\ CString\ \&basename\ )}
        {Reads the complete AAMModel from disk. }
        {17.8}
\cxxitem{CAAMModel::CAAMOptRes}
        {OptimizeModel}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ CAAMShape\ \&s,\ CDVector\ \&c,\ const\ int\ maxIterations,\ std::vector\<CAAMOptState\>*\ pOptStates,\ bool\ disableDamping\ )\ const\ }
        {Performs AAM optimization of a shape (using a model pyramid). }
        {17.9}
\cxxitem{void}
        {BuildPyr}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image\ )\ const\ }
        {Builds an image pyramid (if its not cached beforehand). }
        {17.10}
\end{cxxpublic}
\begin{cxxdoc}


Multi-scale derivation of CAAModel. 
Smaller models are stored in m\_vModels.


\end{cxxdoc}
\begin{cxxfunction}
{inline\ \ \ const\ CAAMModel\&}
        {Model}
        {(\ const\ int\ i\ )\ const\ }
        {Get the model at level i}
        {17.1}
\begin{cxxdoc}
Get the model at level i
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ const\ int}
        {NLevels}
        {()\ const\ }
        {Get the number of levels}
        {17.2}
\begin{cxxdoc}
Get the number of levels
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMModelMS}
        {()}
        {Default multi-scale constructor. }
        {17.3}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-6-2002
\strut}
\begin{cxxdoc}


Default multi-scale constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMModelMS}
        {()}
        {multi-scale destructor. }
        {17.4}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-6-2002
\strut}
\begin{cxxdoc}


multi-scale destructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {BuildAllLevels}
        {(\ const\ int\ nLevels,\ const\ CString\ \&inDir,\ const\ CString\ \&acf,\ const\ int\ modelReduction,\ const\ int\ excludeShape\ )}
        {Diver method for model generation. }
        {17.5}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut nLevels} & The number of levels the multi-scale AAM should be in.Default 3.
\\
{\tt\strut inDir} & Input directory where annotations (.asf) resides.
\\
{\tt\strut acf} & Filename of an AAM configuration file. If omitted defaults are used.
\\
{\tt\strut modelReduction} & Model reduction multiplier. Default off == 1.                            This sets the size of the lowest level in the model pyramid, i.e. level 0.
\\
{\tt\strut excludeShape} & Excludes one shape number 'excludeShape'from the input directory. Default -1, i.e.no shapes are removed.Used to perform leave-one-out testing.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-14-2000
\strut}
\begin{cxxdoc}


This method automates the model generation as much as possible
by using the various class methods for all the sequences in the
task of producing a model.           


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {BuildAllLevels}
        {(\ const\ int\ nLevels,\ const\ std::vector\<CString\>\ \&asfFiles,\ const\ CString\ \&acf,\ const\ int\ modelReduction,\ const\ int\ excludeShape\ )}
        {Diver method for model generation. }
        {17.6}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut nLevels} & The number of levels the multi-scale AAM should be in.Default 3.
\\
{\tt\strut asfFiles} & Vector of asf filenames.
\\
{\tt\strut acf} & Filename of an AAM configuration file. If omitted defaults are used.
\\
{\tt\strut modelReduction} & Model reduction multiplier. Default off == 1.                            This sets the size of the lowest level in the model pyramid, i.e. level 0.
\\
{\tt\strut excludeShape} & Excludes one shape number 'excludeShape'from the input directory. Default -1, i.e.no shapes are removed.Used to perform leave-one-out testing.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-6-2002
\strut}
\begin{cxxdoc}


This method automates the model generation as much as possible
by using the various class methods for all the sequences in the
task of producing a model.           


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {WriteModel}
        {(\ const\ CString\ \&filename,\ const\ bool\ txt\_only\ )\ const\ }
        {Writes the complete multi-scale AAMModel to disk as a set of .txt and an .amf files. }
        {17.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Output filename without any extension. Multi-scale prefixes will be added.
\\
{\tt\strut txt\_only} & If true binary model data is not written.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on file errors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-6-2002
\strut}
\cxxSee{ReadModel
\strut}
\begin{cxxdoc}


Writes the complete multi-scale AAMModel to disk as a set of .txt and an .amf files.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ReadModel}
        {(\ const\ CString\ \&basename\ )}
        {Reads the complete AAMModel from disk. }
        {17.8}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Input filename without any extension and scale prefixes.E.g. if the files on disk are'model\_msl\<level\>.txt' \& 'model\_msl\<level\>.amf' -\> filename = 'model'
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on file errors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-6-2002
\strut}
\cxxSee{WriteModel\ 
\strut}
\begin{cxxdoc}


Reads the complete AAMModel from disk.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMModel::CAAMOptRes}
        {OptimizeModel}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ CAAMShape\ \&s,\ CDVector\ \&c,\ const\ int\ maxIterations,\ std::vector\<CAAMOptState\>*\ pOptStates,\ bool\ disableDamping\ )\ const\ }
        {Performs AAM optimization of a shape (using a model pyramid). }
        {17.9}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & The image to search in (in size corresponding to level zero).
\\
{\tt\strut s} & The initial shape (also containing the inital pose, thus;not a normalized shape). Actually only the pose of 's' is used (to align the reference shape as the initial shape).NOTE: The optimal shape is returned in 's' after execution.NOTE: 's' is defined at level 0, i.e. shapes should have thesame size as when calling CAAMModel::OptimizeModel()directly.
\\
{\tt\strut c} & The optimal model parameters at level zero. UnlikeCAAMModel::OptimizeModel() the content of this vector is notused, since the optimisation is started the smallest (i.e. top)level of the pyramid.NOTE: The optimal model parameters are returned in 'c' after execution. 
\\
{\tt\strut maxIterations} & The maximum iterations allowed at each level.
\\
{\tt\strut pOptStates} & Optional parameter convergence info (at level zero)can be returned in. See CAAMOptState.
\\
{\tt\strut disableDamping} & Disables the damping steps (default false).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & results of the optimization in the form of a 'CAAMOptRes' instance.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-6-2002
\strut}
\begin{cxxdoc}


Performs AAM optimization of a shape containing initial 
pose using a model pyramid.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {BuildPyr}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&image\ )\ const\ }
        {Builds an image pyramid (if its not cached beforehand). }
        {17.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & Input image that should be convertet to a pyramid.This image is assumed to live to the *complete*usage of the pyramid, since level 0 is a pointerto this image.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-6-2002
\strut}
\begin{cxxdoc}


Builds an image pyramid (if its not cached beforehand).
The pyramid is stored in m\_VImagePyr.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMModelSeq}
        {:\ public\ CAAMObject}
        {AAM sequence object. }
        {18}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-20-2003
\strut}
\cxxSee{CAAMModel,\ CAAMModelMS
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{18}{CAAMModelSeq}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{inline\ \ \ const\ CAAMModel\&}
        {Model}
        {(\ const\ int\ i\ )\ const\ }
        {Get the model at level i}
        {18.1}
\cxxitem{inline\ \ \ const\ int}
        {NModels}
        {()\ const\ }
        {Get the number of models}
        {18.2}
\cxxitem{inline\ \ \ const\ CAAMModel\&}
        {FinalModel}
        {()\ const\ }
        {Get the final model}
        {18.3}
\cxxitem{int}
        {ModelScale}
        {(int\ i)\ const\ }
        {Returns the model reduction at that level}
        {18.4}
\cxxitem{}
        {CAAMModelSeq}
        {()}
        {Default multi-scale constructor. }
        {18.5}
\cxxitem{}
        {\cxxtilde CAAMModelSeq}
        {()}
        {Destructor. }
        {18.6}
\cxxitem{void}
        {BuildFromSACF}
        {(\ const\ CString\ \&SACF,\ const\ CString\ \&inDir,\ const\ int\ excludeShape\ )}
        {Diver method for model generation. }
        {18.7}
\cxxitem{void}
        {BuildFromSACF}
        {(\ const\ CString\ \&SACF,\ const\ std::vector\<CString\>\ \&asfFiles,\ const\ int\ excludeShape\ )}
        {Diver method for model generation. }
        {18.8}
\cxxitem{bool}
        {WriteModels}
        {(\ const\ CString\ \&filename,\ const\ bool\ txt\_only\ )\ const\ }
        {Writes the sequence AAM to disk as a set of .txt and .amf files. }
        {18.9}
\cxxitem{bool}
        {ReadModels}
        {(\ const\ CString\ \&samf\ )}
        {Reads the complete AAMModel from disk. }
        {18.10}
\cxxitem{void}
        {ScaleShape2Model}
        {(\ const\ int\ model,\ CAAMShape\ \&shape\ )\ const\ }
        {Scale a shape defined in 'FinalModel' coordinates  to 'model' coordinates. }
        {18.11}
\cxxitem{void}
        {ScaleShape2Final}
        {(\ const\ int\ model,\ CAAMShape\ \&shape\ )\ const\ }
        {Scale a shape defined in 'model' coordinates  to 'FinalModel' coordinates. }
        {18.12}
\end{cxxpublic}
\begin{cxxdoc}


AAM sequence object. This is a generalisation of a multi-scale model.


\end{cxxdoc}
\begin{cxxfunction}
{inline\ \ \ const\ CAAMModel\&}
        {Model}
        {(\ const\ int\ i\ )\ const\ }
        {Get the model at level i}
        {18.1}
\begin{cxxdoc}
Get the model at level i
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ const\ int}
        {NModels}
        {()\ const\ }
        {Get the number of models}
        {18.2}
\begin{cxxdoc}
Get the number of models
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ const\ CAAMModel\&}
        {FinalModel}
        {()\ const\ }
        {Get the final model}
        {18.3}
\begin{cxxdoc}
Get the final model
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {ModelScale}
        {(int\ i)\ const\ }
        {Returns the model reduction at that level}
        {18.4}
\begin{cxxdoc}
Returns the model reduction at that level
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMModelSeq}
        {()}
        {Default multi-scale constructor. }
        {18.5}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-20-2003
\strut}
\begin{cxxdoc}


Default multi-scale constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMModelSeq}
        {()}
        {Destructor. }
        {18.6}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-20-2003
\strut}
\begin{cxxdoc}


Destructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {BuildFromSACF}
        {(\ const\ CString\ \&SACF,\ const\ CString\ \&inDir,\ const\ int\ excludeShape\ )}
        {Diver method for model generation. }
        {18.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut SACF} & Filename of a sequence ACF, which is a file containing a list of acfs, one per line. E.g.\<BOF\>scale4\_convex\_hull.acfscale4\_whiskers.acfscale4.acfscale2.acfscale1.acf\<EOF\>
\\
{\tt\strut inDir} & Input directory where annotations (.asf) resides.
\\
{\tt\strut excludeShape} & Excludes one shape number 'excludeShape'from the input directory. Default -1, i.e.no shapes are removed.Used to perform leave-one-out testing.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-20-2003
\strut}
\begin{cxxdoc}


This method automates the model generation as much as possible
by using the various class methods for all the sequences in the
task of producing a model.           


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {BuildFromSACF}
        {(\ const\ CString\ \&SACF,\ const\ std::vector\<CString\>\ \&asfFiles,\ const\ int\ excludeShape\ )}
        {Diver method for model generation. }
        {18.8}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut SACF} & Filename of a sequence ACF, which is a file containing a list of acfs, one per line. E.g.\<BOF\>scale4\_convex\_hull.acfscale4\_whiskers.acfscale4.acfscale2.acfscale1.acf\<EOF\>
\\
{\tt\strut asfFiles} & Vector of asf filenames.
\\
{\tt\strut excludeShape} & Excludes one shape number 'excludeShape'from the input directory. Default -1, i.e.no shapes are removed.Used to perform leave-one-out testing.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-20-2003
\strut}
\begin{cxxdoc}


This method automates the model generation as much as possible
by using the various class methods for all the sequences in the
task of producing a model.           


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {WriteModels}
        {(\ const\ CString\ \&filename,\ const\ bool\ txt\_only\ )\ const\ }
        {Writes the sequence AAM to disk as a set of .txt and .amf files. }
        {18.9}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Filename of the output .samf-file.
\\
{\tt\strut txt\_only} & If true, binary model data is not written.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on file errors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-20-2003
\strut}
\cxxSee{ReadModel
\strut}
\begin{cxxdoc}


Writes the sequence AAM to disk as a set of .txt and .amf files.
Filenames are determined from the ACF file names.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ReadModels}
        {(\ const\ CString\ \&samf\ )}
        {Reads the complete AAMModel from disk. }
        {18.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Input filename (.samf).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on file errors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-20-2003
\strut}
\cxxSee{WriteModel\ 
\strut}
\begin{cxxdoc}


Reads the complete AAMModel from disk.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ScaleShape2Model}
        {(\ const\ int\ model,\ CAAMShape\ \&shape\ )\ const\ }
        {Scale a shape defined in 'FinalModel' coordinates  to 'model' coordinates. }
        {18.11}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut model} & The model the input shape are scaled to.
\\
{\tt\strut shape} & Input shape, which going to be scaled.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut } & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-20-2003
\strut}
\cxxSee{ScaleShape2Final
\strut}
\begin{cxxdoc}


Scale a shape defined in 'FinalModel' coordinates 
to 'model' coordinates .


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ScaleShape2Final}
        {(\ const\ int\ model,\ CAAMShape\ \&shape\ )\ const\ }
        {Scale a shape defined in 'model' coordinates  to 'FinalModel' coordinates. }
        {18.12}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut model} & The model the input shape are scaled from.
\\
{\tt\strut shape} & Input shape, which going to be scaled.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-20-2003
\strut}
\cxxSee{ScaleShape2Model
\strut}
\begin{cxxdoc}


Scale a shape defined in 'model' coordinates 
to 'FinalModel' coordinates.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMMovieAVI}
        {}
        {Implements a simple AVI writer. }
        {19}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
9-20-2000
\strut}
\begin{cxxpublic}
\cxxitem{}
        {CAAMMovieAVI}
        {(\ int\ framesPerSecond\ )}
        {}
        {19.1}
\cxxitem{void}
        {WriteStill}
        {(\ CVisImage\<CVisRGBABytePixel\>\ image,\ const\ int\ duration\ \ )}
        {Writes one image as a still in a movie. }
        {19.2}
\cxxitem{void}
        {WriteStill}
        {(\ CDMultiBand\<TAAMPixel\>\ image,\ const\ int\ duration\ \ )}
        {Writes one image as a still in a movie. }
        {19.3}
\end{cxxpublic}
\begin{cxxdoc}


Implements a simple AVI writer. Based on the
old CVisAviStreamHandler code, but partly 
rewritten and extented. Credit to the VisionSDK group.

\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMMovieAVI}
        {(\ int\ framesPerSecond\ )}
        {}
        {19.1}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut } & \\
{\tt\strut } & \end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut } & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
9-20-2000
\strut}
\cxxSee{ ($\rightarrow$, {\em page \pageref{cxx.}})\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {WriteStill}
        {(\ CVisImage\<CVisRGBABytePixel\>\ image,\ const\ int\ duration\ \ )}
        {Writes one image as a still in a movie. }
        {19.2}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & An RGBA image.  
\\
{\tt\strut duration} & Duration in ms.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-22-2000
\strut}
\begin{cxxdoc}


Writes one image as a still in a movie given a
certain duration.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {WriteStill}
        {(\ CDMultiBand\<TAAMPixel\>\ image,\ const\ int\ duration\ \ )}
        {Writes one image as a still in a movie. }
        {19.3}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & A grayscale image. 
\\
{\tt\strut duration} & Duration in ms.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-22-2000
\strut}
\begin{cxxdoc}


Writes one image as a still in a movie given a
certain duration.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMObject}
        {}
        {Abstract base object for the AAM-API. }
        {20}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-19-2000
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry[x]{}{20}{CAAMObject}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{34}{CAAMWarp}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{31}{CAAMUtil}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{27}{CAAMTransferFunction}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{26}{CAAMTest}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{24}{CAAMShapeCollection}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{23}{CAAMShape}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{32}{CAAMPropsReader}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{21}{CAAMOptimize}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{18}{CAAMModelSeq}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{16}{CAAMModel}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{15}{CAAMMesh}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{11}{CAAMLog}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{10}{CAAMLinearReg}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{8}{CAAMInitialize}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{7}{CAAMDelaunay}{}
\cxxInheritanceEntry{\cxxLinkPubRight}{5}{CAAMDeform}{}
\cxxInheritanceEntry{\cxxLinkPubright}{4}{CAAMBuilder}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{}
        {CAAMObject}
        {()}
        {Constructor. }
        {20.1}
\cxxitem{}
        {\cxxtilde CAAMObject}
        {()}
        {Destructor. }
        {20.2}
\cxxitem{void}
        {ToFile}
        {(\ const\ char*\ szFilename\ )\ const\ }
        {Write the object to a binary file. }
        {20.3}
\cxxitem{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Write the object to a binary file. }
        {20.4}
\cxxitem{void}
        {FromFile}
        {(\ const\ char*\ szFilename\ )}
        {Reads an object from a binary file. }
        {20.5}
\cxxitem{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads an object from a binary file. }
        {20.6}
\cxxitem{void}
        {Dump}
        {(\ const\ char*\ szPath\ )\ const\ }
        {Writes object specific data to text file(s). }
        {20.7}
\end{cxxpublic}
\begin{cxxdoc}


Abstract base object for the AAM-API. Doesn't do much
aside from devising a common way to save and dump objects.

\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMObject}
        {()}
        {Constructor. }
        {20.1}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-19-2000
\strut}
\begin{cxxdoc}


Constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMObject}
        {()}
        {Destructor. }
        {20.2}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-19-2000
\strut}
\begin{cxxdoc}


Destructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ToFile}
        {(\ const\ char*\ szFilename\ )\ const\ }
        {Write the object to a binary file. }
        {20.3}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut szFilename} & Destination filename.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.@throws} & CVisError
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-18-2000
\strut}
\cxxSee{FromFile
\strut}
\begin{cxxdoc}


Write the object to a binary file. This is 
a very old-school load/save function. 
Maybe we should look into serialization some day.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Write the object to a binary file. }
        {20.4}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Handle to an open file.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.@throws} & CVisError
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-18-2000
\strut}
\cxxSee{FromFile
\strut}
\begin{cxxdoc}


Write the object to a binary file. This is 
a very old-school load/save function. 
Maybe we should look into serialization some day.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {FromFile}
        {(\ const\ char*\ szFilename\ )}
        {Reads an object from a binary file. }
        {20.5}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut szFilename} & Destination filename.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.@throws} & CVisError
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-18-2000
\strut}
\cxxSee{ToFile
\strut}
\begin{cxxdoc}


Reads the object to a binary file. This is 
a very old-school load/save function. 
Maybe we should look into serialization some day.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads an object from a binary file. }
        {20.6}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Handle to an open file.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.@throws} & CVisError
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-18-2000
\strut}
\cxxSee{ToFile
\strut}
\begin{cxxdoc}


Reads the object to a binary file. This is 
a very old-school load/save function. 
Maybe we should look into serialization some day.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Dump}
        {(\ const\ char*\ szPath\ )\ const\ }
        {Writes object specific data to text file(s). }
        {20.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut szPath} & Path including terminating backslash   where the data is dumped.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.@throws} & CVisError
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-18-2000
\strut}
\begin{cxxdoc}


Debug method that provides a human readable
file dump of the object data.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMOptimize}
        {:\ public\ CDOptimizeFuncBase,\ CAAMObject}
        {General purpose optimization of the AAM. }
        {21}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-8-2000
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{}{CDOptimizeFuncBase}{\cxxPubleft}
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubLeft}
\cxxInheritanceEntry[x]{\cxxNone}{21}{CAAMOptimize}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{inline\ \ \ double}
        {EvalFunction}
        {(CDVector\&\ vX)}
        {Fuction to be optimized. }
        {21.9}
\cxxitem{void}
        {OptResults}
        {(\ CDVector\ \&c,\ CAAMShape\ \&s,\ double\ \&fit\ )}
        {Returns the optimisation results as c, shape and error. }
        {21.10}
\end{cxxpublic}
\begin{cxxprivate}
\cxxitem{const\ CAAMModel*}
        {m\_pModel}
        {}
        {The AAM}
        {21.1}
\cxxitem{const\ CAAMShape*}
        {m\_pShape}
        {}
        {The initial shape pose}
        {21.2}
\cxxitem{const\ CDMultiBand\<TAAMPixel\>\ *}
        {m\_pImage}
        {}
        {The image where the optimization shuold be done}
        {21.3}
\cxxitem{int}
        {m\_iSimilarityMeasure}
        {}
        {The similarity measure to be used}
        {21.4}
\cxxitem{CDVector}
        {m\_vDiff}
        {}
        {The difference vector}
        {21.5}
\cxxitem{double}
        {m\_dMinFit}
        {}
        {The minimum fit}
        {21.6}
\cxxitem{CAAMShape}
        {m\_sMinShape}
        {}
        {The minimum fit shape}
        {21.7}
\cxxitem{CDVector}
        {m\_vMinC}
        {}
        {The minimum fit model parameters}
        {21.8}
\end{cxxprivate}
\begin{cxxdoc}


Class for optimizing the AAM using traditional optimization
methods such as simluated annealingm, conjugated gradient, 
steepest descent, BGFS and pattern search.

\end{cxxdoc}
\begin{cxxfunction}
{inline\ \ \ double}
        {EvalFunction}
        {(CDVector\&\ vX)}
        {Fuction to be optimized. }
        {21.9}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vX} & The independent parameters that will be optimized.The first n-4 elements constitues the normal modelparameters of the AAM. The last four are the pose parameters.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & scalar fit of the AAM.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-7-2000
\strut}
\cxxSee{ ($\rightarrow$, {\em page \pageref{cxx.}})\strut}
\begin{cxxdoc}


Function providing a scalar interpretation of the 
AAM fit based on a set of paramters.

\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {OptResults}
        {(\ CDVector\ \&c,\ CAAMShape\ \&s,\ double\ \&fit\ )}
        {Returns the optimisation results as c, shape and error. }
        {21.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut c} & The optimal model parameters.
\\
{\tt\strut s} & The optimal shape.
\\
{\tt\strut s} & The optimal error.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-7-2000
\strut}
\begin{cxxdoc}


Returns the optimisation results as c, shape and error.
This is to avoid and extra conversion after ended 
optimisation, and worse, an extra image sampling to get
the error.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxvariable}
{const\ CAAMModel*}
        {m\_pModel}
        {}
        {The AAM}
        {21.1}
\begin{cxxdoc}
The AAM
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{const\ CAAMShape*}
        {m\_pShape}
        {}
        {The initial shape pose}
        {21.2}
\begin{cxxdoc}
The initial shape pose
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{const\ CDMultiBand\<TAAMPixel\>\ *}
        {m\_pImage}
        {}
        {The image where the optimization shuold be done}
        {21.3}
\begin{cxxdoc}
The image where the optimization shuold be done
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{int}
        {m\_iSimilarityMeasure}
        {}
        {The similarity measure to be used}
        {21.4}
\begin{cxxdoc}
The similarity measure to be used
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CDVector}
        {m\_vDiff}
        {}
        {The difference vector}
        {21.5}
\begin{cxxdoc}
The difference vector
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{double}
        {m\_dMinFit}
        {}
        {The minimum fit}
        {21.6}
\begin{cxxdoc}
The minimum fit
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CAAMShape}
        {m\_sMinShape}
        {}
        {The minimum fit shape}
        {21.7}
\begin{cxxdoc}
The minimum fit shape
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CDVector}
        {m\_vMinC}
        {}
        {The minimum fit model parameters}
        {21.8}
\begin{cxxdoc}
The minimum fit model parameters
\end{cxxdoc}
\end{cxxvariable}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMReferenceFrame}
        {}
        {The geometrical reference frame (or shape-free frame). }
        {22}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxpublic}
\cxxitem{bool}
        {UseConvexHull}
        {()\ const\ }
        {Returns true of the convex hull determines the shape extent}
        {22.1}
\cxxitem{const\ CAAMShape\&}
        {RefShape}
        {()\ const\ }
        {Returns the reference shape}
        {22.2}
\cxxitem{int}
        {NTextureSamples}
        {()\ const\ }
        {Returns the number of texture samples in the texture model}
        {22.3}
\cxxitem{const\ CAAMMesh\&}
        {RefMesh}
        {()\ const\ }
        {Returns the reference mesh}
        {22.4}
\cxxitem{const\ CDMultiBand\<TAAMPixel\>\ \&}
        {MaskImage}
        {()\ const\ }
        {Returns the mask image}
        {22.5}
\cxxitem{}
        {CAAMReferenceFrame}
        {()}
        {Constructor. }
        {22.6}
\cxxitem{CAAMReferenceFrame\&}
        {operator=}
        {(const\ CAAMReferenceFrame\ \&rf)}
        {Assignment operator. }
        {22.7}
\cxxitem{}
        {CAAMReferenceFrame}
        {(\ const\ CAAMReferenceFrame\ \&rf\ )}
        {Copy constructor. }
        {22.8}
\cxxitem{void}
        {Setup}
        {(\ const\ CAAMShape\ \&referenceShape,\ const\ bool\ useConvexHull\ )}
        {Sets up the class with the reference shape. }
        {22.9}
\cxxitem{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Writes the class data to disk.  }
        {22.10}
\cxxitem{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads the class data form disk.  }
        {22.11}
\cxxitem{void}
        {DebugDump}
        {()}
        {Writes some of the class data to disk. }
        {22.12}
\cxxitem{}
        {\cxxtilde CAAMReferenceFrame}
        {()}
        {Destructor. }
        {22.13}
\cxxitem{void}
        {CalcMaskImage}
        {(\ const\ bool\ useConvexHull\ )}
        {Calculates a reference mask image. }
        {22.14}
\cxxitem{void}
        {CalcScanLines}
        {()}
        {Calculates the scanlines of the mask image. }
        {22.15}
\cxxitem{double}
        {RefShapeWidth}
        {()\ const\ }
        {Returns the width of the reference shape. }
        {22.16}
\cxxitem{double}
        {RefShapeHeight}
        {()\ const\ }
        {Returns the height of the reference shape. }
        {22.17}
\cxxitem{void}
        {Image2Vector}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&refImg,\ CDVector\ \&v\ )\ const\ }
        {Conversion from shape-free image to a texture vector. }
        {22.18}
\cxxitem{void}
        {Vector2Image}
        {(\ const\ CDVector\ \&v,\ CDMultiBand\<TAAMPixel\>\ \&outImg\ )\ const\ }
        {Conversion from a texture vector to a shape-free image. }
        {22.19}
\cxxitem{void}
        {Vector2Matrix}
        {(\ const\ CDVector\ \&v,\ CDMatrix\ \&m\ )\ const\ }
        {Conversion from a texture vector to a shape-free matrix. }
        {22.20}
\cxxitem{int}
        {RefImageWidth}
        {()\ const\ }
        {Returns the width of the reference image. }
        {22.21}
\cxxitem{int}
        {RefImageHeight}
        {()\ const\ }
        {Returns the height of the reference image. }
        {22.22}
\cxxitem{bool}
        {FindTriangle}
        {(\ const\ CAAMPoint\ \&p,\ unsigned\ short\ \&triangle,\ double\ \&alpha,\ double\ \&beta,\ double\ \&gamma\ )\ const\ }
        {Find the corresponding triangle in the source mesh for a point. }
        {22.23}
\end{cxxpublic}
\begin{cxxdoc}


This class defined the geomtrical reference frame of an
AAM. Hence, it is the spatial layout where all texture
sampling takes place. 

The main objective of this class is to provide fast 
conversions from a shape-free image to a texture vector
and vice versa.

\end{cxxdoc}
\begin{cxxfunction}
{bool}
        {UseConvexHull}
        {()\ const\ }
        {Returns true of the convex hull determines the shape extent}
        {22.1}
\begin{cxxdoc}
Returns true of the convex hull determines the shape extent
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ CAAMShape\&}
        {RefShape}
        {()\ const\ }
        {Returns the reference shape}
        {22.2}
\begin{cxxdoc}
Returns the reference shape
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {NTextureSamples}
        {()\ const\ }
        {Returns the number of texture samples in the texture model}
        {22.3}
\begin{cxxdoc}
Returns the number of texture samples in the texture model
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ CAAMMesh\&}
        {RefMesh}
        {()\ const\ }
        {Returns the reference mesh}
        {22.4}
\begin{cxxdoc}
Returns the reference mesh
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ CDMultiBand\<TAAMPixel\>\ \&}
        {MaskImage}
        {()\ const\ }
        {Returns the mask image}
        {22.5}
\begin{cxxdoc}
Returns the mask image
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMReferenceFrame}
        {()}
        {Constructor. }
        {22.6}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Constructor. Sets up an empty reference frame. 
Use Setup() to make such an object any useful.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMReferenceFrame\&}
        {operator=}
        {(const\ CAAMReferenceFrame\ \&rf)}
        {Assignment operator. }
        {22.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut rf} & Object to copy from.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-13-2002
\strut}
\begin{cxxdoc}


Assignment operator.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMReferenceFrame}
        {(\ const\ CAAMReferenceFrame\ \&rf\ )}
        {Copy constructor. }
        {22.8}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut rf} & Reference frame object to be copied by construction.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-13-2002
\strut}
\begin{cxxdoc}


Copy constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Setup}
        {(\ const\ CAAMShape\ \&referenceShape,\ const\ bool\ useConvexHull\ )}
        {Sets up the class with the reference shape. }
        {22.9}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut referenceShape} & The reference shape.
\\
{\tt\strut useConvexHull} & If true the convex hull of the referenceshape is used to determine its extent.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Sets up the class with the reference shape 
and information about how to determine the extent
of the shape.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Writes the class data to disk.  }
        {22.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Open file handle to a binary file.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-13-2002
\strut}
\begin{cxxdoc}


This method writes the class data to disk. Actually it is
only the reference shape and the convex hull option that
is written. The rest is reconstructed during read.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads the class data form disk.  }
        {22.11}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Open file handle to a binary file.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-13-2002
\strut}
\begin{cxxdoc}


This method reads the class data from disk. Actually it is
only the reference shape and the convex hull option that
is read. The rest is reconstructed.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {DebugDump}
        {()}
        {Writes some of the class data to disk. }
        {22.12}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


This method writes the reference shape, the mask image 
and a test of the Image2Vector() and Vector2image() to 
the current directory.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMReferenceFrame}
        {()}
        {Destructor. }
        {22.13}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Destructor. Deletes any reference shape, mesh and mask image.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {CalcMaskImage}
        {(\ const\ bool\ useConvexHull\ )}
        {Calculates a reference mask image. }
        {22.14}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut useConvexHull} & If true the convex hull is used to definethe extent of the reference shape.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


This method calculates a reference mask image, where the
shape area is set to 255 and the background to zero.
The resulting image is stored in 'm\_pMaskImage'.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {CalcScanLines}
        {()}
        {Calculates the scanlines of the mask image. }
        {22.15}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


This method calculates the scanlines of the mask image. 
A scanline is a subpart of a horsontal image line that
is occupied but a subpart of the reference shape.

The resulting scanlines are used for quick'n'easy conversion
from spatial to vector layout (and back).

Scanlines are stored in 'm\_ScanlineParts'.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {RefShapeWidth}
        {()\ const\ }
        {Returns the width of the reference shape. }
        {22.16}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & width.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Returns the width of the reference shape.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {RefShapeHeight}
        {()\ const\ }
        {Returns the height of the reference shape. }
        {22.17}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & height.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Returns the height of the reference shape.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Image2Vector}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&refImg,\ CDVector\ \&v\ )\ const\ }
        {Conversion from shape-free image to a texture vector. }
        {22.18}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut refImg} & Destination reference image.
\\
{\tt\strut v} & Input texture vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\cxxSee{Vector2Image
\strut}
\begin{cxxdoc}


This method performs a quick conversion from a 
shape-free image to a texture vector.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Vector2Image}
        {(\ const\ CDVector\ \&v,\ CDMultiBand\<TAAMPixel\>\ \&outImg\ )\ const\ }
        {Conversion from a texture vector to a shape-free image. }
        {22.19}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut refImg} & Destination reference image.
\\
{\tt\strut v} & Input texture vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\cxxSee{Vector2Matrix,\ Image2Vector
\strut}
\begin{cxxdoc}


This method performs a quick conversion from a 
texture vector to a shape-free image.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Vector2Matrix}
        {(\ const\ CDVector\ \&v,\ CDMatrix\ \&m\ )\ const\ }
        {Conversion from a texture vector to a shape-free matrix. }
        {22.20}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut refImg} & Destination reference image.
\\
{\tt\strut v} & Input texture vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\cxxSee{Vector2Matrix,\ Image2Vector
\strut}
\begin{cxxdoc}


This method performs a quick conversion from a 
texture vector to a shape-free image on matrix 
form.

Will currently only work on single band AAMs.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {RefImageWidth}
        {()\ const\ }
        {Returns the width of the reference image. }
        {22.21}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & width.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Returns the width of the reference image.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {RefImageHeight}
        {()\ const\ }
        {Returns the height of the reference image. }
        {22.22}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & height.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Returns the height of the reference image.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {FindTriangle}
        {(\ const\ CAAMPoint\ \&p,\ unsigned\ short\ \&triangle,\ double\ \&alpha,\ double\ \&beta,\ double\ \&gamma\ )\ const\ }
        {Find the corresponding triangle in the source mesh for a point. }
        {22.23}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut p} & Input point
\\
{\tt\strut triangle} & Triangle index.
\\
{\tt\strut alpha} & Relative position on triangle (barycentric coordinate).
\\
{\tt\strut beta} & Relative position on triangle (barycentric coordinate).
\\
{\tt\strut gamma} & Relative position on triangle (barycentric coordinate).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if the point is inside the source mesh.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-7-2002
\strut}
\begin{cxxdoc}


Find the corresponding triangle in the source mesh for a point. 


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMShape}
        {:\ public\ CDVector,\ CAAMObject}
        {Shape container. }
        {23}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-08-2000
\strut}
\cxxSee{CAAMShapeCollection
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{}{CDVector}{\cxxPubleft}
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubLeft}
\cxxInheritanceEntry[x]{\cxxNone}{23}{CAAMShape}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{class\ }
        {CAAMPointInfo}
        {}
        {Auxiliary point data. }
        {23.1}
\cxxitem{inline\ \ \ const\ CString\&}
        {HostImage}
        {()\ const\ }
        {Host image (if any)}
        {23.10}
\cxxitem{void}
        {SetHostImage}
        {(\ const\ CString\ \&hostImageFilename\ )}
        {Returns the host image (if any).}
        {23.11}
\cxxitem{double}
        {Width}
        {()\ const\ }
        {Shape width}
        {23.12}
\cxxitem{double}
        {Height}
        {()\ const\ }
        {Shape height}
        {23.13}
\cxxitem{inline\ \ \ const\ int}
        {NPoints}
        {()\ const\ }
        {The number of shape points}
        {23.14}
\cxxitem{bool}
        {IsAbs}
        {()\ const\ }
        {Returns true if the shape is in absolute coordinates}
        {23.15}
\cxxitem{std::vector\<CAAMPointInfo\>\ \&}
        {PointAux}
        {()}
        {Returns the complete point aux vector of the shape}
        {23.16}
\cxxitem{const\ std::vector\<CAAMPointInfo\>\ \&}
        {PointAux}
        {()\ const\ }
        {Returns the complete point aux vector of the shape}
        {23.17}
\cxxitem{}
        {CAAMShape}
        {(int\ nbPoints)}
        {Constructs a shape with 'nbPoints' points.  }
        {23.18}
\cxxitem{}
        {CAAMShape}
        {(\ const\ CDVector\ \&v\ )}
        {Constructs a shape from a vector. Assumes closed path connectivity. }
        {23.19}
\cxxitem{}
        {CAAMShape}
        {(\ const\ CAAMShape\ \&s\ )}
        {Copy contructor. }
        {23.20}
\cxxitem{void}
        {SetClosedPathConnectivity}
        {()}
        {Sets all point to be connected in one closed path. }
        {23.21}
\cxxitem{CDVector\&}
        {operator=}
        {(double\ value)}
        {Assignment operator (double). }
        {23.22}
\cxxitem{CAAMShape\&}
        {operator=}
        {(const\ CAAMShape\ \&s)}
        {Assignment operator (CAAMShape). }
        {23.23}
\cxxitem{void}
        {CopyData}
        {(\ const\ CAAMShape\ \&s\ )}
        {Copies all data from a shape to this. }
        {23.24}
\cxxitem{CDVector\&}
        {operator=}
        {(const\ CVisDVector\ \&vIn)}
        {Assignment operator (CAAMShape). }
        {23.25}
\cxxitem{}
        {\cxxtilde CAAMShape}
        {()}
        {Shape destructor. }
        {23.26}
\cxxitem{void}
        {Rotate}
        {(\ const\ double\ theta,\ const\ bool\ aroundCOG\ )}
        {Rotates the shape. }
        {23.27}
\cxxitem{void}
        {Translate}
        {(\ const\ CAAMPoint\ \&p\ )}
        {Translates the shape. }
        {23.28}
\cxxitem{void}
        {Translate}
        {(\ const\ double\ x,\ const\ double\ y\ )}
        {Translates the shape. }
        {23.29}
\cxxitem{double}
        {ShapeSize}
        {()\ const\ }
        {Returns the 2-norm of this shape centralized. }
        {23.30}
\cxxitem{double}
        {MinX}
        {()\ const\ }
        {Find the maximum x component of the shape. }
        {23.31}
\cxxitem{double}
        {MaxX}
        {()\ const\ }
        {Find the maximum x component of the shape. }
        {23.32}
\cxxitem{double}
        {MinY}
        {()\ const\ }
        {Find the minimum y component of the shape. }
        {23.33}
\cxxitem{double}
        {MaxY}
        {()\ const\ }
        {Find the maximum y component of the shape. }
        {23.34}
\cxxitem{void}
        {Scale}
        {(\ const\ double\ s,\ const\ bool\ aroundCOG\ )}
        {Scales the shape. }
        {23.35}
\cxxitem{CAAMPoint}
        {COG}
        {()\ const\ }
        {Calculates the center of gravity of the shape. }
        {23.36}
\cxxitem{void}
        {COG}
        {(\ double\ \&x,\ double\ \&y\ )\ const\ }
        {Calculates the center of gravity of the shape. }
        {23.37}
\cxxitem{double}
        {Normalize}
        {()}
        {Normalize to unit scale and translates COG to origo. }
        {23.38}
\cxxitem{int}
        {SetPoint}
        {(\ int\ i,\ const\ double\ \&x,\ const\ double\ \&y)}
        {}
        {23.39}
\cxxitem{int}
        {SetPoint}
        {(\ const\ int\ i,\ const\ CAAMPoint\ \&p\ )}
        {}
        {23.40}
\cxxitem{int}
        {GetPoint}
        {(\ int\ i,\ double\ \&x,\ double\ \&y)\ const\ }
        {Returns the i'th point.  }
        {23.41}
\cxxitem{CAAMPoint}
        {GetPoint}
        {(\ int\ i\ )\ const\ }
        {Returns the i'th point. }
        {23.42}
\cxxitem{void}
        {Resize}
        {(int\ length,\ double*\ storage)}
        {Change number of shape points in the shape. }
        {23.43}
\cxxitem{void}
        {AlignTransformation}
        {(\ const\ CAAMShape\ \&ref,\ double\ \&scale,\ double\ \&theta,\ CAAMPoint\ \&t\ )\ const\ }
        {Returns the transformation that aligns this to 'ref' with respect to pose. }
        {23.44}
\cxxitem{double}
        {AlignTo}
        {(\ const\ CAAMShape\ \&ref,\ double*\ pTheta\ )}
        {Aligns this to 'ref' with respect to pose. }
        {23.45}
\cxxitem{double}
        {GetRotation}
        {(\ const\ CAAMShape\ \&ref\ )\ const\ }
        {Returns the rotation between ref and this (in radians). }
        {23.46}
\cxxitem{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads a shape from a file.  			 }
        {23.47}
\cxxitem{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Write the shape to a binary file. }
        {23.48}
\cxxitem{void}
        {Param2PoseVec}
        {(\ const\ double\ scale,\ const\ double\ theta,\ const\ double\ tx,\ const\ double\ ty,\ CDVector\ \&poseVec\ )}
        {Converts pose parameters: scale, theta, tx, ty to a pose vector. }
        {23.49}
\cxxitem{void}
        {PoseVec2Param}
        {(\ const\ CDVector\ \&poseVec,\ double\ \&scale,\ double\ \&theta,\ double\ \&tx,\ double\ \&ty\ )}
        {Converts a pose vector to pose parameters: scale, theta, tx, ty. }
        {23.50}
\cxxitem{void}
        {Displace}
        {(\ const\ CDVector\ \&poseVec\ )}
        {Displaces the shape around it's center of gravity. }
        {23.51}
\cxxitem{bool}
        {IsInsidePath}
        {(\ const\ CAAMPoint\ \&p,\ const\ int\ path\_start\ )\ const\ }
        {Tests if the point 'p' is inside the path starting at position 'path\_start'. Rarely used.  }
        {23.52}
\cxxitem{bool}
        {IsInside}
        {(\ const\ CAAMPoint\ \&p,\ bool\ bBoundTest\ )\ const\ }
        {Tests if the point 'p' belongs to the shape.  }
        {23.53}
\cxxitem{void}
        {Expand}
        {(\ int\ nPixels\ )}
        {Expands the shape (contraction can be done by using a negative nPixels). }
        {23.54}
\cxxitem{void}
        {Normal}
        {(\ const\ int\ i,\ CAAMPoint\&\ p1,\ CAAMPoint\&\ p2,\ const\ double\ dist\ )\ const\ }
        {Finds the normal to the i'th point on the shape. }
        {23.55}
\cxxitem{void}
        {NormalDisplacement}
        {(\ const\ int\ i,\ const\ double\ dist\ )}
        {Displaces the i-th point along the normal. }
        {23.56}
\cxxitem{bool}
        {WriteASF}
        {(\ const\ CString\ \&filename,\ const\ int\ image\_width,\ const\ int\ image\_height\ )}
        {Writes the shape to a ASF file. }
        {23.57}
\cxxitem{bool}
        {WriteASF0\_90}
        {(\ const\ CString\ \&filename,\ const\ int\ image\_width,\ const\ int\ image\_height\ )}
        {ASF writer version 0.90. }
        {23.58}
\cxxitem{bool}
        {ReadASF}
        {(\ const\ CString\ \&filename\ )}
        {Reads an ver. 0.90 .asf into relative coordinates. }
        {23.59}
\cxxitem{bool}
        {ReadASF0\_90}
        {(\ const\ CString\ \&filename\ )}
        {Reads an ver. 0.90 .asf into relative coordinates. }
        {23.60}
\cxxitem{void}
        {Abs2Rel}
        {(\ const\ CString\ hostImagePath\ )}
        {Converts shape coordinates from absolute to relative by using the hostimage. }
        {23.61}
\cxxitem{void}
        {Rel2Abs}
        {(\ const\ CString\ hostImagePath\ )}
        {Converts shape coordinates from relative to absolute by using the hostimage. }
        {23.62}
\cxxitem{void}
        {Abs2Rel}
        {(\ const\ int\ image\_width,\ const\ int\ image\_height\ )}
        {Converts shape coordinates from absolute to relative. }
        {23.63}
\cxxitem{void}
        {Rel2Abs}
        {(\ const\ int\ image\_width,\ const\ int\ image\_height\ )}
        {Converts shape coordinates from relative to absolute. }
        {23.64}
\cxxitem{void}
        {AddPath}
        {(\ const\ CAAMShape\ \&shape,\ const\ CAAMPointInfo\ \&pointType\ )}
        {Adds a path to the shape. }
        {23.65}
\cxxitem{void}
        {ReversePointOrder}
        {()}
        {Reverses the point point ordering. }
        {23.66}
\cxxitem{std::vector\<int\>\ }
        {GetPaths}
        {()\ const\ }
        {Extracts the starting positions of each path in the shape. }
        {23.67}
\cxxitem{int}
        {PathLen}
        {(\ const\ int\ startPosition\ )\ const\ }
        {Returns the length of a path. }
        {23.68}
\cxxitem{CAAMShape}
        {ExtractPath}
        {(\ const\ int\ startPosition\ )\ const\ }
        {Extracts one path from a shape. }
        {23.69}
\cxxitem{void}
        {AddShapeExtends}
        {(\ int\ nPixels\ )}
        {Adds an extra border on each outer path. }
        {23.70}
\cxxitem{void}
        {SetPointInfoFlagsInPath}
        {(\ const\ int\ startPosition,\ const\ int\ flags\ )}
        {Sets all flags in one path to the same value. }
        {23.71}
\cxxitem{void}
        {AddInterior}
        {(const\ int\ interations)}
        {Adds articifial interior points to the shape. }
        {23.72}
\cxxitem{bool}
        {ConsistencyCheck}
        {()}
        {Tests if any interior points has gone outside  outer path of the shape. }
        {23.73}
\cxxitem{void}
        {MakeBorderShape}
        {(\ int\ size\ )}
        {Converts a one path shape into a border shape. }
        {23.74}
\cxxitem{CAAMShape}
        {operator+}
        {(const\ CVisDVector\ \&v)\ const\ }
        {Plus operator. }
        {23.75}
\cxxitem{CAAMShape}
        {operator-}
        {(const\ CVisDVector\ \&v)\ const\ }
        {Minus operator. }
        {23.76}
\cxxitem{void}
        {GetHostImage}
        {(\ CDMultiBand\<TAAMPixel\>\ \&dest,\ const\ CString\ \&path,\ const\ int\ rfactor\ )\ const\ }
        {Retrives the image connected to the shape. }
        {23.77}
\cxxitem{double}
        {Area}
        {(\ bool\ use\_covex\_hull\ )\ const\ }
        {Returns the total area of the shape (with holes excluded). }
        {23.78}
\cxxitem{CAAMShape}
        {CalcConvexHull}
        {()\ const\ }
        {Calculates the convex hull of each path in the shape. }
        {23.79}
\cxxitem{bool}
        {IsConvex}
        {()\ const\ }
        {Tests if the shap is convex w.r.t. each path. }
        {23.80}
\cxxitem{void}
        {RemovePoint}
        {(\ const\ int\ i\ )}
        {Removes the i-th point from the shape. }
        {23.81}
\cxxitem{std::vector\<float\>\ \&}
        {UserField}
        {(\ const\ int\ field\_nb\ )}
        {Returns a reference to a user defined field vector. }
        {23.82}
\cxxitem{const\ std::vector\<float\>\ \&}
        {UserField}
        {(\ const\ int\ field\_nb\ )\ const\ }
        {Returns the value of a user defined field vector. }
        {23.83}
\cxxitem{void}
        {AllocateUserFields}
        {()}
        {Allocates room for the three user defined fields. }
        {23.84}
\end{cxxpublic}
\begin{cxxprivate}
\cxxitem{std::vector\<CAAMPointInfo\>\ }
        {m\_vPointAux}
        {}
        {Auxillary point data}
        {23.2}
\cxxitem{std::vector\<float\>\ }
        {m\_vUser1}
        {}
        {User-defined field 1 }
        {23.3}
\cxxitem{std::vector\<float\>\ }
        {m\_vUser2}
        {}
        {User-defined field 2}
        {23.4}
\cxxitem{std::vector\<float\>\ }
        {m\_vUser3}
        {}
        {User-defined field 3}
        {23.5}
\cxxitem{CString}
        {m\_szASFVer}
        {}
        {Current ASF version number}
        {23.6}
\cxxitem{int}
        {m\_iNbPoints}
        {}
        {The number of points}
        {23.7}
\cxxitem{bool}
        {m\_bAbsPointCoordinates}
        {}
        {Indicates if the point coordinates is in relative or absolute format}
        {23.8}
\cxxitem{CString}
        {m\_szHostImage}
        {}
        {Optional 'host image' filename including full path.}
        {23.9}
\end{cxxprivate}
\begin{cxxdoc}


This class act as a container for a shape. Essentially it's just
a set of 2D points stored in a vector in the format xxxyyy.


\end{cxxdoc}
\begin{cxxclass}
{class\ }
        {CAAMPointInfo}
        {}
        {Auxiliary point data. }
        {23.1}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-26-2000
\strut}
\cxxSee{CAAMShape
\strut}
\begin{cxxpublic}
\cxxitem{}
        {CAAMPointInfo}
        {()}
        {Constructor}
        {23.1.1}
\cxxitem{inline\ \ \ bool}
        {IsOuterEdge}
        {()\ const\ }
        {Point info method}
        {23.1.2}
\cxxitem{inline\ \ \ bool}
        {IsOriginal}
        {()\ const\ }
        {Point info method}
        {23.1.3}
\cxxitem{inline\ \ \ bool}
        {IsClosed}
        {()\ const\ }
        {Point info method}
        {23.1.4}
\cxxitem{inline\ \ \ bool}
        {IsHole}
        {()\ const\ }
        {Point info method}
        {23.1.5}
\cxxitem{inline\ \ \ void}
        {SetOuterEdge}
        {(\ bool\ enable\ =\ true\ )}
        {Sets whether the point belongs to an outer edge or not}
        {23.1.6}
\cxxitem{inline\ \ \ void}
        {SetOriginal}
        {(\ bool\ enable\ =\ true\ )}
        {Sets whether the point is an original model point or an artificial generated point}
        {23.1.7}
\cxxitem{inline\ \ \ void}
        {SetClosed}
        {(\ bool\ enable\ =\ true\ )}
        {Sets whether the point belongs to a closed or opened path}
        {23.1.8}
\cxxitem{inline\ \ \ void}
        {SetHole}
        {(\ bool\ enable\ =\ true\ )}
        {Sets whether the point belongs to an hole in the model}
        {23.1.9}
\end{cxxpublic}
\begin{cxxdoc}


Auxiliary point data. Needed as a part of the
enhanced shape representation extension [Which explains
why it's layered upon the CAAMShape class and not merged 
into it :-(].


\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMPointInfo}
        {()}
        {Constructor}
        {23.1.1}
\begin{cxxdoc}
Constructor
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ bool}
        {IsOuterEdge}
        {()\ const\ }
        {Point info method}
        {23.1.2}
\begin{cxxdoc}
Point info method
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ bool}
        {IsOriginal}
        {()\ const\ }
        {Point info method}
        {23.1.3}
\begin{cxxdoc}
Point info method
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ bool}
        {IsClosed}
        {()\ const\ }
        {Point info method}
        {23.1.4}
\begin{cxxdoc}
Point info method
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ bool}
        {IsHole}
        {()\ const\ }
        {Point info method}
        {23.1.5}
\begin{cxxdoc}
Point info method
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ void}
        {SetOuterEdge}
        {(\ bool\ enable\ =\ true\ )}
        {Sets whether the point belongs to an outer edge or not}
        {23.1.6}
\begin{cxxdoc}
Sets whether the point belongs to an outer edge or not
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ void}
        {SetOriginal}
        {(\ bool\ enable\ =\ true\ )}
        {Sets whether the point is an original model point or an artificial generated point}
        {23.1.7}
\begin{cxxdoc}
Sets whether the point is an original model point or an artificial generated point
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ void}
        {SetClosed}
        {(\ bool\ enable\ =\ true\ )}
        {Sets whether the point belongs to a closed or opened path}
        {23.1.8}
\begin{cxxdoc}
Sets whether the point belongs to a closed or opened path
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ void}
        {SetHole}
        {(\ bool\ enable\ =\ true\ )}
        {Sets whether the point belongs to an hole in the model}
        {23.1.9}
\begin{cxxdoc}
Sets whether the point belongs to an hole in the model
\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxfunction}
{inline\ \ \ const\ CString\&}
        {HostImage}
        {()\ const\ }
        {Host image (if any)}
        {23.10}
\begin{cxxdoc}
Host image (if any)
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetHostImage}
        {(\ const\ CString\ \&hostImageFilename\ )}
        {Returns the host image (if any).}
        {23.11}
\begin{cxxdoc}
Returns the host image (if any). 
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {Width}
        {()\ const\ }
        {Shape width}
        {23.12}
\begin{cxxdoc}
Shape width
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {Height}
        {()\ const\ }
        {Shape height}
        {23.13}
\begin{cxxdoc}
Shape height
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ const\ int}
        {NPoints}
        {()\ const\ }
        {The number of shape points}
        {23.14}
\begin{cxxdoc}
The number of shape points
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {IsAbs}
        {()\ const\ }
        {Returns true if the shape is in absolute coordinates}
        {23.15}
\begin{cxxdoc}
Returns true if the shape is in absolute coordinates
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{std::vector\<CAAMPointInfo\>\ \&}
        {PointAux}
        {()}
        {Returns the complete point aux vector of the shape}
        {23.16}
\begin{cxxdoc}
Returns the complete point aux vector of the shape
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ std::vector\<CAAMPointInfo\>\ \&}
        {PointAux}
        {()\ const\ }
        {Returns the complete point aux vector of the shape}
        {23.17}
\begin{cxxdoc}
Returns the complete point aux vector of the shape
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMShape}
        {(int\ nbPoints)}
        {Constructs a shape with 'nbPoints' points.  }
        {23.18}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut nbPoints} & The number of points the shape should contain.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-8-2000
\strut}
\cxxSee{SetClosedPathConnectivity
\strut}
\begin{cxxdoc}


Constructs a shape with 'nbPoints' points. 
Defaults to absolute point coordinates and single closed path connectivity.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMShape}
        {(\ const\ CDVector\ \&v\ )}
        {Constructs a shape from a vector. Assumes closed path connectivity. }
        {23.19}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & The input vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-8-2000
\strut}
\cxxSee{SetClosedPathConnectivity
\strut}
\begin{cxxdoc}


Constructs a shape from a vector.
Defaults to absolute point coordinates and single closed path connectivity.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMShape}
        {(\ const\ CAAMShape\ \&s\ )}
        {Copy contructor. }
        {23.20}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & The input shape.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-8-2000
\strut}
\begin{cxxdoc}


Copy contructor.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetClosedPathConnectivity}
        {()}
        {Sets all point to be connected in one closed path. }
        {23.21}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-26-2000
\strut}
\begin{cxxdoc}


Manipulates the aux point info such that the shape points 
is interpreted as one closed outer path defined clock-wise
with repect to it's normals.



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CDVector\&}
        {operator=}
        {(double\ value)}
        {Assignment operator (double). }
        {23.22}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut value} & The value to set all shape points to. 
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-26-2000
\strut}
\begin{cxxdoc}


Sets all x and y compoments of a shape equal to a double.
[Actually only used when calculating a mean shape -- 
since we want to accumulate in an empty shape].


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMShape\&}
        {operator=}
        {(const\ CAAMShape\ \&s)}
        {Assignment operator (CAAMShape). }
        {23.23}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & The shape to copy.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-9-2000
\strut}
\begin{cxxdoc}


Set one shape equal another.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {CopyData}
        {(\ const\ CAAMShape\ \&s\ )}
        {Copies all data from a shape to this. }
        {23.24}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & Shape to copy data from.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing,} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-20-2000
\strut}
\begin{cxxdoc}


Copies all data from a shape to this.
Called from the assignment operator.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CDVector\&}
        {operator=}
        {(const\ CVisDVector\ \&vIn)}
        {Assignment operator (CAAMShape). }
        {23.25}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vIn} & xxx-yyy formatted vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-26-2000
\strut}
\begin{cxxdoc}


Set the shape to be equal an xxx-yyy formatted vector.
NOTE: this method does not manipulate any connectivity
(i.e. point aux) info. So, if the shape beforehand was 
empty one should call SetClosedPathConnectivity() afterwards
this call to obtain sensible point aux info.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMShape}
        {()}
        {Shape destructor. }
        {23.26}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Rotate}
        {(\ const\ double\ theta,\ const\ bool\ aroundCOG\ )}
        {Rotates the shape. }
        {23.27}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut theta} & Rotation angle in radians.
\\
{\tt\strut aroundCOG} & If true the rotation is being done around the cog of the shape instead of around the globalcenter.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\begin{cxxdoc}


Rotates the shape 'theta' radians.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Translate}
        {(\ const\ CAAMPoint\ \&p\ )}
        {Translates the shape. }
        {23.28}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut p} & The offset to translate.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Translate}
        {(\ const\ double\ x,\ const\ double\ y\ )}
        {Translates the shape. }
        {23.29}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut x} & X-translation. 
\\
{\tt\strut y} & Y-translation. 
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {ShapeSize}
        {()\ const\ }
        {Returns the 2-norm of this shape centralized. }
        {23.30}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & 2-norm.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {MinX}
        {()\ const\ }
        {Find the maximum x component of the shape. }
        {23.31}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & x-maximum.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {MaxX}
        {()\ const\ }
        {Find the maximum x component of the shape. }
        {23.32}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & x-maximum.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {MinY}
        {()\ const\ }
        {Find the minimum y component of the shape. }
        {23.33}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & y-minimum.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {MaxY}
        {()\ const\ }
        {Find the maximum y component of the shape. }
        {23.34}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & y-maximum.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Scale}
        {(\ const\ double\ s,\ const\ bool\ aroundCOG\ )}
        {Scales the shape. }
        {23.35}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & Scale factor.
\\
{\tt\strut aroundCOG} & If true the scale is being done around the cog of the shape instead of around the globalcenter.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\begin{cxxdoc}


Scales the shape.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMPoint}
        {COG}
        {()\ const\ }
        {Calculates the center of gravity of the shape. }
        {23.36}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut p} & cog output.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\begin{cxxdoc}


Calculates the center of gravity of the shape
(actually it's the center of the centroid).


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {COG}
        {(\ double\ \&x,\ double\ \&y\ )\ const\ }
        {Calculates the center of gravity of the shape. }
        {23.37}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut x} & X cog output.
\\
{\tt\strut y} & X cog output.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\begin{cxxdoc}


Calculates the center of gravity of the shape
(actually it's the center of the centroid).


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {Normalize}
        {()}
        {Normalize to unit scale and translates COG to origo. }
        {23.38}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & 2-norm of the shape seen as a 2*nbPoint vector afterthe translation to origo.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-08-2000
\strut}
\begin{cxxdoc}


Normalizes the shape by translating it's center of gravity
to origo and scale by the reciprocal of the 2-norm.	


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {SetPoint}
        {(\ int\ i,\ const\ double\ \&x,\ const\ double\ \&y)}
        {}
        {23.39}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Zero.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-10-2000
\strut}
\begin{cxxdoc}


Overwrites the i'th point. 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {SetPoint}
        {(\ const\ int\ i,\ const\ CAAMPoint\ \&p\ )}
        {}
        {23.40}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Zero} & on success, non-zero if the point doesn't exists.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-10-2000
\strut}
\begin{cxxdoc}


Overwrites the i'th point. If the point doesn't exists,
non-zero is returned.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {GetPoint}
        {(\ int\ i,\ double\ \&x,\ double\ \&y)\ const\ }
        {Returns the i'th point.  }
        {23.41}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Zero.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-10-2000
\strut}
\begin{cxxdoc}


Returns the i'th point. 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMPoint}
        {GetPoint}
        {(\ int\ i\ )\ const\ }
        {Returns the i'th point. }
        {23.42}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & i'th point.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-10-2000
\strut}
\begin{cxxdoc}


Returns the i'th point.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Resize}
        {(int\ length,\ double*\ storage)}
        {Change number of shape points in the shape. }
        {23.43}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut length} & \\
{\tt\strut storage} & \end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-26-2000
\strut}
\cxxSee{ ($\rightarrow$, {\em page \pageref{cxx.}})\strut}
\begin{cxxdoc}


Change number of shape points in the shape.
Note: Destroys *all* current point data and point info data.

\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {AlignTransformation}
        {(\ const\ CAAMShape\ \&ref,\ double\ \&scale,\ double\ \&theta,\ CAAMPoint\ \&t\ )\ const\ }
        {Returns the transformation that aligns this to 'ref' with respect to pose. }
        {23.44}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut ref} & The reference shape.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
03-06-2000
\strut}
\begin{cxxdoc}


Returns the transformation that aligns this to 'ref' with respect to pose.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {AlignTo}
        {(\ const\ CAAMShape\ \&ref,\ double*\ pTheta\ )}
        {Aligns this to 'ref' with respect to pose. }
        {23.45}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut ref} & The reference shape.
\\
{\tt\strut pTheta} & Optional pointer to return the rotationcarried out on this.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & 2-norm of the this shape seen as a 2*nbPoint vector afterthe translation to origo but before the scale done to fit'ref'.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
03-06-2000
\strut}
\begin{cxxdoc}


Aligns this to 'ref' with respect to pose.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {GetRotation}
        {(\ const\ CAAMShape\ \&ref\ )\ const\ }
        {Returns the rotation between ref and this (in radians). }
        {23.46}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & estimated angle, theta, between the two shapes.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-09-2000
\strut}
\begin{cxxdoc}


Get the rotation between two shapes by minimizing the sum of
squared point distances, as described by Goodall (and Bookstein)
using Singular Value Decomposition (SVD).

Note that both shapes must be normalized with respect to scale and
position beforehand. This could be done by using
CAAMSAhape::Normalize(). 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads a shape from a file.  			 }
        {23.47}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & An open file handle.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Write the shape to a binary file. }
        {23.48}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & Destination filename.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-4-2000
\strut}
\cxxSee{FromFile
\strut}
\begin{cxxdoc}


Write the shape to a binary file.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Param2PoseVec}
        {(\ const\ double\ scale,\ const\ double\ theta,\ const\ double\ tx,\ const\ double\ ty,\ CDVector\ \&poseVec\ )}
        {Converts pose parameters: scale, theta, tx, ty to a pose vector. }
        {23.49}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut scale} & Scale input.
\\
{\tt\strut theta} & Rotational input.
\\
{\tt\strut tx} & X translation input.
\\
{\tt\strut ty} & Y translation input.
\\
{\tt\strut poseVec} & The output pose vector.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\cxxSee{PoseVec2Param,\ Displace\ \ \ 
\strut}
\begin{cxxdoc}


Converts pose parameters: scale, theta, tx, ty to a pose vector.
The pose vector will be in the format:

[ s, theta, tx, ty ] 

where s = scale-1				


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {PoseVec2Param}
        {(\ const\ CDVector\ \&poseVec,\ double\ \&scale,\ double\ \&theta,\ double\ \&tx,\ double\ \&ty\ )}
        {Converts a pose vector to pose parameters: scale, theta, tx, ty. }
        {23.50}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut poseVec} & The input pose vector.  
\\
{\tt\strut scale} & Scale output.
\\
{\tt\strut theta} & Rotational output.
\\
{\tt\strut tx} & X translation output.
\\
{\tt\strut ty} & Y translation output.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut } & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-27-2000
\strut}
\cxxSee{Param2PoseVec,\ Displace
\strut}
\begin{cxxdoc}


Converts a pose vector to pose parameters: scale, theta, tx, ty.
The pose vector are expected to be in the format:

[ s, theta, tx, ty ] 

where s = scale-1				


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Displace}
        {(\ const\ CDVector\ \&poseVec\ )}
        {Displaces the shape around it's center of gravity. }
        {23.51}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut poseVec} & The input pose vector.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\cxxSee{PoseToParam
\strut}
\begin{cxxdoc}


Displaces the shape around it's center of gravity using a
displacement vector.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {IsInsidePath}
        {(\ const\ CAAMPoint\ \&p,\ const\ int\ path\_start\ )\ const\ }
        {Tests if the point 'p' is inside the path starting at position 'path\_start'. Rarely used.  }
        {23.52}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut p} & The point to test for.
\\
{\tt\strut path\_start} & The point index where a path starts
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if 'p' is inside
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-4-2000
\strut}
\cxxSee{IsInside
\strut}
\begin{cxxdoc}


Tests if the point 'p' is inside the path starting at position
'path\_start'. Rarely used. Primary a helper function to
IsInside.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {IsInside}
        {(\ const\ CAAMPoint\ \&p,\ bool\ bBoundTest\ )\ const\ }
        {Tests if the point 'p' belongs to the shape.  }
        {23.53}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut 'p'} & The test point.
\\
{\tt\strut bBoundTest} & Flags wheather a bounding box test should beperformed prior to the exact test.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if 'p' is inside.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-4-2000
\strut}
\begin{cxxdoc}


Tests if the point 'p' belongs to the shape. In the current 
version all shape points are assumes to be ordered points in
a n-point polygon with no holes.
For example used to clean up the meshes (removing unwanted 
triangles from the triangulisation).


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Expand}
        {(\ int\ nPixels\ )}
        {Expands the shape (contraction can be done by using a negative nPixels). }
        {23.54}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut nPixels} & The number of pixel to expand the shape with.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-4-2000
\strut}
\begin{cxxdoc}


Expands the shape by moving each model point 'nPixels' perperdicular
to the shape contour (that is: along the model point normal).

This function will expand each outer (closed) path of the shape.

No tests for crossing contours are being made as of now.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Normal}
        {(\ const\ int\ i,\ CAAMPoint\&\ p1,\ CAAMPoint\&\ p2,\ const\ double\ dist\ )\ const\ }
        {Finds the normal to the i'th point on the shape. }
        {23.55}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut i} & Index of point.
\\
{\tt\strut p1} & Reference to the outside normal point.
\\
{\tt\strut p2} & Reference to the inside normal point.
\\
{\tt\strut dist} & The desired distance from p[1|2] to the i-th point.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-4-2000
\strut}
\begin{cxxdoc}


Finds the normal to the i'th point on the shape.
If the point should be a single point the normal points
is defined to be equal to the point it self.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {NormalDisplacement}
        {(\ const\ int\ i,\ const\ double\ dist\ )}
        {Displaces the i-th point along the normal. }
        {23.56}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut i} & Index of point.
\\
{\tt\strut dist} & The distance to move the point (\>0 move point outwards, \<0 inwards).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-6-2000
\strut}
\cxxSee{Normal
\strut}
\begin{cxxdoc}


Displaces the i-th point along the normal. 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {WriteASF}
        {(\ const\ CString\ \&filename,\ const\ int\ image\_width,\ const\ int\ image\_height\ )}
        {Writes the shape to a ASF file. }
        {23.57}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Output filename.  
\\
{\tt\strut image\_width} & The image the coord. is relative to.
\\
{\tt\strut image\_height} & The image the coord. is relative to.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on errors
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-25-2000
\strut}
\cxxSee{ReadASF
\strut}
\begin{cxxdoc}


Writes the shape to a ASF file. Remember asf's are always
in relative coordinates. Se format description else where.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {WriteASF0\_90}
        {(\ const\ CString\ \&filename,\ const\ int\ image\_width,\ const\ int\ image\_height\ )}
        {ASF writer version 0.90. }
        {23.58}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Output filename.  
\\
{\tt\strut image\_width} & The image the coord. is relative to.
\\
{\tt\strut image\_height} & The image the coord. is relative to.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on errors
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-2-2001
\strut}
\cxxSee{ReadASF
\strut}
\begin{cxxdoc}


Writes the shape to a ver. 0.90 ASF file. Remember asf's are always
in relative coordinates. Se format description else where.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ReadASF}
        {(\ const\ CString\ \&filename\ )}
        {Reads an ver. 0.90 .asf into relative coordinates. }
        {23.59}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Input filename.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on errors
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-25-2000
\strut}
\cxxSee{WriteASF
\strut}
\begin{cxxdoc}


Reads an ver. 0.90 .asf into relative coordinates.
Se format description else where.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ReadASF0\_90}
        {(\ const\ CString\ \&filename\ )}
        {Reads an ver. 0.90 .asf into relative coordinates. }
        {23.60}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Input filename.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on errors
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-25-2000
\strut}
\cxxSee{WriteASF
\strut}
\begin{cxxdoc}


Reads an ver. 0.90 .asf into relative coordinates.
Se format description else where.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Abs2Rel}
        {(\ const\ CString\ hostImagePath\ )}
        {Converts shape coordinates from absolute to relative by using the hostimage. }
        {23.61}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-15-2000
\strut}
\begin{cxxdoc}


Converts shape coordinates from absolute to relative by
using the hostimage.
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Rel2Abs}
        {(\ const\ CString\ hostImagePath\ )}
        {Converts shape coordinates from relative to absolute by using the hostimage. }
        {23.62}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-15-2000
\strut}
\begin{cxxdoc}


Converts shape coordinates from relative to absolute by
using the hostimage.

\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Abs2Rel}
        {(\ const\ int\ image\_width,\ const\ int\ image\_height\ )}
        {Converts shape coordinates from absolute to relative. }
        {23.63}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image\_width} & The image the coord. should be relative to.
\\
{\tt\strut image\_height} & The image the coord. should be relative to.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-25-2000
\strut}
\cxxSee{Rel2Abs
\strut}
\begin{cxxdoc}


Converts shape coordinates from absolute to relative.
Relative coordinates are specified as:

x\_relative = x\_abs/image\_width

y\_relative = y\_abs/image\_height


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Rel2Abs}
        {(\ const\ int\ image\_width,\ const\ int\ image\_height\ )}
        {Converts shape coordinates from relative to absolute. }
        {23.64}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image\_width} & The image the coord. is relative to.
\\
{\tt\strut image\_height} & The image the coord. is relative to.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-25-2000
\strut}
\cxxSee{Abs2Rel
\strut}
\begin{cxxdoc}


Converts shape coordinates from relative to absolute.
Relative coordinates are specified as:

x\_relative = x\_abs/image\_width

y\_relative = y\_abs/image\_height


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {AddPath}
        {(\ const\ CAAMShape\ \&shape,\ const\ CAAMPointInfo\ \&pointType\ )}
        {Adds a path to the shape. }
        {23.65}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut shape} & A shape containing one path.
\\
{\tt\strut pointType} & The pointtype of the added points.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-26-2000
\strut}
\begin{cxxdoc}


Adds a path to the shape. All added point inherits the 
given pointtype.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ReversePointOrder}
        {()}
        {Reverses the point point ordering. }
        {23.66}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-2-2000
\strut}
\begin{cxxdoc}


Reverses the point point ordering. 
Used when a clock-wise outer path shall converted to a 
counter-clock wise hole.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{std::vector\<int\>\ }
        {GetPaths}
        {()\ const\ }
        {Extracts the starting positions of each path in the shape. }
        {23.67}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & vector of path starting positions.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-3-2000
\strut}
\begin{cxxdoc}


Extracts the starting positions of each path in the shape by
a simple linear search.	The starting position is identified
by a change in path id (saved in the m\_vPointAux member).


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {PathLen}
        {(\ const\ int\ startPosition\ )\ const\ }
        {Returns the length of a path. }
        {23.68}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut startPosition} & The starting position of the path.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & path length.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-5-2000
\strut}
\cxxSee{GetPaths\ 
\strut}
\begin{cxxdoc}


Returns the length of a path.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMShape}
        {ExtractPath}
        {(\ const\ int\ startPosition\ )\ const\ }
        {Extracts one path from a shape. }
        {23.69}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut startPosition} & The starting position of the path.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & path as a new shape.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-5-2000
\strut}
\cxxSee{PathLen,\ GetPaths
\strut}
\begin{cxxdoc}


Extracts one path from a shape into a new shape.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {AddShapeExtends}
        {(\ int\ nPixels\ )}
        {Adds an extra border on each outer path. }
        {23.70}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut nPixels} & The size of the extents.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-5-2000
\strut}
\begin{cxxdoc}


Adds an extra outer path on each outer path in the
distance of 'nPixels' along the point normal.

This method is primary used in conjunction with 
the "do not use the convex hull" feature. In such
a case one often still wants a certain neighborhood
of the shape to be included in the model.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetPointInfoFlagsInPath}
        {(\ const\ int\ startPosition,\ const\ int\ flags\ )}
        {Sets all flags in one path to the same value. }
        {23.71}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut startPosition} & Starting position of the path.
\\
{\tt\strut flags} & The flags.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-9-2000
\strut}
\begin{cxxdoc}


Sets all flags in one path to the same value.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {AddInterior}
        {(const\ int\ interations)}
        {Adds articifial interior points to the shape. }
        {23.72}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut interations} & Controls the number of artificial points. One iteration equals one triangulation.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-12-2000
\strut}
\begin{cxxdoc}


Add articifial interior points to the shape by making a 
Delaunay triangulation and adding the centroid of each
triangle. This is done iteratively. Default is one iteration


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ConsistencyCheck}
        {()}
        {Tests if any interior points has gone outside  outer path of the shape. }
        {23.73}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if the shape looks ok, false if not.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-12-2000
\strut}
\begin{cxxdoc}


Tests if any interior points has gone outside 
outer path of the shape.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {MakeBorderShape}
        {(\ int\ size\ )}
        {Converts a one path shape into a border shape. }
        {23.74}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut size} & The size of the border in pixels.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-27-2000
\strut}
\begin{cxxdoc}


Converts a one path shape into a border shape by adding
two symmetric borders: an inside (a hole) and an outside 
border.

No checks for folding paths are done as of now.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMShape}
        {operator+}
        {(const\ CVisDVector\ \&v)\ const\ }
        {Plus operator. }
        {23.75}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Vector to add.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & addition of this and 'v'.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-20-2000
\strut}
\begin{cxxdoc}


Plus operator.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMShape}
        {operator-}
        {(const\ CVisDVector\ \&v)\ const\ }
        {Minus operator. }
        {23.76}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Vector to add.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & subtraction of this and 'v'.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-20-2000
\strut}
\begin{cxxdoc}


Minus operator.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {GetHostImage}
        {(\ CDMultiBand\<TAAMPixel\>\ \&dest,\ const\ CString\ \&path,\ const\ int\ rfactor\ )\ const\ }
        {Retrives the image connected to the shape. }
        {23.77}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut dest} & The destination image.
\\
{\tt\strut path} & The path to the .asf file.
\\
{\tt\strut rfactor} & Optional reduction factor. Performs a scaling of thethe shape by 1/rfactor. Default 1 i.e. no scaling.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.@throws} & CVisFileIOError
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-24-2000
\strut}
\begin{cxxdoc}


Retrives the image connected to the shape.
As of now it's loaded from disk using the HostImage() member
in the shape.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {Area}
        {(\ bool\ use\_covex\_hull\ )\ const\ }
        {Returns the total area of the shape (with holes excluded). }
        {23.78}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut use\_covex\_hull} & Use the convex hull of the shape forarea calculation (default false).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & area.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
11-15-2000
\strut}
\begin{cxxdoc}


Returns the total area of the shape (with holes excluded).


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMShape}
        {CalcConvexHull}
        {()\ const\ }
        {Calculates the convex hull of each path in the shape. }
        {23.79}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & convex version of this shape w.r.t. each path.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-2-2001
\strut}
\cxxSee{IsConvex
\strut}
\begin{cxxdoc}


Calculates the convex hull of each path in the shape.
The calulation is built upon the geometrical fact that the
homogenous point matrix: [ p1x p2x p3x ; p1y p2y p3y ; 1 1 1 ]
is positive if p1, p2, p3 is a convex segment and negative if
concave. Note: this holds for a clock-wise ordering of p1,p2,p3.

Any open paths are considered cyclic in the concavity calulation.

Remember that paths should be defined clock-wise in the asf format.

BUG COMMENT: This does not seem to work with multiple paths.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {IsConvex}
        {()\ const\ }
        {Tests if the shap is convex w.r.t. each path. }
        {23.80}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & on convex, false on concave.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-2-2001
\strut}
\cxxSee{CalcConvexHull
\strut}
\begin{cxxdoc}


Tests if the shap is convex w.r.t. each path.
This call is rather expensive, since it spaws a call to CalcConvexHull().


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {RemovePoint}
        {(\ const\ int\ i\ )}
        {Removes the i-th point from the shape. }
        {23.81}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut i} & The index of the point to remove.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-2-2001
\strut}
\begin{cxxdoc}


Removes the i-th point from the shape. Since this require 
massive reordering of the preceeding point connectivity this is
actually a very expensive call [a fairly ugly in it's implementation] :-(  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{std::vector\<float\>\ \&}
        {UserField}
        {(\ const\ int\ field\_nb\ )}
        {Returns a reference to a user defined field vector. }
        {23.82}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut field\_nb} & Field number [1-3].   
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & reference to the specified field vector.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-2-2001
\strut}
\cxxSee{ ($\rightarrow$, {\em page \pageref{cxx.}})\strut}
\begin{cxxdoc}


Returns the reference of the 
user defined field vector number  'field\_nb'.

\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ std::vector\<float\>\ \&}
        {UserField}
        {(\ const\ int\ field\_nb\ )\ const\ }
        {Returns the value of a user defined field vector. }
        {23.83}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut field\_nb} & Field number [1-3].    
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & float holding the value of the field.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-2-2001
\strut}
\cxxSee{ ($\rightarrow$, {\em page \pageref{cxx.}})\strut}
\begin{cxxdoc}


Returns the value of the  user defined field 
vector number 'field\_nb'.

\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {AllocateUserFields}
        {()}
        {Allocates room for the three user defined fields. }
        {23.84}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-2-2001
\strut}
\begin{cxxdoc}


Allocates room for the three user defined fields.

Notice that the user defined fields is *not* allocated by default.            

In order to preserved memory the user must to this explicitly by
using AllocateUserFields();


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxvariable}
{std::vector\<CAAMPointInfo\>\ }
        {m\_vPointAux}
        {}
        {Auxillary point data}
        {23.2}
\begin{cxxdoc}
Auxillary point data
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{std::vector\<float\>\ }
        {m\_vUser1}
        {}
        {User-defined field 1 }
        {23.3}
\begin{cxxdoc}
User-defined field 1 
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{std::vector\<float\>\ }
        {m\_vUser2}
        {}
        {User-defined field 2}
        {23.4}
\begin{cxxdoc}
User-defined field 2
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{std::vector\<float\>\ }
        {m\_vUser3}
        {}
        {User-defined field 3}
        {23.5}
\begin{cxxdoc}
User-defined field 3
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CString}
        {m\_szASFVer}
        {}
        {Current ASF version number}
        {23.6}
\begin{cxxdoc}
Current ASF version number
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{int}
        {m\_iNbPoints}
        {}
        {The number of points}
        {23.7}
\begin{cxxdoc}
The number of points
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{bool}
        {m\_bAbsPointCoordinates}
        {}
        {Indicates if the point coordinates is in relative or absolute format}
        {23.8}
\begin{cxxdoc}
Indicates if the point coordinates is in relative or absolute format
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CString}
        {m\_szHostImage}
        {}
        {Optional 'host image' filename including full path.}
        {23.9}
\begin{cxxdoc}
Optional 'host image' filename including full path.    
\end{cxxdoc}
\end{cxxvariable}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMShapeCollection}
        {:\ public\ std::vector\<CAAMShape\>,\ CAAMObject}
        {Shape collection container and shape-aligner. }
        {24}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-08-2000
\strut}
\cxxSee{CAAMShape
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{}{std::vector}{\cxxPubleft}
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubLeft}
\cxxInheritanceEntry[x]{\cxxNone}{24}{CAAMShapeCollection}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{inline\ \ \ int}
        {NShapes}
        {()\ const\ }
        {The number of shapes in the collection}
        {24.4}
\cxxitem{inline\ \ \ int}
        {NPoints}
        {()\ const\ }
        {The number of points in each of shape}
        {24.5}
\cxxitem{double}
        {MeanSize}
        {()\ const\ }
        {Returns the average shape size *before* the aligment process}
        {24.6}
\cxxitem{const\ CString\&}
        {Path}
        {()\ const\ }
        {Returns the path of all shapes}
        {24.7}
\cxxitem{}
        {Assignment\ operator}
        {}
        {}
        {24.8}
\cxxitem{}
        {CAAMShapeCollection}
        {()}
        {Constructor. }
        {24.9}
\cxxitem{}
        {\cxxtilde CAAMShapeCollection}
        {()}
        {Destructor. }
        {24.10}
\cxxitem{void}
        {Insert}
        {(const\ CAAMShape\ \&s)}
        {Inserts a shape into the collection. }
        {24.11}
\cxxitem{int}
        {ToMatlab}
        {(const\ CString\&\ sFilename,\ const\ CString\&\ sName,\ const\ CString\&\ sComment,\ bool\ fAppend)\ const\ }
        {}
        {24.12}
\cxxitem{int}
        {AlignShapes}
        {(\ bool\ use\_tangentspace\ )}
        {}
        {24.13}
\cxxitem{void}
        {MeanShape}
        {(CAAMShape\ \&meanShape)\ const\ }
        {Calcs the mean shape of all shapes. }
        {24.14}
\cxxitem{void}
        {ReferenceShape}
        {(CAAMShape\ \&refShape)\ const\ }
        {Calcs the mean shape of all aligned shapes and size it to mean size. }
        {24.15}
\cxxitem{double}
        {MinX}
        {()\ const\ }
        {Find the minimum x component of all shapes. }
        {24.16}
\cxxitem{double}
        {MaxX}
        {()\ const\ }
        {Find the maximum x component of all shapes. }
        {24.17}
\cxxitem{double}
        {MinY}
        {()\ const\ }
        {Find the minimum x component of all shapes. }
        {24.18}
\cxxitem{double}
        {MaxY}
        {()\ const\ }
        {Find the maximum y component of all shapes. }
        {24.19}
\cxxitem{void}
        {Scale}
        {(\ const\ double\ s,\ const\ bool\ aroundCOG\ )}
        {Scale all shapes. }
        {24.20}
\cxxitem{void}
        {Expand}
        {(\ int\ nPixels\ )}
        {Expands all shapes (contraction can be done by using a negative nPixels). }
        {24.21}
\cxxitem{void}
        {ToFile}
        {(const\ CString\&\ sFilename)\ const\ }
        {Write the set of shapes to a binary file. }
        {24.22}
\cxxitem{void}
        {FromFile}
        {(const\ CString\&\ sFilename)}
        {Reads a set of shapes from a file.  			 }
        {24.23}
\cxxitem{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Write the set of shapes to a binary file. }
        {24.24}
\cxxitem{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads a set of shapes from a file.  			 }
        {24.25}
\cxxitem{bool}
        {ReadShapes}
        {(\ const\ std::vector\<CString\>\ \&asfFiles,\ bool\ validate\ )}
        {Reads a set of shapes. }
        {24.26}
\cxxitem{bool}
        {ReadDir}
        {(\ const\ CString\ \&path,\ bool\ validate\ )}
        {Scans a dir for annotations (.asf) and read shapes. }
        {24.27}
\cxxitem{void}
        {Rel2Abs}
        {(\ int\ rfactor\ )}
        {Converts all shapes with relative coordinates to absolute.  }
        {24.28}
\end{cxxpublic}
\begin{cxxprivate}
\cxxitem{CAAMShape}
        {m\_MeanShapeBeforeTS}
        {}
        {The meanshape prior to tangent space projection (calculated during alignment)}
        {24.1}
\cxxitem{double}
        {m\_dAvgSize}
        {}
        {The average shape size (calculated during alignment)}
        {24.2}
\cxxitem{CString}
        {m\_szPath}
        {}
        {Path to the asf files (if any)}
        {24.3}
\end{cxxprivate}
\begin{cxxdoc}


This class act as a container for a set of shapes. Secondary it can
align the set of shapes to a normalised reference frame with respect
to position, scale and orientation.


\end{cxxdoc}
\begin{cxxfunction}
{inline\ \ \ int}
        {NShapes}
        {()\ const\ }
        {The number of shapes in the collection}
        {24.4}
\begin{cxxdoc}
The number of shapes in the collection
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{inline\ \ \ int}
        {NPoints}
        {()\ const\ }
        {The number of points in each of shape}
        {24.5}
\begin{cxxdoc}
The number of points in each of shape
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {MeanSize}
        {()\ const\ }
        {Returns the average shape size *before* the aligment process}
        {24.6}
\begin{cxxdoc}
Returns the average shape size *before* the aligment process
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ CString\&}
        {Path}
        {()\ const\ }
        {Returns the path of all shapes}
        {24.7}
\begin{cxxdoc}
Returns the path of all shapes
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxvariable}
{}
        {Assignment\ operator}
        {}
        {}
        {24.8}
\begin{cxxdoc}
Assignment operator
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxfunction}
{}
        {CAAMShapeCollection}
        {()}
        {Constructor. }
        {24.9}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-27-2000
\strut}
\begin{cxxdoc}


Constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMShapeCollection}
        {()}
        {Destructor. }
        {24.10}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-27-2000
\strut}
\begin{cxxdoc}


Destructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Insert}
        {(const\ CAAMShape\ \&s)}
        {Inserts a shape into the collection. }
        {24.11}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & The input shape.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-27-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {ToMatlab}
        {(const\ CString\&\ sFilename,\ const\ CString\&\ sName,\ const\ CString\&\ sComment,\ bool\ fAppend)\ const\ }
        {}
        {24.12}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & Filename including path to be written.
\\
{\tt\strut sName} & The matlab variable name of the matrix.
\\
{\tt\strut sComment} & An optional comment.
\\
{\tt\strut fAppend} & Addend to an existing file or overwrite.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Zero} & on sucess, non-zero if no shapes are stored in the collection.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-09-2000
\strut}
\begin{cxxdoc}


Writes the shapes in a (NShapes x 2*NPoints) matrix in Matlab
(*.m) format.
The i-th row thus contains the i-th shape in xxxyy format.   


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {AlignShapes}
        {(\ bool\ use\_tangentspace\ )}
        {}
        {24.13}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Zero} & on succes.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-09-2000
\strut}
\begin{cxxdoc}


Normalizes all shapes with respect to position, scale 
and orientation. 
Position normalization are done by a translation of the
center of gravity to origo.
Scale normalization are done by a scaling of 1/\<norm2\>.
Rotation normalization are done by minimizing the sum of
squared point distances, as described by Goodall using
Singular Value Decomposition (SVD).


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {MeanShape}
        {(CAAMShape\ \&meanShape)\ const\ }
        {Calcs the mean shape of all shapes. }
        {24.14}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut meanShape} & The output mean shape.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-27-2000
\strut}
\cxxSee{ ($\rightarrow$, {\em page \pageref{cxx.}})\strut}
\begin{cxxdoc}


Calcs the mean shape of all shapes.

\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ReferenceShape}
        {(CAAMShape\ \&refShape)\ const\ }
        {Calcs the mean shape of all aligned shapes and size it to mean size. }
        {24.15}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut refShape} & The output reference shape.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
7-27-2000
\strut}
\cxxSee{ ($\rightarrow$, {\em page \pageref{cxx.}})\strut}
\begin{cxxdoc}


Calcs the mean shape of all aligned shapes and size it to mean size.

\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {MinX}
        {()\ const\ }
        {Find the minimum x component of all shapes. }
        {24.16}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & x-minimum.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {MaxX}
        {()\ const\ }
        {Find the maximum x component of all shapes. }
        {24.17}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & x-maximum.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {MinY}
        {()\ const\ }
        {Find the minimum x component of all shapes. }
        {24.18}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & x-minimum.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {MaxY}
        {()\ const\ }
        {Find the maximum y component of all shapes. }
        {24.19}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & y-maximum.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Scale}
        {(\ const\ double\ s,\ const\ bool\ aroundCOG\ )}
        {Scale all shapes. }
        {24.20}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & Scale factor.
\\
{\tt\strut aroundCOG} & If true the scale is being done around the cog of the shape instead of around the globalcenter.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\begin{cxxdoc}


Scale the shapes.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Expand}
        {(\ int\ nPixels\ )}
        {Expands all shapes (contraction can be done by using a negative nPixels). }
        {24.21}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut nPixels} & The number of pixel to expand the shape with.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-4-2000
\strut}
\begin{cxxdoc}


Expands all shapes by moving each model point 'nPixels' perperdicular
to the shape contour (that is: along the model point normal).

This function will expand each outer (closed) path of the shape.

No tests for crossing contours are being made as of now.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ToFile}
        {(const\ CString\&\ sFilename)\ const\ }
        {Write the set of shapes to a binary file. }
        {24.22}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & Destination filename.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-4-2000
\strut}
\cxxSee{FromFile
\strut}
\begin{cxxdoc}


Write the set of shapes to a binary file.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {FromFile}
        {(const\ CString\&\ sFilename)}
        {Reads a set of shapes from a file.  			 }
        {24.23}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut sFilename} & The filename.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Write the set of shapes to a binary file. }
        {24.24}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Destination file handle.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-4-2000
\strut}
\cxxSee{FromFile
\strut}
\begin{cxxdoc}


Write the set of shapes to a binary file.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads a set of shapes from a file.  			 }
        {24.25}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & An open file handle.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-15-2000
\strut}
\begin{cxxdoc}



\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ReadShapes}
        {(\ const\ std::vector\<CString\>\ \&asfFiles,\ bool\ validate\ )}
        {Reads a set of shapes. }
        {24.26}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut asfFiles} & Vector of asf filenames.
\\
{\tt\strut validate} & Validates that all shapes have thesame number of points.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & on a valid training set - otherwise false.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-24-2000
\strut}
\begin{cxxdoc}


Reads a set of shapes in the order given in the 
vector of strings.              


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ReadDir}
        {(\ const\ CString\ \&path,\ bool\ validate\ )}
        {Scans a dir for annotations (.asf) and read shapes. }
        {24.27}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut path} & Full path to annotations.
\\
{\tt\strut validate} & Validates that all shapes have thesame number of points.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & on a valid training set - otherwise false.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-24-2000
\strut}
\begin{cxxdoc}


Scans a dir for annotations (.asf) and read shapes
in alphabetical order.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Rel2Abs}
        {(\ int\ rfactor\ )}
        {Converts all shapes with relative coordinates to absolute.  }
        {24.28}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut rfactor} & Optional reduction factor. Performs a scaling of thethe shape by 1/rfactor. Default 1 i.e. no scaling.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-25-2000
\strut}
\begin{cxxdoc}


Converts all shapes with relative coordinates to
absolute. Unfortunately this requires to read the
headers of all host images. VisSDK does not
provide any operation for this. Thus, all images
are one by one read into memory and discarded again
to obtain height and width. Very costly :-(


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxvariable}
{CAAMShape}
        {m\_MeanShapeBeforeTS}
        {}
        {The meanshape prior to tangent space projection (calculated during alignment)}
        {24.1}
\begin{cxxdoc}
The meanshape prior to tangent space projection (calculated during alignment)
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{double}
        {m\_dAvgSize}
        {}
        {The average shape size (calculated during alignment)}
        {24.2}
\begin{cxxdoc}
The average shape size (calculated during alignment)
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{CString}
        {m\_szPath}
        {}
        {Path to the asf files (if any)}
        {24.3}
\begin{cxxdoc}
Path to the asf files (if any)
\end{cxxdoc}
\end{cxxvariable}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMEvaluationResults}
        {}
        {Container to store evaluation results in. }
        {25}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-2-2002
\strut}
\begin{cxxpublic}
\cxxitem{void}
        {AddResult}
        {(\ const\ CAAMShape\ \&model\_shape,\ const\ CAAMShape\ \&ground\_truth,\ const\ double\ \&time,\ const\ CAAMModel::CAAMOptRes\ \&optRes\ )}
        {Adds a new result to the back}
        {25.1}
\cxxitem{void}
        {AddResults}
        {(\ const\ CAAMEvaluationResults\ \&results\ )}
        {Adds a new set of results to the back}
        {25.2}
\cxxitem{void}
        {PrintStatistics}
        {(\ FILE*\ fh\ =\ stdout\ )}
        {�Prints all results and some statistics to either file or screen (default)}
        {25.3}
\cxxitem{int}
        {PrintStatistics}
        {(\ const\ CString\ \&filename\ )}
        {Prints all results to a file}
        {25.4}
\end{cxxpublic}
\begin{cxxdoc}


Container to store evaluation results in.
Further, it can print out the results along
with some simple statistics.

\end{cxxdoc}
\begin{cxxfunction}
{void}
        {AddResult}
        {(\ const\ CAAMShape\ \&model\_shape,\ const\ CAAMShape\ \&ground\_truth,\ const\ double\ \&time,\ const\ CAAMModel::CAAMOptRes\ \&optRes\ )}
        {Adds a new result to the back}
        {25.1}
\begin{cxxdoc}
Adds a new result to the back
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {AddResults}
        {(\ const\ CAAMEvaluationResults\ \&results\ )}
        {Adds a new set of results to the back}
        {25.2}
\begin{cxxdoc}
Adds a new set of results to the back
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {PrintStatistics}
        {(\ FILE*\ fh\ =\ stdout\ )}
        {�Prints all results and some statistics to either file or screen (default)}
        {25.3}
\begin{cxxdoc}
�Prints all results and some statistics to either file or screen (default)
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{int}
        {PrintStatistics}
        {(\ const\ CString\ \&filename\ )}
        {Prints all results to a file}
        {25.4}
\begin{cxxdoc}
Prints all results to a file
\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMTest}
        {:\ public\ CAAMObject}
        {Container for all sorts of test functions. }
        {26}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
03-05-2001
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{26}{CAAMTest}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{}
        {CAAMTest}
        {()}
        {Constructor. }
        {26.1}
\cxxitem{}
        {\cxxtilde CAAMTest}
        {()}
        {Destructor. }
        {26.2}
\cxxitem{void}
        {GetRotationTest}
        {(\ const\ CAAMShape\ \&s1,\ const\ CAAMShape\ \&s2\ )}
        {Tests CAAMShape:GetRotation() for rotations in the range [0;360]. }
        {26.3}
\cxxitem{void}
        {AnalyzeTest}
        {(\ const\ CAAMShape\ \&refShape,\ const\ CAAMShape\ \&s,\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ const\ bool\ useConvexHull\ )}
        {Benchmarks the software warping method against the OpenGL ditto. }
        {26.4}
\cxxitem{void}
        {TestPosePrediction}
        {(\ const\ CAAMModel\ \&model,\ const\ CString\ \&path\ )}
        {Tests the prediction matrices ability to predict pose displacements. }
        {26.5}
\cxxitem{CAAMEvaluationResults}
        {EvaluateModel}
        {(\ const\ CAAMModel*\ pModel,\ const\ CString\ \&gt\_path,\ const\ CString\ \&result\_file,\ const\ bool\ writeStills,\ const\ bool\ writeMovies,\ const\ bool\ autoinit,\ const\ bool\ dump2screen,\ CAAMLowerBounds*\ pLB\ )}
        {Optimizes a set of images and compares the result to a ground truth annotation. }
        {26.6}
\cxxitem{CAAMEvaluationResults}
        {EvaluateModelSeq}
        {(\ const\ CAAMModelSeq\ \&modelSeq,\ const\ CString\ \&gt\_path,\ const\ CString\ \&result\_file,\ const\ bool\ writeStills,\ const\ bool\ writeMovies,\ const\ bool\ autoinit,\ const\ bool\ dump2screen,\ CAAMLowerBounds*\ pLB\ )}
        {Optimizes a set of images and compares the result to a ground truth annotation using a sequence of AAMs. }
        {26.7}
\end{cxxpublic}
\begin{cxxdoc}


Container for all sorts of test functions. In this way a
history of all mock-up test functions developed during
debugging and testing are kept.   

All functions are implemented as static functions. Thus
no instantiation the CAAMTest are needed.            
\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMTest}
        {()}
        {Constructor. }
        {26.1}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-5-2001
\strut}
\begin{cxxdoc}


Constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMTest}
        {()}
        {Destructor. }
        {26.2}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-5-2001
\strut}
\begin{cxxdoc}


Destructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {GetRotationTest}
        {(\ const\ CAAMShape\ \&s1,\ const\ CAAMShape\ \&s2\ )}
        {Tests CAAMShape:GetRotation() for rotations in the range [0;360]. }
        {26.3}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s1} & First shape.
\\
{\tt\strut s2} & Second shape.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-5-2001
\strut}
\begin{cxxdoc}


Tests CAAMShape:GetRotation() for rotations in the range [0;360].  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {AnalyzeTest}
        {(\ const\ CAAMShape\ \&refShape,\ const\ CAAMShape\ \&s,\ const\ CDMultiBand\<TAAMPixel\>\ \&image,\ const\ bool\ useConvexHull\ )}
        {Benchmarks the software warping method against the OpenGL ditto. }
        {26.4}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut refShape} & Reference shape, i.e. mean shape scale to mean size.
\\
{\tt\strut s} & Input shape in relative or absolute coordinates.
\\
{\tt\strut image} & Host image of 's'.
\\
{\tt\strut useConvexHull} & If true the convex hull is used.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-13-2002
\strut}
\begin{cxxdoc}


Benchmarks the software warping method against the OpenGL ditto.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {TestPosePrediction}
        {(\ const\ CAAMModel\ \&model,\ const\ CString\ \&path\ )}
        {Tests the prediction matrices ability to predict pose displacements. }
        {26.5}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut model} & The AAM to test.   
\\
{\tt\strut path} & The path where test images and annotations are placed(including terminating backslash).  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-27-2000
\strut}
\begin{cxxdoc}


Output are returned in the form of eight matlab formatted files
in the current directory.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMEvaluationResults}
        {EvaluateModel}
        {(\ const\ CAAMModel*\ pModel,\ const\ CString\ \&gt\_path,\ const\ CString\ \&result\_file,\ const\ bool\ writeStills,\ const\ bool\ writeMovies,\ const\ bool\ autoinit,\ const\ bool\ dump2screen,\ CAAMLowerBounds*\ pLB\ )}
        {Optimizes a set of images and compares the result to a ground truth annotation. }
        {26.6}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut model} & The model to evaluate.
\\
{\tt\strut gt\_path} & Path to ground truth images and annotations.  
\\
{\tt\strut result\_file} & The file to write the results in.
\\
{\tt\strut writeStills} & If true two model border images are written; one of the initialisation and one of the optimization.
\\
{\tt\strut writeMovies} & It true a movie of the whole optimization is written, one frame per iteration.
\\
{\tt\strut autoinit} & If true automatic initialization is performed insteadof the systematic displacement of the ground truthpose. 
\\
{\tt\strut dump2screen} & If true, results are written to the screen also (default true).
\\
{\tt\strut pLB} & Optional pointer to a CAAMLowerBounds object.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Evaluation} & results.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-5-2000
\strut}
\begin{cxxdoc}


Optimizes a set of images and compares the result to a ground truth
annotation. As initialization the ground truth pose is systematically 
displaced (default) or an automatic initialisation is performed.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMEvaluationResults}
        {EvaluateModelSeq}
        {(\ const\ CAAMModelSeq\ \&modelSeq,\ const\ CString\ \&gt\_path,\ const\ CString\ \&result\_file,\ const\ bool\ writeStills,\ const\ bool\ writeMovies,\ const\ bool\ autoinit,\ const\ bool\ dump2screen,\ CAAMLowerBounds*\ pLB\ )}
        {Optimizes a set of images and compares the result to a ground truth annotation using a sequence of AAMs. }
        {26.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut modelSew} & A sequence of models.
\\
{\tt\strut gt\_path} & Path to ground truth images and annotations.  
\\
{\tt\strut result\_file} & The file to write the results in.
\\
{\tt\strut writeStills} & If true two model border images are written; one of the initialisation and one of the optimization.
\\
{\tt\strut writeMovies} & It true a movie of the whole optimization is written, one frame per iteration.
\\
{\tt\strut autoinit} & If true automatic initialization is performed insteadof the systematic displacement of the ground truthpose. 
\\
{\tt\strut dump2screen} & If true, results are written to the screen also (default true).
\\
{\tt\strut pLBS} & Optional pointer to a CAAMLBShapeModel object.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Evaluation} & results.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-5-2000
\strut}
\begin{cxxdoc}


Optimizes a set of images and compares the result to a ground truth
annotation using a sequence of AAMs. As initialization the ground 
truth pose is systematically displaced (default) or an automatic 
initialisation is performed.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMTransferFunction}
        {:\ public\ CAAMObject}
        {Abstract base class for all transfer functions. }
        {27}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-25-2002
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{27}{CAAMTransferFunction}{}
\cxxInheritanceEntry{\cxxNone\cxxLinkPubRight}{30}{CAAMTFUniformStretch}{}
\cxxInheritanceEntry{\cxxNone\cxxLinkPubRight}{29}{CAAMTFLookUp}{}
\cxxInheritanceEntry{\cxxNone\cxxLinkPubright}{28}{CAAMTFIdentity}{}
\end{cxxInheritance}
\begin{cxxdoc}


This class defines an interface for the so-called
transfer functions, which are nothing but differnt
mapping from one vector space to another.

\end{cxxdoc}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMTFIdentity}
        {:\ public\ CAAMTransferFunction}
        {Transfer function that implements the identity transformation. }
        {28}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-25-2002
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft\cxxNone}
\cxxInheritanceEntry{\cxxNone}{27}{CAAMTransferFunction}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone\cxxNone}{28}{CAAMTFIdentity}{}
\end{cxxInheritance}
\begin{cxxdoc}


Transfer function that implements the identity transformation.
Actually this function is one of the reasons for the design
of the Map and DeMap methods. An identity transform should
not induce any computational overhead whatsoever.

\end{cxxdoc}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMTFLookUp}
        {:\ public\ CAAMTransferFunction}
        {Transfer function that implements a lookup table. }
        {29}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-28-2002
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft\cxxNone}
\cxxInheritanceEntry{\cxxNone}{27}{CAAMTransferFunction}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone\cxxNone}{29}{CAAMTFLookUp}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{}
        {CAAMTFLookUp}
        {()}
        {Constructor}
        {29.1}
\cxxitem{}
        {\cxxtilde CAAMTFLookUp}
        {()}
        {Destructor}
        {29.2}
\cxxitem{CAAMTransferFunction*}
        {Clone}
        {()\ const\ }
        {Clone function (conveys type info)}
        {29.3}
\cxxitem{const\ char*}
        {TypeName}
        {()\ const\ }
        {Returns the clear-text type name}
        {29.4}
\cxxitem{void}
        {LoadLUT}
        {(\ const\ CDVector\ \&lut\ )}
        {Loads the lookup table and generates the inverse. }
        {29.5}
\cxxitem{void}
        {Map}
        {(\ CDVector\ \&v\ )\ const\ }
        {Maps an input vector using the current lookup table. }
        {29.6}
\cxxitem{void}
        {DeMap}
        {(\ CDVector\ \&v\ )\ const\ }
        {The inverse of the lookup table transform. }
        {29.7}
\cxxitem{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads the class info from file. }
        {29.8}
\cxxitem{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Writes the class info to file. }
        {29.9}
\end{cxxpublic}
\begin{cxxdoc}


Transfer function that implements a lookup table, which
is useful for e.g. histogram equalisations.

\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMTFLookUp}
        {()}
        {Constructor}
        {29.1}
\begin{cxxdoc}
Constructor
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMTFLookUp}
        {()}
        {Destructor}
        {29.2}
\begin{cxxdoc}
Destructor
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMTransferFunction*}
        {Clone}
        {()\ const\ }
        {Clone function (conveys type info)}
        {29.3}
\begin{cxxdoc}
Clone function (conveys type info)
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ char*}
        {TypeName}
        {()\ const\ }
        {Returns the clear-text type name}
        {29.4}
\begin{cxxdoc}
Returns the clear-text type name
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {LoadLUT}
        {(\ const\ CDVector\ \&lut\ )}
        {Loads the lookup table and generates the inverse. }
        {29.5}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut lut} & A lookup table in vector form.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-28-2002
\strut}
\begin{cxxdoc}


Loads the lookup table and generates the inverse,
i.e. assumes that the LUT monotonic.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Map}
        {(\ CDVector\ \&v\ )\ const\ }
        {Maps an input vector using the current lookup table. }
        {29.6}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Input vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & The result is returned in v.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-28-2002
\strut}
\begin{cxxdoc}


Maps an input vector using the current lookup table.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {DeMap}
        {(\ CDVector\ \&v\ )\ const\ }
        {The inverse of the lookup table transform. }
        {29.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Input vector to de-map.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & The result is returned in v.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-28-2002
\strut}
\cxxSee{Map
\strut}
\begin{cxxdoc}


The inverse of the lookup table transform. The input vector
is transformed into [0;255] and the the inverse LUT is applied.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {FromFile}
        {(\ FILE*\ fh\ )}
        {Reads the class info from file. }
        {29.8}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Open binary file handle.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-28-2002
\strut}
\cxxSee{ToFile
\strut}
\begin{cxxdoc}


Reads the class info from file.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ToFile}
        {(\ FILE*\ fh\ )\ const\ }
        {Writes the class info to file. }
        {29.9}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Open binary file handle.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-28-2002
\strut}
\cxxSee{FromFile
\strut}
\begin{cxxdoc}


Writes the class info to file.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMTFUniformStretch}
        {:\ public\ CAAMTransferFunction}
        {Performs a uniform stretch into [0;255] on the demapping side. }
        {30}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-25-2002
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft\cxxNone}
\cxxInheritanceEntry{\cxxNone}{27}{CAAMTransferFunction}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone\cxxNone}{30}{CAAMTFUniformStretch}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{}
        {CAAMTFUniformStretch}
        {()}
        {Constructor}
        {30.1}
\cxxitem{}
        {\cxxtilde CAAMTFUniformStretch}
        {()}
        {Destructor}
        {30.2}
\cxxitem{CAAMTransferFunction*}
        {Clone}
        {()\ const\ }
        {Clone function (conveys type info)}
        {30.3}
\cxxitem{const\ char*}
        {TypeName}
        {()\ const\ }
        {Returns the clear-text type name}
        {30.4}
\cxxitem{void}
        {Map}
        {(\ CDVector\ \&v\ )\ const\ }
        {Does nothing. }
        {30.5}
\cxxitem{void}
        {DeMap}
        {(\ CDVector\ \&v\ )\ const\ }
        {Maps the vector into [0;255]. }
        {30.6}
\end{cxxpublic}
\begin{cxxdoc}


Performs a uniform stretch into [0;255] on the demapping side 
(yes, a really degenerate class... I know...).

\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMTFUniformStretch}
        {()}
        {Constructor}
        {30.1}
\begin{cxxdoc}
Constructor
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMTFUniformStretch}
        {()}
        {Destructor}
        {30.2}
\begin{cxxdoc}
Destructor
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMTransferFunction*}
        {Clone}
        {()\ const\ }
        {Clone function (conveys type info)}
        {30.3}
\begin{cxxdoc}
Clone function (conveys type info)
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{const\ char*}
        {TypeName}
        {()\ const\ }
        {Returns the clear-text type name}
        {30.4}
\begin{cxxdoc}
Returns the clear-text type name
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {Map}
        {(\ CDVector\ \&v\ )\ const\ }
        {Does nothing. }
        {30.5}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Input vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-28-2002
\strut}
\begin{cxxdoc}


Does nothing.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {DeMap}
        {(\ CDVector\ \&v\ )\ const\ }
        {Maps the vector into [0;255]. }
        {30.6}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut v} & Input vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & The result is returned in v.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-28-2002
\strut}
\begin{cxxdoc}


Maps the vector into [0;255].


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMUtil}
        {:\ public\ CAAMObject}
        {Utility methods for the AAM project. }
        {31}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-6-2000
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{31}{CAAMUtil}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{static\ \ \ double}
        {Deg2Rad}
        {(\ double\ deg\ )}
        {Converts from degrees to radians}
        {31.1}
\cxxitem{static\ \ \ double}
        {Rad2Deg}
        {(\ double\ rad\ )}
        {Convert from radians to degrees}
        {31.2}
\cxxitem{void}
        {PlotMeshIntoImage}
        {(\ CDMultiBand\<TAAMPixel\>\ image,\ const\ CAAMMesh\ \&mesh,\ TAAMPixel*\ point\_color,\ TAAMPixel*\ line\_color\ )}
        {Plots a mesh into an image. }
        {31.3}
\cxxitem{void}
        {PlotShapeIntoImage}
        {(\ CDMultiBand\<TAAMPixel\>\ image,\ const\ CAAMShape\ \&shape,\ TAAMPixel*\ point\_color,\ TAAMPixel*\ line\_color,\ bool\ drawNormals,\ bool\ drawArea,\ bool\ drawPoints,\ bool\ drawLines\ )}
        {Draws the shape into an image with a given color. }
        {31.4}
\cxxitem{void}
        {VecCat3}
        {(\ CDVector\ \&dest,\ const\ CDVector\ \&v1,\ const\ CDVector\ \&v2,\ const\ CDVector\ \&v3\ )}
        {Concatenates three vectors }
        {31.5}
\cxxitem{std::vector\<CString\>\ }
        {ScanSortDir}
        {(\ const\ CString\ \&path,\ const\ CString\ \&extension\ )}
        {Scans and sorts a directory for files.  }
        {31.6}
\cxxitem{void}
        {ReadExample}
        {(\ const\ CString\ \&filename,\ CDMultiBand\<TAAMPixel\>\ \&img,\ CAAMShape\ \&shape,\ int\ rfactor\ )}
        {Reads an image and a shape. }
        {31.7}
\cxxitem{double}
        {DistEuclidianPoints}
        {(const\ CAAMShape\ \&s1,\ const\ CAAMShape\ \&s2\ )}
        {Calculates the point to point error. }
        {31.8}
\cxxitem{double}
        {DistEuclidianAssBorder}
        {(const\ CAAMShape\ \&s1,\ const\ CAAMShape\ \&s2,\ CDVector*\ pvDist\ )}
        {Calculates the point to curve error. }
        {31.9}
\cxxitem{double}
        {DistEuclidianPoints}
        {(const\ CDVector\&\ vX1,\ const\ CDVector\&\ vY1,\ const\ CDVector\&\ vX2,\ const\ CDVector\&\ vY2\ )}
        {Calculates the point to point error. }
        {31.10}
\cxxitem{double}
        {DistEuclidianAssBorder}
        {(const\ CDVector\&\ vX1,\ const\ CDVector\&\ vY1,\ const\ CDVector\&\ vX2,\ const\ CDVector\&\ vY2,\ CDVector*\ pvDist\ )}
        {Calculates the point to curve error. }
        {31.11}
\cxxitem{void}
        {PointOnAssBorder}
        {(const\ CDVector\&\ vX1,\ const\ CDVector\&\ vY1,\ const\ CDVector\&\ vX2,\ const\ CDVector\&\ vY2,\ CDVector\&\ vXBorder,\ CDVector\&\ vYBorder,\ CDVector\&\ vDist\ )}
        {Calculates the point to curve error. }
        {31.12}
\cxxitem{double}
        {ProjPointOnLine}
        {(const\ double\ dXL1,\ const\ double\ dYL1,\ const\ double\ dXL2,\ const\ double\ dYL2,\ const\ double\ dXP,\ const\ double\ dYP,\ double\&\ dXProj,\ double\&\ dYProj)}
        {Find the projection dProj of the point dP on the line through dL1 and dL2. }
        {31.13}
\cxxitem{CString}
        {RemoveExt}
        {(\ const\ CString\ \&s\ )}
        {Removes the extension of a file name. }
        {31.14}
\cxxitem{CString}
        {GetExt}
        {(\ const\ CString\ \&s\ )}
        {Returns the extension of a file name. }
        {31.15}
\cxxitem{bool}
        {CreateTest}
        {(\ const\ CString\ \&file\ )}
        {Tests if a file can be created for writing. }
        {31.16}
\cxxitem{CString}
        {AddBackSlash}
        {(\ const\ CString\ \&path\ )}
        {Ensures that a string is terminated with a backslash }
        {31.17}
\cxxitem{CString}
        {GetPath}
        {(\ const\ CString\ \&fullfilename\ )}
        {Returns the path of a filename. }
        {31.18}
\cxxitem{CString}
        {GetFilename}
        {(\ const\ CString\ \&filename\ )}
        {Returns the file name of a path+file name string. }
        {31.19}
\cxxitem{CString}
        {ForceExt}
        {(\ const\ CString\ \&filename,\ const\ CString\ \&ext\ )}
        {Forces an extension onto a file name. }
        {31.20}
\cxxitem{bool}
        {FileExists}
        {(\ const\ CString\ \&filename\ )}
        {Tests if a file exists. }
        {31.21}
\cxxitem{void}
        {ExpandImg2DyadicSize}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&img,\ CDMultiBand\<TAAMPixel\>\ \&out\ )}
        {Expands an image to have dyadic size. }
        {31.22}
\cxxitem{void}
        {MirrorEdge}
        {(\ CDMatrix\ \&m,\ const\ CDMultiBand\<TAAMPixel\>\ \&mask,\ int\ edgeWidth\ )}
        {Mirrors the edge of an arbitrary shape. }
        {31.23}
\cxxitem{void}
        {MirrorEdge}
        {(\ CDMultiBand\<TAAMPixel\>\ \&img,\ const\ CDMultiBand\<TAAMPixel\>\ \&mask,\ int\ edgeWidth\ )}
        {Mirrors the edge of an arbitrary shape. }
        {31.24}
\cxxitem{bool}
        {ShapeInsideImage}
        {(\ const\ CAAMShape\ \&s,\ const\ CDMultiBand\<TAAMPixel\>\ \&img\ )}
        {Tests if a shape is fully inside an image. }
        {31.25}
\cxxitem{void}
        {CalcShapeDistances}
        {(\ const\ CAAMShape\ \&optimized,\ const\ CAAMShape\ \&groundTruth,\ double\ \&ptpt,\ double\ \&ptcrv,\ CDVector*\ pvDists\ )}
        {Calculates optimization results. }
        {31.26}
\cxxitem{CString}
        {Secs2Mins}
        {(\ double\ secs\ )}
        {Converts seconds to a MM:SS string. }
        {31.27}
\cxxitem{CString}
        {FindVacantFilename}
        {(\ const\ CString\ \&filename\_suggestion\ )}
        {Finds a file name that is not 'occupied'. }
        {31.28}
\cxxitem{void}
        {SampleTextures}
        {(\ const\ CAAMShapeCollection\ \&unalignedShapes,\ std::vector\<\ CDVector\ \>\ \&vTextures,\ CAAMReferenceFrame\ \&outputRF,\ const\ int\ imageReduction,\ const\ bool\ removeMean,\ const\ bool\ useTSP,\ const\ bool\ useConvexHull\ )}
        {Samples a set of texture vectors given a set of shape in absolute (i.e. image) coordinates. }
        {31.29}
\cxxitem{void}
        {RegistrationMovie}
        {(\ const\ CString\ \&filename,\ const\ std::vector\<CDVector\>\ \&vTexture,\ const\ CAAMReferenceFrame\ \&rf\ )}
        {Writes a movie file containing a set of textures  warped to their mean shape. }
        {31.30}
\cxxitem{void}
        {RegistrationMovie}
        {(\ const\ CString\ \&filename,\ const\ CString\ asfPath,\ const\ bool\ useConvexHull,\ const\ bool\ writeRefShape\ )}
        {Writes a movie file containing all shapes from a directory warped to their mean shape. }
        {31.31}
\cxxitem{void}
        {ASF2PTS}
        {(\ const\ CString\ \&path\ )}
        {Converts AAM-API shape files (.asf) to the ISBE .pts format. }
        {31.32}
\cxxitem{double}
        {SymmetricPtCrv}
        {(\ const\ CAAMShape\ \&s1,\ const\ CAAMShape\ \&s2\ )}
        {A symmetric point-to-curve measure. }
        {31.33}
\cxxitem{double}
        {ShapeOverlap}
        {(\ const\ CAAMShape\ \&model,\ const\ CAAMShape\ \&gt\ )}
        {Calculates the overlap between two shapes. }
        {31.34}
\cxxitem{std::vector\<CString\>\ }
        {ReadLines}
        {(\ const\ CString\ \&filename\ )}
        {Reads a file into an array of lines. }
        {31.35}
\end{cxxpublic}
\begin{cxxdoc}


This class consists of methods that are self-containing and
could not logically fit into any other AAM class.

Thus all methods are static, so remember that there is never
need for an	instantiation of this class.  

\end{cxxdoc}
\begin{cxxfunction}
{static\ \ \ double}
        {Deg2Rad}
        {(\ double\ deg\ )}
        {Converts from degrees to radians}
        {31.1}
\begin{cxxdoc}
Converts from degrees to radians
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{static\ \ \ double}
        {Rad2Deg}
        {(\ double\ rad\ )}
        {Convert from radians to degrees}
        {31.2}
\begin{cxxdoc}
Convert from radians to degrees
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {PlotMeshIntoImage}
        {(\ CDMultiBand\<TAAMPixel\>\ image,\ const\ CAAMMesh\ \&mesh,\ TAAMPixel*\ point\_color,\ TAAMPixel*\ line\_color\ )}
        {Plots a mesh into an image. }
        {31.3}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & The image in which the shape should be plotted.
\\
{\tt\strut shape} & The shape to be plotted.
\\
{\tt\strut point\_color} & The point color of the mesh.
\\
{\tt\strut line\_color} & The line color of the mesh.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-3-2000
\strut}
\cxxSee{PlotShapeIntoImage
\strut}
\begin{cxxdoc}


Plots a mesh into an image.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {PlotShapeIntoImage}
        {(\ CDMultiBand\<TAAMPixel\>\ image,\ const\ CAAMShape\ \&shape,\ TAAMPixel*\ point\_color,\ TAAMPixel*\ line\_color,\ bool\ drawNormals,\ bool\ drawArea,\ bool\ drawPoints,\ bool\ drawLines\ )}
        {Draws the shape into an image with a given color. }
        {31.4}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut image} & The image in which the shape should be plotted.
\\
{\tt\strut shape} & The shape to be plotted.
\\
{\tt\strut point\_color} & The point color of the shape.
\\
{\tt\strut line\_color} & The line color of the shape.
\\
{\tt\strut drawNormals} & If true the point normals are drawn.
\\
{\tt\strut drawArea} & If true the inside area of the shape is drawn.
\\
{\tt\strut drawPoints} & If true the points of the shape is drawn.
\\
{\tt\strut drawLines} & If true the lines of the shape is drawn.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-27-2000
\strut}
\cxxSee{PlotMeshIntoImage
\strut}
\begin{cxxdoc}


Draws the shape into an image with a given color.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {VecCat3}
        {(\ CDVector\ \&dest,\ const\ CDVector\ \&v1,\ const\ CDVector\ \&v2,\ const\ CDVector\ \&v3\ )}
        {Concatenates three vectors }
        {31.5}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut dest} & Output vector.
\\
{\tt\strut v1} & First input vector.
\\
{\tt\strut v2} & Second input vector.
\\
{\tt\strut v3} & Third input vector.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-14-2000
\strut}
\begin{cxxdoc}


Concatenates three vectors.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{std::vector\<CString\>\ }
        {ScanSortDir}
        {(\ const\ CString\ \&path,\ const\ CString\ \&extension\ )}
        {Scans and sorts a directory for files.  }
        {31.6}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut path} & Path to read from.
\\
{\tt\strut extension} & The file extension to search for. ex. "hips".
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & filenames found without any path. 
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-27-2000
\strut}
\begin{cxxdoc}


Scans and sorts a directory for files with a specfied extension.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ReadExample}
        {(\ const\ CString\ \&filename,\ CDMultiBand\<TAAMPixel\>\ \&img,\ CAAMShape\ \&shape,\ int\ rfactor\ )}
        {Reads an image and a shape. }
        {31.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & The filename of an annotation. Ex. "horse.asf".
\\
{\tt\strut img} & Output image.
\\
{\tt\strut shape} & Output shape.
\\
{\tt\strut rfactor} & The reduction factor. Performs a scaling of theinput of 1/rfactor.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing} & (but throws CVisError)@throws   CVisError
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
3-10-2000
\strut}
\cxxSee{ ($\rightarrow$, {\em page \pageref{cxx.}})\strut}
\begin{cxxdoc}


Reads an image and a shape (in the corrosponding .m-file).

\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {DistEuclidianPoints}
        {(const\ CAAMShape\ \&s1,\ const\ CAAMShape\ \&s2\ )}
        {Calculates the point to point error. }
        {31.8}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s1} & Shape 1.
\\
{\tt\strut s2} & Shape 2.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & average point to point error.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
4-6-2000
\strut}
\cxxSee{DistEuclidianAssBorder\ 
\strut}
\begin{cxxdoc}


Calculates the point to point error between two shapes.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {DistEuclidianAssBorder}
        {(const\ CAAMShape\ \&s1,\ const\ CAAMShape\ \&s2,\ CDVector*\ pvDist\ )}
        {Calculates the point to curve error. }
        {31.9}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s1} & Shape 1.
\\
{\tt\strut s2} & Shape 2.
\\
{\tt\strut pvDist} & Optional pointer to an output vector containing all point to curve distances (one for each landmark).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & average point to curve error.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
4-6-2000
\strut}
\cxxSee{DistEuclidianPoints\ 
\strut}
\begin{cxxdoc}


Calculates the point to curve error between two shapes.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {DistEuclidianPoints}
        {(const\ CDVector\&\ vX1,\ const\ CDVector\&\ vY1,\ const\ CDVector\&\ vX2,\ const\ CDVector\&\ vY2\ )}
        {Calculates the point to point error. }
        {31.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vX1} & X-positions of shape 1.
\\
{\tt\strut vY1} & Y-positions of shape 1.
\\
{\tt\strut vX2} & X-positions of shape 2.
\\
{\tt\strut vY2} & Y-positions of shape 2.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & average point to point error.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
4-6-2000
\strut}
\cxxSee{DistEuclidianAssBorder\ 
\strut}
\begin{cxxdoc}


Calculates the point to point error between two shapes.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {DistEuclidianAssBorder}
        {(const\ CDVector\&\ vX1,\ const\ CDVector\&\ vY1,\ const\ CDVector\&\ vX2,\ const\ CDVector\&\ vY2,\ CDVector*\ pvDist\ )}
        {Calculates the point to curve error. }
        {31.11}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vX1} & X-positions of shape 1.
\\
{\tt\strut vY1} & Y-positions of shape 1.
\\
{\tt\strut vX2} & X-positions of shape 2.
\\
{\tt\strut vY2} & Y-positions of shape 2.
\\
{\tt\strut pvDist} & Optional pointer to an output vector containing all point to curve distances (one for each landmark).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & average point to curve error.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
4-6-2000
\strut}
\cxxSee{DistEuclidianPoints\ 
\strut}
\begin{cxxdoc}


Calculates the point to curve error between two shapes.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {PointOnAssBorder}
        {(const\ CDVector\&\ vX1,\ const\ CDVector\&\ vY1,\ const\ CDVector\&\ vX2,\ const\ CDVector\&\ vY2,\ CDVector\&\ vXBorder,\ CDVector\&\ vYBorder,\ CDVector\&\ vDist\ )}
        {Calculates the point to curve error. }
        {31.12}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut vX1} & X-positions of shape 1.
\\
{\tt\strut vY1} & Y-positions of shape 1.
\\
{\tt\strut vX2} & X-positions of shape 2.
\\
{\tt\strut vY2} & Y-positions of shape 2.
\\
{\tt\strut vXBorder} & Output x border.
\\
{\tt\strut vYBorder} & Output y border.
\\
{\tt\strut vDist} & Point to curve distance for each landmark.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
4-6-2000
\strut}
\cxxSee{DistEuclidianPoints\ 
\strut}
\begin{cxxdoc}


Calculates the point to curve error between two shapes.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {ProjPointOnLine}
        {(const\ double\ dXL1,\ const\ double\ dYL1,\ const\ double\ dXL2,\ const\ double\ dYL2,\ const\ double\ dXP,\ const\ double\ dYP,\ double\&\ dXProj,\ double\&\ dYProj)}
        {Find the projection dProj of the point dP on the line through dL1 and dL2. }
        {31.13}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & distance.
\end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
11-22-1999
\strut}
\begin{cxxdoc}


Find the projection dProj of the point dP on the line 
through dL1 and dL2. Returns the distance between dProj 
and dP, if the dProj lays between dL1 and dL2 otherwise DBL\_MAX.  

dXL1,dYL1,dXL2,dYL2: points on line

dXP,dYP: points to project

dXProj,dYProj: projected point on the line


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CString}
        {RemoveExt}
        {(\ const\ CString\ \&s\ )}
        {Removes the extension of a file name. }
        {31.14}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & Input file name.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut File} & name without extension.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-17-2003
\strut}
\begin{cxxdoc}


Removes the extension of a file name.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CString}
        {GetExt}
        {(\ const\ CString\ \&s\ )}
        {Returns the extension of a file name. }
        {31.15}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & Input filename
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & extension.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-17-2003
\strut}
\begin{cxxdoc}


Returns the extension of a file name.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {CreateTest}
        {(\ const\ CString\ \&file\ )}
        {Tests if a file can be created for writing. }
        {31.16}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut file} & Input file name.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True,} & if the file could be created (and deleted again).
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-17-2003
\strut}
\begin{cxxdoc}


Tests if a file can be created for writing.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CString}
        {AddBackSlash}
        {(\ const\ CString\ \&path\ )}
        {Ensures that a string is terminated with a backslash }
        {31.17}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut path} & Input string.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Backslash-terminated} & output string.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-17-2003
\strut}
\begin{cxxdoc}


Ensures that a string is terminated with a backslash.
If the already has a terminating backslash, nothing
is done.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CString}
        {GetPath}
        {(\ const\ CString\ \&fullfilename\ )}
        {Returns the path of a filename. }
        {31.18}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fullfilename} & Filename including any path.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & path to the filename.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-17-2003
\strut}
\begin{cxxdoc}


Returns the path of a filename.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CString}
        {GetFilename}
        {(\ const\ CString\ \&filename\ )}
        {Returns the file name of a path+file name string. }
        {31.19}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Full qualified filename including path.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & file name including any extension, but without any path.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-17-2003
\strut}
\begin{cxxdoc}


Returns the file name of a path+file name string.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CString}
        {ForceExt}
        {(\ const\ CString\ \&filename,\ const\ CString\ \&ext\ )}
        {Forces an extension onto a file name. }
        {31.20}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Input file name.
\\
{\tt\strut ext} & Wanted extension.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & file name including the wanted extension.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-17-2003
\strut}
\begin{cxxdoc}


The method tests the extension of a filename.
If the wanted extension is presented nothing is done.
If not, the extension is appended.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {FileExists}
        {(\ const\ CString\ \&filename\ )}
        {Tests if a file exists. }
        {31.21}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & File name to test.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if the file exists.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-17-2003
\strut}
\begin{cxxdoc}


Tests if a file exists.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ExpandImg2DyadicSize}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&img,\ CDMultiBand\<TAAMPixel\>\ \&out\ )}
        {Expands an image to have dyadic size. }
        {31.22}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut img} & Input image.
\\
{\tt\strut out} & Output dyadic image.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-22-2002
\strut}
\begin{cxxdoc}


The method expands an image by using zero-padding
so that the resulting image �has width and height
that are powers of two.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {MirrorEdge}
        {(\ CDMatrix\ \&m,\ const\ CDMultiBand\<TAAMPixel\>\ \&mask,\ int\ edgeWidth\ )}
        {Mirrors the edge of an arbitrary shape. }
        {31.23}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut img} & Input matrix. Overwritten by mirrored version.
\\
{\tt\strut mask} & Image mask defining the shape.
\\
{\tt\strut edgeWidth} & The width of the edge.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-25-2002
\strut}
\begin{cxxdoc}


Mirrors the edge of an arbitrary shape mask in a matrix
using poor-mans mirroring.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {MirrorEdge}
        {(\ CDMultiBand\<TAAMPixel\>\ \&img,\ const\ CDMultiBand\<TAAMPixel\>\ \&mask,\ int\ edgeWidth\ )}
        {Mirrors the edge of an arbitrary shape. }
        {31.24}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut img} & Input image. Overwritten by mirrored version.
\\
{\tt\strut mask} & Image mask defining the shape.
\\
{\tt\strut edgeWidth} & The width of the edge.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-25-2002
\strut}
\begin{cxxdoc}


Mirrors the edge of an arbitrary shape mask in an image
using poor-mans mirroring.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ShapeInsideImage}
        {(\ const\ CAAMShape\ \&s,\ const\ CDMultiBand\<TAAMPixel\>\ \&img\ )}
        {Tests if a shape is fully inside an image. }
        {31.25}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & Input shape.
\\
{\tt\strut img} & Input image.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if the shape is fully inside the image.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-7-2002
\strut}
\begin{cxxdoc}


Tests if a shape is fully inside an image.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {CalcShapeDistances}
        {(\ const\ CAAMShape\ \&optimized,\ const\ CAAMShape\ \&groundTruth,\ double\ \&ptpt,\ double\ \&ptcrv,\ CDVector*\ pvDists\ )}
        {Calculates optimization results. }
        {31.26}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut optimized} & Model shape.
\\
{\tt\strut groundTruth} & Ground truth shape.
\\
{\tt\strut ptpt} & Average point to point landmark error.
\\
{\tt\strut ptcrv} & Average point to curve landmark error.NOTICE: This is not a symmetric measure!
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-10-2000
\strut}
\begin{cxxdoc}


Calculates optimization results.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CString}
        {Secs2Mins}
        {(\ double\ secs\ )}
        {Converts seconds to a MM:SS string. }
        {31.27}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut secs} & Time in seconds.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & time in MM:SS.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
8-2-2002
\strut}
\begin{cxxdoc}


Converts seconds to a MM:SS string.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CString}
        {FindVacantFilename}
        {(\ const\ CString\ \&filename\_suggestion\ )}
        {Finds a file name that is not 'occupied'. }
        {31.28}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename\_suggestion} & Suggestion including extension.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut An} & unused filename resembling the suggstion.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
9-3-2002
\strut}
\begin{cxxdoc}


This method finds a file name that is not 'occupied' by
adding at number to the base part of the suggested
file name.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SampleTextures}
        {(\ const\ CAAMShapeCollection\ \&unalignedShapes,\ std::vector\<\ CDVector\ \>\ \&vTextures,\ CAAMReferenceFrame\ \&outputRF,\ const\ int\ imageReduction,\ const\ bool\ removeMean,\ const\ bool\ useTSP,\ const\ bool\ useConvexHull\ )}
        {Samples a set of texture vectors given a set of shape in absolute (i.e. image) coordinates. }
        {31.29}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut unalignedShapes} & Shapes in absolute coordinates.
\\
{\tt\strut vTextures} & The set of textures.
\\
{\tt\strut outputRF} & The output reference frame generated for sampling the textures.
\\
{\tt\strut removeMean} & If true the mean from each texture vector (i.e. the DC) isremoved.
\\
{\tt\strut useTSP} & Use tangent space projection toalign the shapes.
\\
{\tt\strut useConvexHull} & If true the convex hull is usedto determine the extent of a shape.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut } & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-29-2002
\strut}
\begin{cxxdoc}


Samples a set of texture vectors given a set of
shape in absolute (i.e. image) coordinates.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {RegistrationMovie}
        {(\ const\ CString\ \&filename,\ const\ std::vector\<CDVector\>\ \&vTexture,\ const\ CAAMReferenceFrame\ \&rf\ )}
        {Writes a movie file containing a set of textures  warped to their mean shape. }
        {31.30}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Output movie filename.  
\\
{\tt\strut vTexture} & The set of textures.
\\
{\tt\strut rf} & The reference frame used for samplingthe textures.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-29-2002
\strut}
\begin{cxxdoc}


Writes a movie file containing a set of textures 
warped to their mean shape.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {RegistrationMovie}
        {(\ const\ CString\ \&filename,\ const\ CString\ asfPath,\ const\ bool\ useConvexHull,\ const\ bool\ writeRefShape\ )}
        {Writes a movie file containing all shapes from a directory warped to their mean shape. }
        {31.31}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Output movie filename.
\\
{\tt\strut asfPath} & Path to annotation files.
\\
{\tt\strut useConvexHull} & If true the convex hull is usedto determine the extent of a shape.
\\
{\tt\strut writeRefShape} & If true the reference shape correspondingto the movie file is written as "regshape.asf".
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
10-29-2002
\strut}
\begin{cxxdoc}


Writes a movie file containing all shapes from a
directory warped to their mean shape.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ASF2PTS}
        {(\ const\ CString\ \&path\ )}
        {Converts AAM-API shape files (.asf) to the ISBE .pts format. }
        {31.32}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut path} & Path to .asf files.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
12-3-2002
\strut}
\begin{cxxdoc}


Converts AAM-API shape files (.asf) to the ISBE .pts format.
Output is written in the directory 'pts'.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {SymmetricPtCrv}
        {(\ const\ CAAMShape\ \&s1,\ const\ CAAMShape\ \&s2\ )}
        {A symmetric point-to-curve measure. }
        {31.33}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s1} & First shape
\\
{\tt\strut s2} & Second shape
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & average symmetric point-to-curve error over all landmarks.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-9-2003
\strut}
\cxxSee{DistEuclidianAssBorder
\strut}
\begin{cxxdoc}


A symmetric poin- to-curve measure, i.e.

SymmetricPtCrv(a,b) == SymmetricPtCrv( b,a );


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{double}
        {ShapeOverlap}
        {(\ const\ CAAMShape\ \&model,\ const\ CAAMShape\ \&gt\ )}
        {Calculates the overlap between two shapes. }
        {31.34}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut model} & Model shape
\\
{\tt\strut gt} & Ground truth shape
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut The} & shape overlap (1 = perfect match, 0 = no overlap).
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-9-2003
\strut}
\begin{cxxdoc}


Calculates the overlap between two shapes as specified in
"Active Shape Model Segmentation With Optimal Features"
Bram van Ginneken et al., IEEE TMI 21(8) Aug. 2002.

Notice that this only makes sense for one-path closed shapes.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{std::vector\<CString\>\ }
        {ReadLines}
        {(\ const\ CString\ \&filename\ )}
        {Reads a file into an array of lines. }
        {31.35}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & Name of input file.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & vector of text lines.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-22-2003
\strut}
\begin{cxxdoc}


Reads a file into an array of lines.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMPropsReader}
        {:\ public\ CAAMObject}
        {Simple lo-fi property reader. }
        {32}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-17-2000
\strut}
\cxxSee{CAAMBuilder::ReadACF(),\ CAAMShape::ReadASF()
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{32}{CAAMPropsReader}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{void}
        {Sync}
        {()}
        {Skips whitespace and any commments preceeding the current file position}
        {32.1}
\cxxitem{bool}
        {IsValid}
        {()}
        {Returns true if the file is valid}
        {32.2}
\cxxitem{FILE*}
        {FH}
        {()}
        {Current open file}
        {32.3}
\cxxitem{}
        {CAAMPropsReader}
        {(\ const\ CString\ \&filename\ )}
        {Constructor. }
        {32.4}
\cxxitem{}
        {\cxxtilde CAAMPropsReader}
        {()}
        {Destructor. }
        {32.5}
\cxxitem{void}
        {SkipWhiteSpace}
        {()}
        {Increments the file pointer beyond any white space. }
        {32.6}
\cxxitem{void}
        {SkipRestOfLine}
        {()}
        {Increments the file pointer to the start of the next line. }
        {32.7}
\cxxitem{bool}
        {MoreNonWhiteSpaceOnLine}
        {()}
        {Returns true if more white space is present. }
        {32.8}
\cxxitem{void}
        {SkipComments}
        {()}
        {Increments the file pointer beyond any comments. }
        {32.9}
\end{cxxpublic}
\begin{cxxdoc}


Simple lo-fi property reader. Used as naive parser/scanner
for the .asf, acf files et cetera.


\end{cxxdoc}
\begin{cxxfunction}
{void}
        {Sync}
        {()}
        {Skips whitespace and any commments preceeding the current file position}
        {32.1}
\begin{cxxdoc}
Skips whitespace and any commments preceeding the current file position
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {IsValid}
        {()}
        {Returns true if the file is valid}
        {32.2}
\begin{cxxdoc}
Returns true if the file is valid
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{FILE*}
        {FH}
        {()}
        {Current open file}
        {32.3}
\begin{cxxdoc}
Current open file
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMPropsReader}
        {(\ const\ CString\ \&filename\ )}
        {Constructor. }
        {32.4}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & The file to open.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-17-2000
\strut}
\begin{cxxdoc}


Constructor. Opens the file.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMPropsReader}
        {()}
        {Destructor. }
        {32.5}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-17-2000
\strut}
\begin{cxxdoc}


Destructor. Closes the file.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SkipWhiteSpace}
        {()}
        {Increments the file pointer beyond any white space. }
        {32.6}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-17-2000
\strut}
\begin{cxxdoc}


Increments the file pointer beyond any white space.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SkipRestOfLine}
        {()}
        {Increments the file pointer to the start of the next line. }
        {32.7}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-17-2000
\strut}
\begin{cxxdoc}


Increments the file pointer to the start of the next line.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {MoreNonWhiteSpaceOnLine}
        {()}
        {Returns true if more white space is present. }
        {32.8}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-17-2000
\strut}
\begin{cxxdoc}


Returns true if more white space is present on the current line.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SkipComments}
        {()}
        {Increments the file pointer beyond any comments. }
        {32.9}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-17-2000
\strut}
\begin{cxxdoc}


Increments the file pointer beyond any comments.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMVisualizer}
        {}
        {Class that visualizes different aspects of a model. }
        {33}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-8-2002
\strut}
\cxxSee{CAAMUtil
\strut}
\begin{cxxpublic}
\cxxitem{}
        {CAAMVisualizer}
        {(\ const\ CAAMModel*\ pModel\ )}
        {Constructor. }
        {33.1}
\cxxitem{}
        {\cxxtilde CAAMVisualizer}
        {()}
        {Destructor. }
        {33.2}
\cxxitem{void}
        {OptimizationMovie}
        {(\ const\ std::vector\<CAAMModel::CAAMOptState\>\ \&optStates,\ const\ CDMultiBand\<TAAMPixel\>\ \&img,\ const\ char*\ filename,\ const\ int\ frameRate\ )\ const\ }
        {Visualizes the iterations during a model search. }
        {33.3}
\cxxitem{void}
        {ShapeStill}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&img,\ const\ CAAMShape\ \&shape,\ const\ char*\ filename\ )}
        {Plots a shape into an image and save it to disk. }
        {33.4}
\cxxitem{void}
        {WriteEigenImages}
        {()\ const\ }
        {Writes the texture eigen modes as shape-free images. }
        {33.5}
\cxxitem{void}
        {WritePredictionImages}
        {()\ const\ }
        {Writes the parameter update matrix as shape-free images. }
        {33.6}
\cxxitem{bool}
        {TextureMovie}
        {(\ const\ CString\ \&filename,\ const\ int\ nbModes,\ const\ double\ range,\ const\ int\ steps,\ const\ bool\ whiteBackground\ )\ const\ }
        {Generates movies files showing each mode of texture variation. }
        {33.7}
\cxxitem{bool}
        {ShapeMovie}
        {(\ const\ CString\ \&filename,\ const\ int\ nbModes,\ const\ double\ range,\ const\ int\ steps,\ const\ bool\ whiteBackground\ )\ const\ }
        {Generates movies files showing each mode of shape variation. }
        {33.8}
\cxxitem{bool}
        {CombinedMovie}
        {(\ const\ CString\ \&filename,\ const\ int\ nbModes,\ const\ double\ range,\ const\ int\ steps,\ const\ bool\ whiteBackground\ )\ const\ }
        {Generates movies files showing each mode of combined variation. }
        {33.9}
\cxxitem{bool}
        {RegistrationMovie}
        {(\ const\ CString\ \&filename,\ const\ std::vector\<CDVector\>\ \&vTexture\ )\ const\ }
        {Generates a movie of the registered training set. }
        {33.10}
\end{cxxpublic}
\begin{cxxdoc}


Class that visualizes different aspects of a model.

For visualization of e.g. annotations without a model
see CAAMUtil.


\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMVisualizer}
        {(\ const\ CAAMModel*\ pModel\ )}
        {Constructor. }
        {33.1}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut pModel} & Pointer to the model that you want visualised.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-8-2002
\strut}
\begin{cxxdoc}


Constructor that sets the model pointer.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMVisualizer}
        {()}
        {Destructor. }
        {33.2}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-8-2002
\strut}
\begin{cxxdoc}


Destructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {OptimizationMovie}
        {(\ const\ std::vector\<CAAMModel::CAAMOptState\>\ \&optStates,\ const\ CDMultiBand\<TAAMPixel\>\ \&img,\ const\ char*\ filename,\ const\ int\ frameRate\ )\ const\ }
        {Visualizes the iterations during a model search. }
        {33.3}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut optStates} & An array of optimization states.
\\
{\tt\strut img} & The image used for model searching.
\\
{\tt\strut filename} & The output movie filename, e.g. 'search.avi'.
\\
{\tt\strut frameRate} & The number of frame per second.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-7-2002
\strut}
\begin{cxxdoc}


This method visualizes the iterations during a model search.
Output format is an AVI-file that you can put into e.g. 
Powerpoint to impress your supervisor with.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {ShapeStill}
        {(\ const\ CDMultiBand\<TAAMPixel\>\ \&img,\ const\ CAAMShape\ \&shape,\ const\ char*\ filename\ )}
        {Plots a shape into an image and save it to disk. }
        {33.4}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut img} & Image to plot shape onto.
\\
{\tt\strut shape} & Shape in image coordinates.
\\
{\tt\strut fileman} & Destination image file, e.g. 'result.bmp'.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
5-7-2002
\strut}
\begin{cxxdoc}


Plots a shape into an image and save it to disk.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {WriteEigenImages}
        {()\ const\ }
        {Writes the texture eigen modes as shape-free images. }
        {33.5}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-26-2002
\strut}
\begin{cxxdoc}


This method converts each column of the texture eigen
vectors into corresponding shape-free images and save
them to disk in the BMP format.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {WritePredictionImages}
        {()\ const\ }
        {Writes the parameter update matrix as shape-free images. }
        {33.6}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-26-2002
\strut}
\begin{cxxdoc}


This method converts each column of the parameter update
matrices into corresponding shape-free images and save
them to disk in the BMP format.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {TextureMovie}
        {(\ const\ CString\ \&filename,\ const\ int\ nbModes,\ const\ double\ range,\ const\ int\ steps,\ const\ bool\ whiteBackground\ )\ const\ }
        {Generates movies files showing each mode of texture variation. }
        {33.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & The output filename excl. extension.
\\
{\tt\strut nbModes} & The number of modes to generate movies from.
\\
{\tt\strut range} & The rendered range in standard deviations.	
\\
{\tt\strut steps} & The number of frames to generate to reach 'range'.Thus the total number of frames will be 2*step+1.(the +1 term is the mean texture).
\\
{\tt\strut whiteBackground} & If true the background is rendered in white.Default is black.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on file errors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-28-2000
\strut}
\cxxSee{Shape,\ Combined
\strut}
\begin{cxxdoc}


Generates movies files showing each mode of texture variation by
adjusting the each mode of variation to 

+/- 'range' times \<the mode standard deviation\>

in 2*'step'+1 steps.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {ShapeMovie}
        {(\ const\ CString\ \&filename,\ const\ int\ nbModes,\ const\ double\ range,\ const\ int\ steps,\ const\ bool\ whiteBackground\ )\ const\ }
        {Generates movies files showing each mode of shape variation. }
        {33.8}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & The output filename excl. extension.
\\
{\tt\strut nbModes} & The number of modes to generate movies from.
\\
{\tt\strut range} & The rendered range in standard deviations.
\\
{\tt\strut steps} & The number of frames to generate to reach 'range'.Thus the total number of frames will be 2*step+1.(the +1 term is the mean shape).
\\
{\tt\strut whiteBackground} & If true the background is rendered in white.Default is black.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on file errors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-28-2000
\strut}
\cxxSee{Texture,\ Combined
\strut}
\begin{cxxdoc}


Generates movies files showing each mode of shape variation by
adjusting the each mode of variation to 

+/- 'range' times \<the mode standard deviation\>

in 2*'step'+1 steps.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {CombinedMovie}
        {(\ const\ CString\ \&filename,\ const\ int\ nbModes,\ const\ double\ range,\ const\ int\ steps,\ const\ bool\ whiteBackground\ )\ const\ }
        {Generates movies files showing each mode of combined variation. }
        {33.9}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & The output filename excl. extension.
\\
{\tt\strut nbModes} & The number of modes to generate movies from.
\\
{\tt\strut range} & The rendered range in standard deviations.
\\
{\tt\strut steps} & The number of frames to generate to reach 'range'.Thus the total number of frames will be 2*step+1.(the +1 term is the mean shape).
\\
{\tt\strut whiteBackground} & If true the background is rendered in white.Default is black.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on success, false on file errors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-25-2000
\strut}
\cxxSee{Texture,\ Shape
\strut}
\begin{cxxdoc}


Generates movies files showing each mode of combined shape and
texture variation by adjusting the each mode of variation to:

+/- 'range' times \<the mode standard deviation\>

in 2*'step'+1 steps.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {RegistrationMovie}
        {(\ const\ CString\ \&filename,\ const\ std::vector\<CDVector\>\ \&vTexture\ )\ const\ }
        {Generates a movie of the registered training set. }
        {33.10}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut filename} & The output filename.  
\\
{\tt\strut m\_vTexture} & The vector of textures. 
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut true} & on succes, false on file errors.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
2-22-2000
\strut}
\cxxSee{CombinedMovie,\ TextureMovie,\ ShapeMovie
\strut}
\begin{cxxdoc}


Generates a movie of the registered training set by warping
each texture to the mean shape and output this to an AVI-file.


\end{cxxdoc}
\end{cxxfunction}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMWarp}
        {:\ public\ CAAMObject}
        {Base class for 2D warp classes. }
        {34}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-14-2000
\strut}
\cxxSee{CAAMWarpLinear
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone}{34}{CAAMWarp}{}
\cxxInheritanceEntry{\cxxNone\cxxLinkPubright}{35}{CAAMWarpLinear}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{}
        {CAAMWarp}
        {()}
        {Constructor}
        {34.6}
\cxxitem{virtual\ inline\ \ \ bool}
        {Warp}
        {(const\ CAAMPoint\ \&in,\ CAAMPoint\ \&out)\ const\ }
        {Warps point 'in' to point 'out'. }
        {34.7}
\cxxitem{virtual\ \ \ void}
        {SetDestShape}
        {(const\ CAAMShape\ \&s)}
        {Sets the shape to warp to}
        {34.8}
\cxxitem{void}
        {UseConvexHull}
        {(\ bool\ enable\ =\ true\ )}
        {Allows warping inside the convex hull (default=off)}
        {34.9}
\cxxitem{}
        {\cxxtilde CAAMWarp}
        {()}
        {Destructor. }
        {34.10}
\cxxitem{void}
        {SetSrcShape}
        {(const\ CAAMShape\ \&s)}
        {Sets the shape to warp from.  }
        {34.11}
\end{cxxpublic}
\begin{cxxprotected}
\cxxitem{bool}
        {m\_bUseConvexHull}
        {}
        {Allows warping inside the convex hull}
        {34.5}
\end{cxxprotected}
\begin{cxxprivate}
\cxxitem{double}
        {m\_dSrcShapeMinX}
        {}
        {Source shape extents}
        {34.1}
\cxxitem{double}
        {m\_dSrcShapeMaxX}
        {}
        {Source shape extents}
        {34.2}
\cxxitem{double}
        {m\_dSrcShapeMinY}
        {}
        {Source shape extents}
        {34.3}
\cxxitem{double}
        {m\_dSrcShapeMaxY}
        {}
        {Source shape extents}
        {34.4}
\end{cxxprivate}
\begin{cxxdoc}


CAAMWarp defines a 2D warp function between two shapes with
an equal amount of points.


\end{cxxdoc}
\begin{cxxfunction}
{}
        {CAAMWarp}
        {()}
        {Constructor}
        {34.6}
\begin{cxxdoc}
Constructor
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{virtual\ inline\ \ \ bool}
        {Warp}
        {(const\ CAAMPoint\ \&in,\ CAAMPoint\ \&out)\ const\ }
        {Warps point 'in' to point 'out'. }
        {34.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut in} & Input point.
\\
{\tt\strut out} & Output point.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if the warp can be done, false if not.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-14-2000
\strut}
\begin{cxxdoc}


Warps the point 'in' to the point 'out' using the two 
shapes as irregular point clouds defining a 2D warp 
function.
'in' defines a point contained in the source shape and
'out' is the corrosponding point in the destination
shape.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{virtual\ \ \ void}
        {SetDestShape}
        {(const\ CAAMShape\ \&s)}
        {Sets the shape to warp to}
        {34.8}
\begin{cxxdoc}
Sets the shape to warp to
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {UseConvexHull}
        {(\ bool\ enable\ =\ true\ )}
        {Allows warping inside the convex hull (default=off)}
        {34.9}
\begin{cxxdoc}
Allows warping inside the convex hull (default=off)
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {\cxxtilde CAAMWarp}
        {()}
        {Destructor. }
        {34.10}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-26-2000
\strut}
\begin{cxxdoc}


Destructor.    


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetSrcShape}
        {(const\ CAAMShape\ \&s)}
        {Sets the shape to warp from.  }
        {34.11}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-26-2000
\strut}
\begin{cxxdoc}


Sets the shape to warp from.  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxvariable}
{bool}
        {m\_bUseConvexHull}
        {}
        {Allows warping inside the convex hull}
        {34.5}
\begin{cxxdoc}
Allows warping inside the convex hull
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{double}
        {m\_dSrcShapeMinX}
        {}
        {Source shape extents}
        {34.1}
\begin{cxxdoc}
Source shape extents
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{double}
        {m\_dSrcShapeMaxX}
        {}
        {Source shape extents}
        {34.2}
\begin{cxxdoc}
Source shape extents
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{double}
        {m\_dSrcShapeMinY}
        {}
        {Source shape extents}
        {34.3}
\begin{cxxdoc}
Source shape extents
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{double}
        {m\_dSrcShapeMaxY}
        {}
        {Source shape extents}
        {34.4}
\begin{cxxdoc}
Source shape extents
\end{cxxdoc}
\end{cxxvariable}
\end{cxxclass}
\begin{cxxclass}
{class\ }
        {CAAMWarpLinear}
        {:\ public\ CAAMWarp}
        {Piece-wise affine warping between two shapes. }
        {35}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
02-14-2000
\strut}
\cxxSee{CAAMWarp	
\strut}
\begin{cxxInheritance}
\paragraph{Inheritance}\strut\smallskip\strut\\
\cxxInheritanceEntry{}{20}{CAAMObject}{\cxxLastPubleft\cxxNone}
\cxxInheritanceEntry{\cxxNone}{34}{CAAMWarp}{\cxxLastPubleft}
\cxxInheritanceEntry[x]{\cxxNone\cxxNone}{35}{CAAMWarpLinear}{}
\end{cxxInheritance}
\begin{cxxpublic}
\cxxitem{bool}
        {HasSrcShape}
        {()\ const\ }
        {Returns true if the source shape has been set}
        {35.3}
\cxxitem{}
        {CAAMWarpLinear}
        {(\ bool\ useSrcDelaunay\ )}
        {Constructor.  }
        {35.4}
\cxxitem{void}
        {SetSrcShape}
        {(const\ CAAMShape\ \&s)}
        {Sets the shape to warp from.  }
        {35.5}
\cxxitem{void}
        {SetDestShape}
        {(const\ CAAMShape\ \&s)}
        {Sets the shape to warp to. }
        {35.6}
\cxxitem{bool}
        {Warp}
        {(const\ CAAMPoint\ \&in,\ CAAMPoint\ \&out)\ const\ }
        {Warps point 'in' to point 'out' (if possible). }
        {35.7}
\end{cxxpublic}
\begin{cxxprivate}
\cxxitem{CAAMMesh}
        {m\_Mesh}
        {}
        {The Delaunay Triangulisation of the source or dest shape}
        {35.1}
\cxxitem{std::vector\<CAAMPoint\>\ }
        {m\_vDestPoints}
        {}
        {The points of the destination shape}
        {35.2}
\end{cxxprivate}
\begin{cxxdoc}


This class implements a piece-wise affine warping 
between two shapes using a Delaunay Triangulisation
of the source shape. 
This triangulisation is the used for both the 
source and destination shape. The 
corrospondance between points and triangles gives
a continuous deformation field inside the triangles.
Since the deformation is performed on a linear 
per-triangle basis, the field is not smooth across
triangles.


\end{cxxdoc}
\begin{cxxfunction}
{bool}
        {HasSrcShape}
        {()\ const\ }
        {Returns true if the source shape has been set}
        {35.3}
\begin{cxxdoc}
Returns true if the source shape has been set
\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{}
        {CAAMWarpLinear}
        {(\ bool\ useSrcDelaunay\ )}
        {Constructor.  }
        {35.4}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut useSrcDelaunay} & If true the Delaunay of the source shape is used.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-26-2000
\strut}
\begin{cxxdoc}


Constructor.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetSrcShape}
        {(const\ CAAMShape\ \&s)}
        {Sets the shape to warp from.  }
        {35.5}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & Input shape.    
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-26-2000
\strut}
\begin{cxxdoc}


Sets the shape to warp from. 


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{void}
        {SetDestShape}
        {(const\ CAAMShape\ \&s)}
        {Sets the shape to warp to. }
        {35.6}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut s} & Input shape.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut Nothing.} & \end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-26-2000
\strut}
\begin{cxxdoc}


Sets the shape to warp to.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{bool}
        {Warp}
        {(const\ CAAMPoint\ \&in,\ CAAMPoint\ \&out)\ const\ }
        {Warps point 'in' to point 'out' (if possible). }
        {35.7}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut in} & Input point.
\\
{\tt\strut out} & Output point.  
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut True} & if 'in' is inside the source mesh, false if not.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
4-26-2000
\strut}
\begin{cxxdoc}


Warps point 'in' to point 'out' (if possible).  


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxvariable}
{CAAMMesh}
        {m\_Mesh}
        {}
        {The Delaunay Triangulisation of the source or dest shape}
        {35.1}
\begin{cxxdoc}
The Delaunay Triangulisation of the source or dest shape
\end{cxxdoc}
\end{cxxvariable}
\begin{cxxvariable}
{std::vector\<CAAMPoint\>\ }
        {m\_vDestPoints}
        {}
        {The points of the destination shape}
        {35.2}
\begin{cxxdoc}
The points of the destination shape
\end{cxxdoc}
\end{cxxvariable}
\end{cxxclass}
\begin{cxxfunction}
{CAAMAnalyzeSynthesize*}
        {AAMLoadAnalyzerSynthesizer}
        {(\ FILE*\ fh,\ const\ CAAMReferenceFrame\ \&rf\ )}
        {Analyzer/Synthesizer loader. }
        {36}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Open binary stream.
\\
{\tt\strut pModel} & Model pointer (currently not used).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & pointer to an Analyzer/Synthesize object created on the heap.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
6-13-2002
\strut}
\begin{cxxdoc}


The function loads an Analyzer/Synthesizer from a stream,
instantiates the correct concrete class and returns a
base class pointer.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{CAAMTransferFunction*}
        {AAMLoadTransferFunction}
        {(\ FILE*\ fh,\ CAAMModel*\ pModel\ )}
        {Transfer function loader. }
        {37}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut fh} & Open binary stream.
\\
{\tt\strut pModel} & Model pointer (currently not used).
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut A} & pointer to a transfer function created on the heap.
\end{tabular}}
\cxxAuthor{
Mikkel B. Stegmann
\strut}
\cxxVersion{
1-29-2002
\strut}
\begin{cxxdoc}


The function loads a transfer function from a stream,
instantiates the correct concrete class and returns a
base class pointer.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{template\<class\ TPixel\>\ \ void}
        {DIVAEnlargeImage}
        {(\ CVisImage\<TPixel\>\ \&img,\ int\ nFactor)}
        {Enlarge the image.  }
        {38}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut img} & Input image.
\\
{\tt\strut nFactor} & The factor to enlarge the width and height of the image.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut } & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
2-22-1999
\strut}
\cxxSee{DIVAReduceImage\ 
\strut}
\begin{cxxdoc}


Enlarge the image.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxfunction}
{template\<class\ TPixel\>\ \ void}
        {DIVAReduceImage}
        {(\ CVisImage\<TPixel\>\ \&img,\ int\ nFactor)}
        {Reduce the image. }
        {39}
\cxxParameter{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut img} & Input image.
\\
{\tt\strut nFactor} & The factor to reduce the width and height of the image.
\end{tabular}}
\cxxReturn{
\begin{tabular}[t]{lp{0.5\textwidth}}
{\tt\strut } & \end{tabular}}
\cxxAuthor{
Rune Fisker
\strut}
\cxxVersion{
2-22-1999
\strut}
\cxxSee{DIVAEnlargeImage\ 
\strut}
\begin{cxxdoc}


Reduce the image.


\end{cxxdoc}
\end{cxxfunction}
\begin{cxxClassGraph}
\label{cxx.}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{1}{CAAMAnalyzeSynthesize}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{3}{CAAMAnalyzeSynthesizeSoftware}{}
\cxxClassGraphEntry{\cxxLinkPubright}{2}{CAAMAnalyzeSynthesizeOpenGL}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{9.1}{CAAMInitEntry}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{9.2}{CAAMInitCandidates}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{12}{CAAMMathUtil}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{13}{CAAMPoint}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{14}{CAAMTriangle}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{16.2}{CAAMOptRes}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{19}{CAAMMovieAVI}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{20}{CAAMObject}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{34}{CAAMWarp}{}
\cxxClassGraphEntry{\cxxLong\cxxLinkPubright}{35}{CAAMWarpLinear}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{31}{CAAMUtil}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{27}{CAAMTransferFunction}{}
\cxxClassGraphEntry{\cxxLong\cxxLinkPubRight}{30}{CAAMTFUniformStretch}{}
\cxxClassGraphEntry{\cxxLong\cxxLinkPubRight}{29}{CAAMTFLookUp}{}
\cxxClassGraphEntry{\cxxLong\cxxLinkPubright}{28}{CAAMTFIdentity}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{26}{CAAMTest}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{24}{CAAMShapeCollection}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{23}{CAAMShape}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{32}{CAAMPropsReader}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{21}{CAAMOptimize}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{18}{CAAMModelSeq}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{16}{CAAMModel}{}
\cxxClassGraphEntry{\cxxLong\cxxLinkPubright}{17}{CAAMModelMS}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{15}{CAAMMesh}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{11}{CAAMLog}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{10}{CAAMLinearReg}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{8}{CAAMInitialize}{}
\cxxClassGraphEntry{\cxxLong\cxxLinkPubright}{9}{CAAMInitializeStegmann}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{7}{CAAMDelaunay}{}
\cxxClassGraphEntry{\cxxLinkPubRight}{5}{CAAMDeform}{}
\cxxClassGraphEntry{\cxxLong\cxxLinkPubright}{6}{CAAMDeformPCA}{}
\cxxClassGraphEntry{\cxxLinkPubright}{4}{CAAMBuilder}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{22}{CAAMReferenceFrame}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{23.1}{CAAMPointInfo}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{25}{CAAMEvaluationResults}{}
\strut\\[5pt]\goodbreak
\cxxClassGraphEntry{}{33}{CAAMVisualizer}{}
\end{cxxClassGraph}
