/*
 * class PfgWriter
 *
 * $Date$
 * $Revision$
 *
 */

#ifndef PFG_WRITER_HH__
#define PFG_WRITER_HH__

#include "WImage/GreymapWriter.hh"

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

/**
 * A PFG image file writer. Dimensions are known from the {\em ImageArray}
 * object. Only grey-scale PFGs are supported.
 */
class 
PfgWriter: public GreymapWriter
{
public:
  
  /** Constructor. Only calls the mother class' constructor to initialize
   * the {\em ImageArray} reference and set the offset if necessary. 
   * @param name
   * the file name
   * @param data
   * the reference to the {\em ImageArray} object */
  PfgWriter (char const *name, ImageArray<coeff> &data)
    : GreymapWriter (name, data) {}

  /** Destructor - does nothing. */
  virtual ~PfgWriter (void) {}

protected: 
  /** Write a PFG image file. This is the method that does the actual
   * work. It will be called by the {\em write ()} method.
   * @return 
   * 0 if successful, -1 on write error. */
  virtual int writefmt (void);
  
}; /* class PfgWriter */

/** @} */

#endif /* PFG_WRITER_HH__ */
