00001 #ifndef Impala_Core_VideoSet_ApplyConcepts_h 00002 #define Impala_Core_VideoSet_ApplyConcepts_h 00003 00004 #include "Core/VideoSet/Reporter.h" 00005 #include "Core/Training/ApplyConcepts.h" 00006 00007 namespace Impala 00008 { 00009 namespace Core 00010 { 00011 namespace VideoSet 00012 { 00013 00014 00015 class ApplyConcepts : public Listener 00016 { 00017 public: 00018 00019 ApplyConcepts(Reporter* reporter, CmdOptions& options, VideoSet* vs, 00020 bool onIndex) 00021 { 00022 mOnIndex = onIndex; 00023 mApplier = new Training::ApplyConcepts(options, vs, mOnIndex); 00024 } 00025 00026 virtual 00027 ~ApplyConcepts() 00028 { 00029 delete mApplier; 00030 } 00031 00032 virtual void 00033 HandleNewWalk(VideoSet* vs, String walkType) 00034 { 00035 if (!mOnIndex) 00036 mApplier->SetWalkType(walkType); 00037 } 00038 00039 virtual void 00040 HandleDoneFile(VideoSet* vs, int fileId, Stream::RgbDataSrc* src) 00041 { 00042 if (!mOnIndex) 00043 mApplier->NextContainer(vs->GetContainer(fileId)); 00044 } 00045 00046 virtual void 00047 HandleDoneWalk(VideoSet* vs) 00048 { 00049 if (mOnIndex) 00050 mApplier->NextContainer(""); 00051 } 00052 00053 private: 00054 00055 Training::ApplyConcepts* mApplier; 00056 bool mOnIndex; 00057 00058 ILOG_VAR_DEC; 00059 }; 00060 00061 ILOG_VAR_INIT(ApplyConcepts, Impala.Core.VideoSet); 00062 00063 } // namespace VideoSet 00064 } // namespace Core 00065 } // namespace Impala 00066 00067 #endif