/*
 * class VideoFrame
 *
 * $Date$
 * $Revision$
 *
 */

#ifndef VIDEO_FRAME_HH__
#define VIDEO_FRAME_HH__

#include "WImage/StillImage.hh"
#include "WImage/VideoArray.hh"

/** 
 * @addtogroup WImage 
 * @{ */

/**
 * A video frame in black-white. Almost identical to StillImage, contains
 * some optimization stuff for videos.
 */
class 
VideoFrame: public StillImage
{
public:
  
  /** Constructor. Creates an empty image with given dimensions. Unlike
   * in the StillImage class the memory holding the coefficients is held
   * externally and contains all frames. The VideoArray object automatically
   * returns data from the frame which has previously been set as the current
   * one. No boundary checking is done!
   * @param va
   * a pointer to the VideoArray holding all frames */
  VideoFrame (VideoArray < coeff > *va);
  /** Destructor. Deallocates objects. */
  virtual ~VideoFrame (void);

  /** Produce a copy. Every dynamically object will be cloned rather than
   * passing on the reference. This operation returns a StillImage and not
   * a VideoFrame, since a VideoFrame always depends on the external 
   * VideoArray, so that the copy would only alias to the same external
   * memory!
   * @return
   * the new, copied object. */
  virtual Image *clone (void) const;

protected:

}; /* class VideoFrame */

/** @} */

#endif /* VIDEO_FRAME_HH__ */

