00001 #ifndef __GLOBAL_H__
00002 #define __GLOBAL_H__
00003
00004 #include <vector>
00005
00006 #include <stdint.h>
00007
00008 #include "utils.h"
00009 #include "image.h"
00010 #include "processor.h"
00011 #include "thread.h"
00012
00013 namespace global
00014 {
00015
00016 typedef struct _filter_pixel
00017 {
00018 uint32_t index;
00019 float value;
00020 } filter_pixel;
00022
00025 class Global : public spectral::Processor
00026 {
00027 public:
00028 Global();
00029 ~Global();
00030
00031
00032
00033 virtual uint32_t GetInterface(
00034 std::list<std::pair<uint32_t, uint32_t> > &mandatory,
00035 std::list<std::pair<uint32_t, uint32_t> > &optional) const;
00036
00037
00038 virtual bool SetImage(uint32_t slot, const spectral::Image *img);
00039
00040
00041 virtual void SetParameters(const spectral::Parameters *);
00042
00043
00044 virtual spectral::Image *Process(void);
00045
00046
00047 virtual void ClearImage(uint32_t slot);
00048
00049 protected:
00050
00051
00052 virtual void GetParameters(spectral::Parameters *) const;
00053
00054 private:
00055
00056 void CrunchImage(const spectral::Image *in, spectral::Image *out, float threshold);
00057
00058 const spectral::Image *m_lumImage;
00059 float m_threshold;
00060 };
00061
00062 }
00063
00064 #endif