 CAAMShape m_MeanShapeBeforeTS
 The meanshape prior to tangent space projection (calculated during alignment)
 double m_dAvgSize
 The average shape size (calculated during alignment)
 CString m_szPath
 Path to the asf files (if any)
 inline int NShapes() const
 The number of shapes in the collection
 inline int NPoints() const
 The number of points in each of shape
 double MeanSize() const
 Returns the average shape size *before* the aligment process
 const CString& Path() const
 Returns the path of all shapes
 Assignment operator
 Assignment operator
 CAAMShapeCollection()

Constructor.
 Author:
 Mikkel B. Stegmann
 Version:
 7272000
 ~CAAMShapeCollection()

Destructor.
 Author:
 Mikkel B. Stegmann
 Version:
 7272000
 void Insert(const CAAMShape &s)

 Parameters:
 s  The input shape.
 Author:
 Mikkel B. Stegmann
 Version:
 7272000
 int ToMatlab(const CString& sFilename, const CString& sName, const CString& sComment, bool fAppend) const

Writes the shapes in a (NShapes x 2*NPoints) matrix in Matlab
(*.m) format.
The ith row thus contains the ith shape in xxxyy format.
 Parameters:
 sFilename  Filename including path to be written.
sName  The matlab variable name of the matrix.
sComment  An optional comment.
fAppend  Addend to an existing file or overwrite.
 Returns:
 Zero on sucess, nonzero if no shapes are stored in the
collection.
 Author:
 Mikkel B. Stegmann
 Version:
 02092000
 int AlignShapes( bool use_tangentspace )

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).
 Returns:
 Zero on succes.
 Author:
 Mikkel B. Stegmann
 Version:
 02092000
 void MeanShape(CAAMShape &meanShape) const

Calcs the mean shape of all shapes.
 Parameters:
 meanShape  The output mean shape.
 Author:
 Mikkel B. Stegmann
 Version:
 7272000
 See Also:
 void ReferenceShape(CAAMShape &refShape) const

Calcs the mean shape of all aligned shapes and size it to mean size.
 Parameters:
 refShape  The output reference shape.
 Author:
 Mikkel B. Stegmann
 Version:
 7272000
 See Also:
 double MinX() const

 Returns:
 The xminimum.
 Author:
 Mikkel B. Stegmann
 Version:
 5152000
 double MaxX() const

 Returns:
 The xmaximum.
 Author:
 Mikkel B. Stegmann
 Version:
 5152000
 double MinY() const

 Returns:
 The xminimum.
 Author:
 Mikkel B. Stegmann
 Version:
 5152000
 double MaxY() const

 Returns:
 The ymaximum.
 Author:
 Mikkel B. Stegmann
 Version:
 5152000
 void Scale( const double s, const bool aroundCOG )

Scale the shapes.
 Parameters:
 s  Scale factor.
aroundCOG  If true the scale is being done around the
cog of the shape instead of around the global
center.
 Returns:
 Nothing.
 Author:
 Mikkel B. Stegmann
 Version:
 3152000
 void Expand( int nPixels )

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.
 Parameters:
 nPixels  The number of pixel to expand the shape with.
 Returns:
 Nothing.
 Author:
 Mikkel B. Stegmann
 Version:
 442000
 void ToFile(const CString& sFilename) const

Write the set of shapes to a binary file.
 Parameters:
 sFilename  Destination filename.
 Returns:
 Nothing.
 Author:
 Mikkel B. Stegmann
 Version:
 542000
 See Also:
 FromFile
 void FromFile(const CString& sFilename)

 Parameters:
 sFilename  The filename.
 Returns:
 Nothing.
 Author:
 Mikkel B. Stegmann
 Version:
 3152000
 void ToFile( FILE* fh ) const

Write the set of shapes to a binary file.
 Parameters:
 fh  Destination file handle.
 Returns:
 Nothing.
 Author:
 Mikkel B. Stegmann
 Version:
 542000
 See Also:
 FromFile
 void FromFile( FILE* fh )

 Parameters:
 fh  An open file handle.
 Returns:
 Nothing.
 Author:
 Mikkel B. Stegmann
 Version:
 3152000
 bool ReadShapes( const std::vector<CString> &asfFiles, bool validate )

Reads a set of shapes in the order given in the
vector of strings.
 Parameters:
 asfFiles  Vector of asf filenames.
validate  Validates that all shapes have the
same number of points.
 Returns:
 True on a valid training set  otherwise false.
 Author:
 Mikkel B. Stegmann
 Version:
 10242000
 bool ReadDir( const CString &path, bool validate )

Scans a dir for annotations (.asf) and read shapes
in alphabetical order.
 Parameters:
 path  Full path to annotations.
validate  Validates that all shapes have the
same number of points.
 Returns:
 True on a valid training set  otherwise false.
 Author:
 Mikkel B. Stegmann
 Version:
 10242000
 void Rel2Abs( int rfactor )

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 :(
 Parameters:
 rfactor  Optional reduction factor. Performs a scaling of the
the shape by 1/rfactor. Default 1 i.e. no scaling.
 Returns:
 Nothing.
 Author:
 Mikkel B. Stegmann
 Version:
 10252000