00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 #ifndef VxFrmFtorSeqToIm_h
00016 #define VxFrmFtorSeqToIm_h
00017 
00018 
00019 #include "HxImageSeq.h"
00020 #include "VxFrmFtorUfo.h"
00021 
00022 class VxFrmFtorSeqToIm : public VxFrmFtorUfo {
00023 public:
00024     VxFrmFtorSeqToIm(HxImageSeq seq) : _seq(seq) {};
00025     
00026     virtual VxValue doIt(int frame, const VxValue& input) {
00027         
00028         if(frame<0)
00029             frame = 0;
00030         if(frame>=_seq.nrFrames())
00031             frame = _seq.nrFrames()-1;
00032         
00033         return VxValue(_seq.getFrame(frame));
00034         
00035     };
00036     
00037     virtual HxString    getInputClass() const {
00038         return HxString("");
00039     }
00040     virtual HxString    getOutputClass() const {
00041         return HxString("HxImageRep");
00042     }
00043 
00044     virtual HxString    name() const {
00045         return HxString("SeqToIm");
00046     }
00047 
00048     virtual VxFrmFtorUfo* clone() const {
00049         return new VxFrmFtorSeqToIm(_seq);
00050     }
00051     
00052 private:
00053     HxImageSeq          _seq;
00054 };
00055 
00056 
00057 
00058 #endif