diff --git a/ECTrainer2/Logger.cpp b/ECTrainer2/Logger.cpp index 08e6c39..2f459b0 100644 --- a/ECTrainer2/Logger.cpp +++ b/ECTrainer2/Logger.cpp @@ -32,7 +32,7 @@ CreateDirectory(_T(LOG_DIR), NULL); _logFileName = nkc::wut::Multi2Wide( - cv::format(DATA_LOG_FILE, nkc::wut::DateTimeStr().c_str(), subject, visit)); + cv::format(DATA_LOG_FILE, nkc::wut::DateTimeStr().c_str(), subject.c_str(), visit)); nkc::wut::DebugPrintf(_T("Log start: %s\n"), _logFileName.c_str()); TCHAR msg[1024]; diff --git a/ECTrainer2/Logger.h b/ECTrainer2/Logger.h index f22c0dc..2bf45a7 100644 --- a/ECTrainer2/Logger.h +++ b/ECTrainer2/Logger.h @@ -31,9 +31,10 @@ public: static const char* DATA_LOG_FILE; static const TCHAR* EVENT_LOG_FILE; - Logger(); static bool Append(const TCHAR* filename, const TCHAR* msg); static void WriteEvent(const TCHAR* msg); + + Logger(); void StartRecord(std::string subject, int visit); void WriteRecord(Record& r); void Stop(); diff --git a/ECTrainer2/Stimulus.cpp b/ECTrainer2/Stimulus.cpp index d7f97b8..f1adcff 100644 --- a/ECTrainer2/Stimulus.cpp +++ b/ECTrainer2/Stimulus.cpp @@ -11,7 +11,7 @@ , _Display() , _Movie() , _TotalExpTime(0) - , _Stage(0) + , _Scene(0) { _pMovieObject = new MovieObject; } @@ -35,7 +35,7 @@ // テーブルから構造体へ格納 _TotalExpTime = 0; _StimInfoSet.clear(); - _StageMax = 0; + _SceneMax = 0; float accTime = 0; for (int r = 0; r < table.size(); r++) { if (table[r].size() != 6 || atoi(table[r][0].c_str()) < 1) continue; @@ -49,8 +49,8 @@ accTime += st.dulation * 1000.F; st.csvfile = table[r][3]; st.smallmovie = table[r][4]; - st.stage = atoi(table[r][5].c_str()); - if (st.stage > _StageMax) _StageMax = st.stage; + st.scene = atoi(table[r][5].c_str()); + if (st.scene > _SceneMax) _SceneMax = st.scene; if (st.filepath.size() > 0) { _StimInfoSet.push_back(st); _TotalExpTime += st.dulation; @@ -137,7 +137,7 @@ // 刺激ステージを検索 if (*Ect()->PWorker()->StartStagePtr() > 0) { for (int i = 0; i < _StimInfoSet.size(); i++) { - if (_StimInfoSet[i].stage == *Ect()->PWorker()->StartStagePtr()) start = i; + if (_StimInfoSet[i].scene == *Ect()->PWorker()->StartStagePtr()) start = i; } } @@ -186,9 +186,9 @@ this->SetImage(_StimInfoSet[newStimNo].filepath); } - if (newStimNo == 0 || _StimInfoSet[newStimNo].stage > 0) { - _Stage = _StimInfoSet[newStimNo].stage; - *Ect()->PWorker()->StartStagePtr() = _Stage; + if (newStimNo == 0 || _StimInfoSet[newStimNo].scene > 0) { + _Scene = _StimInfoSet[newStimNo].scene; + *Ect()->PWorker()->StartStagePtr() = _Scene; } _StimTimer.Reset(); diff --git a/ECTrainer2/Stimulus.h b/ECTrainer2/Stimulus.h index 8159b28..0386a55 100644 --- a/ECTrainer2/Stimulus.h +++ b/ECTrainer2/Stimulus.h @@ -23,7 +23,7 @@ float dulation; // 時間(sec) float accTime; // この刺激までの蓄積時間(ms) std::string csvfile; // ターゲット座標ファイル(無い場合は_アンダーバー) - int stage; // 刺激ステージ + int scene; // シーン }; class Stimulus : public BaseProcess @@ -49,9 +49,9 @@ nkc::RingBuffer _Movie; // 動画情報 cv::VideoCapture _cap; // 動画オブジェクト float _TotalExpTime; // 合計実験時間 - int _Stage; // 刺激ステージ - int _StageMax; // 刺激ステージ最大値 - + int _Scene; // シーン + int _SceneMax; // シーン最大値 + // ECTrainerインスタンス取得 ECTrainer* Ect() { return (ECTrainer*)_pUserdata; } // 実験開始 @@ -105,7 +105,7 @@ // ソフトウェアキャリブレーション実行中かどうか bool IsSoftCalib() { return _StimNo < 0 ? false : _StimInfoSet[_StimNo].type == StimInfo::TYPE_CALIB; } // ステージ取得 - int GetStage() { return _Stage; } + int GetStage() { return _Scene; } // 最大ステージ取得 - int GetStageMax() { return _StageMax; } + int GetStageMax() { return _SceneMax; } };