/*
 * class PfgReader
 *
 * $Date$
 * $Revision$
 *
 */

#ifndef PFG_READER_HH__
#define PFG_READER_HH__

#include "WImage/GreymapReader.hh"

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

/**
 * A PFG file reader. Only grey-scale PFGs are supported.
 */
class 
PfgReader: public GreymapReader
{
public:
  /** Constructor. Only calls the mother class' constructor to initialize
   * the {\em ImageArray} reference. 
   * @param name
   * the file name
   * @param data
   * the reference to the {\em ImageArray} object */
  PfgReader (char const * name, ImageArray<coeff> &data)
    : GreymapReader (name, data) {}

  /** Destructor - does nothing. */
  virtual ~PfgReader (void) {}
  
protected:
  /** Read the PFG file format. This does the actual work of reading and
   * parsing the image file. It gets called by the {\em read ()} method.
   * @return 
   * 0 if successful, -1 on read error, -2 on file format error. */
  virtual int readfmt (void);

}; /* class PfgReader */

/** @} */

#endif /* PFG_READER_HH__ */
