Marsyas
0.6.0-alpha
|
00001 /* 00002 ** Copyright (C) 1998-2012 George Tzanetakis <gtzan@cs.uvic.ca> 00003 ** 00004 ** This program is free software; you can redistribute it and/or modify 00005 ** it under the terms of the GNU General Public License as published by 00006 ** the Free Software Foundation; either version 2 of the License, or 00007 ** (at your option) any later version. 00008 ** 00009 ** This program is distributed in the hope that it will be useful, 00010 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 ** GNU General Public License for more details. 00013 ** 00014 ** You should have received a copy of the GNU General Public License 00015 ** along with this program; if not, write to the Free Software 00016 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00019 #ifndef MARSYAS_TIMELINELABELER_H 00020 #define MARSYAS_TIMELINELABELER_H 00021 00022 #include <marsyas/system/MarSystem.h> 00023 #include <marsyas/TimeLine.h> 00024 00025 namespace Marsyas 00026 { 00090 class TimelineLabeler: public MarSystem 00091 { 00092 private: 00093 MarControlPtr ctrl_labelFiles_; 00094 MarControlPtr ctrl_currentLabelFile_; 00095 MarControlPtr ctrl_selectLabel_; 00096 MarControlPtr ctrl_useLexicon_; 00097 00098 00099 MarControlPtr ctrl_labelNames_; 00100 MarControlPtr ctrl_lexiconLabelNames_; 00101 00102 MarControlPtr ctrl_currentLabel_; 00103 MarControlPtr ctrl_previousLabel_; 00104 MarControlPtr ctrl_nLabels_; 00105 MarControlPtr ctrl_lexiconNLabels_; 00106 00107 00108 MarControlPtr ctrl_playRegionsOnly_; 00109 MarControlPtr ctrl_pos_; 00110 MarControlPtr ctrl_advance_; 00111 00112 mrs_string labelFiles_; 00113 std::vector<mrs_string> labelFilesVec_; 00114 00115 mrs_string selectedLabel_; 00116 00117 TimeLine timeline_; 00118 mrs_natural numClasses_; 00119 mrs_natural curRegion_; 00120 mrs_bool foundNextRegion_; 00121 mrs_bool myAdvance_; // ctrl_advance gets overwritten by CollectionFileSoruce 00122 00123 void addControls(); 00124 void myUpdate(MarControlPtr sender); 00125 mrs_bool noLabelFile_; 00126 00127 mrs_bool load_next_region_file(); 00128 00129 public: 00130 TimelineLabeler(std::string name); 00131 TimelineLabeler(const TimelineLabeler& a); 00132 ~TimelineLabeler(); 00133 MarSystem* clone() const; 00134 00135 void myProcess(realvec& in, realvec& out); 00136 }; 00137 00138 } 00139 00140 #endif 00141