00001 #ifndef __REMAP_H__
00002 #define __REMAP_H__
00003
00004 #include <stdint.h>
00005 #include "processor.h"
00006
00007 namespace remap {
00008
00009 class Remap : public spectral::Processor
00010 {
00011 public:
00012 Remap();
00013 virtual ~Remap();
00014
00015 protected:
00016
00017
00018
00019 virtual uint32_t GetInterface(
00020 std::list<std::pair<uint32_t, uint32_t> > &mandatory,
00021 std::list<std::pair<uint32_t, uint32_t> > &optional) const;
00022
00023
00024 virtual bool SetImage(uint32_t type, const spectral::Image *img);
00025
00026
00027 virtual void SetParameters(const spectral::Parameters *);
00028
00029
00030 virtual spectral::Image *Process(void);
00031
00032
00033 virtual void ClearImage(uint32_t type);
00034
00035 protected:
00036
00037
00038 virtual void GetParameters(spectral::Parameters *) const;
00039
00040 private:
00041 void GetBackground(float x, float y, float r, float coverage,
00042 uint32_t samples,
00043 const spectral::Image *img,
00044 float *background);
00045
00046
00047
00048 const spectral::Image *m_picture;
00049
00050 float m_x1, m_y1, m_x2, m_y2, m_x3, m_y3;
00051 float m_zenith_x, m_zenith_y;
00052 float m_phi1;
00053 bool m_auto_width;
00054 bool m_move_zenith;
00055 int m_width;
00056 int m_samples;
00057 int m_bg_cover;
00058 uint32_t m_filter;
00059 };
00060
00061 }
00062
00063 #endif