/**
 * @file LocalFeatureOpponnentSift.h
 * @brief local feature with color sift
 * @author Björn Fröhlich, Alexander Freytag
 * @date 03/08/2010

 */
#ifndef LocalFeatureOpponnentSiftINCLUDE
#define LocalFeatureOpponnentSiftINCLUDE

// nice-core includes
#include <core/basics/Config.h>
// 
#include <core/image/ImageT.h>
// 
#include <core/imagedisplay/ImageDisplay.h>
// 
#include <core/vector/VectorT.h>
#include <core/vector/MatrixT.h>



// nice-vislearning includes
#include "LocalFeatureRGBSift.h"


namespace OBJREC
{
/** local feature with sift */

class LocalFeatureOpponnentSift : public LocalFeatureRGBSift
{

  protected:
    
    /////////////////////////
    /////////////////////////
    // PROTECTED VARIABLES //
    /////////////////////////
    /////////////////////////     
    
//TODO check why those member variables have been declared here originally. In the source code, they're not used at all...    
//     int octaves;
//     
//     int levels;
//     
//     bool normalizeFeature;
//     
//     int first_octave;
//     
//     double magnif;

  public:
    
    ///////////////////// ///////////////////// /////////////////////
    //                   CONSTRUCTORS / DESTRUCTORS
    ///////////////////// ///////////////////// /////////////////////   

    /** 
     * @brief default constructor
     * @date 09-02-2014 (dd-mm-yyyy )
     * @author Alexander Freytag
     */
    LocalFeatureOpponnentSift ( );    
    
    /**
     * @brief recommended constructor, calls initFromConfig
     * @date 09-02-2014 (dd-mm-yyyy )
     * @author Alexander Freytag
     */
    LocalFeatureOpponnentSift ( const NICE::Config * _conf );

    /**
     * @brief simple destructor
     */
    virtual ~LocalFeatureOpponnentSift();
    
    /** 
     * @brief Jobs previously performed in the config-version of the constructor, read settings etc.
     * @author Alexander Freytag
     * @date 09-02-2014 ( dd-mm-yyyy )
     */    
    virtual void initFromConfig ( const NICE::Config * _conf, const std::string & _confSection = "LocalFeatureOpponnentSift");     
    
    ///////////////////// ///////////////////// /////////////////////
    //                      FEATURE STUFF
    ///////////////////// ///////////////////// //////////////////     


    /**
     * get the descriptor
     * @param img input image
     * @param positions positions for the SIFT features
     * @param descriptors output
     * @return 0
     */
    int getDescriptors ( const NICE::ColorImage & cimg, NICE::VVector & positions, NICE::VVector & descriptors ) const;
    
                                 
    ///////////////////// INTERFACE PERSISTENT /////////////////////
    // interface specific methods for store and restore
    ///////////////////// INTERFACE PERSISTENT /////////////////////   
    
    /** 
     * @brief Load object from external file (stream)
     * @author Alexander Freytag
     * @date 09-02-2014 ( dd-mmyyyy)
     */     
    virtual void restore ( std::istream & is, int format = 0 );
    
    /** 
     * @brief Save object to external file (stream)
     * @author Alexander Freytag
     * @date 09-02-2014 ( dd-mmyyyy)
     */       
    virtual void store( std::ostream & os, int format = 0 ) const;
    
    /** 
     * @brief Clear  object
     * @author Alexander Freytag
     * @date 09-02-2014 ( dd-mmyyyy)
     */    
    virtual void clear ();      
};


} // namespace

#endif
