readme file is only found if data directory has specific path
Under GUI > Data > Add data set > Add raw/tiff data
, the program tries to read not only the chosen raw image files, but also a file xxx.readme
that contains some metadata. The basename xxx
is constructed from the path of the image files. In consequence, a specfic readme file is only found if the directory tree is organised in a specific way. For instance, data_trypsin.readme
is only found if it resides in a directory that has a path that ends with /data/trypsin/
. This imposes an unnecessary and unexpectable contraint on the way users organise their data.
The expected file name is generated in file core/loader/RawDataReader.h, function RawDataReaderParameters::LoadDataFromFile
. To parse the directory path and to create the name of the readme file, standard string operations are used. Since they involve a plain "/", they are likely to fail under Windows where paths are composed with "".
Proposed solution:
- Manipulate paths using std::filesystem::path instead of plain string operations.
- Glob the image directory for a file with extension
.readme
. If there are 0 or 1 files, proceed. Otherwise, launch a dialog to ask which file is to be used.