diff --git a/ECTrainer2/Stimulus.cpp b/ECTrainer2/Stimulus.cpp index 4318c92..1c40a68 100644 --- a/ECTrainer2/Stimulus.cpp +++ b/ECTrainer2/Stimulus.cpp @@ -31,10 +31,12 @@ if (table[r].size() != 4 || atoi(table[r][0].c_str()) < 1) continue; StimInfo st; st.type = atoi(table[r][0].c_str()); - st.filename = table[r][1]; + st.filepath = table[r][1]; + int idx = st.filepath.find_last_of("/\\"); + st.filename = idx == std::string::npos ? st.filepath : st.filepath.substr(idx + 1); st.dulation = (float)atof(table[r][2].c_str()); st.csvfile = table[r][3]; - if (st.filename.size() > 0) _StimInfoSet.push_back(st); + if (st.filepath.size() > 0) _StimInfoSet.push_back(st); } return true; @@ -111,11 +113,11 @@ } if (_StimInfoSet[newStimNo].type == 1) { - _Display.Put(cv::imread(_StimInfoSet[newStimNo].filename)); + _Display.Put(cv::imread(_StimInfoSet[newStimNo].filepath)); } else { - _Movie.Put(mwut::Multi2Wide(_StimInfoSet[newStimNo].filename)); + _Movie.Put(mwut::Multi2Wide(_StimInfoSet[newStimNo].filepath)); if (_cap.isOpened()) _cap.release(); - _cap.open(_StimInfoSet[newStimNo].filename); + _cap.open(_StimInfoSet[newStimNo].filepath); } _StimTimer.Reset(); diff --git a/ECTrainer2/Stimulus.h b/ECTrainer2/Stimulus.h index 86548ea..abbb624 100644 --- a/ECTrainer2/Stimulus.h +++ b/ECTrainer2/Stimulus.h @@ -15,7 +15,8 @@ struct StimInfo { int type; // 1:�摜 2:���� - std::string filename; // �񎦃t�@�C�� + std::string filepath; // �񎦃t�@�C�����i�p�X�t���j + std::string filename; // �񎦃t�@�C�����i�p�X�Ȃ��j float dulation; // ����(sec) std::string csvfile; // �^�[�Q�b�g���W�t�@�C���i�����ꍇ��_�A���_�[�o�[�j };