jfjoch_viewer: Fix reading dataset with partial grid results

This commit is contained in:
2025-11-21 17:54:15 +01:00
parent ddcc24fba8
commit 3602b634f8
3 changed files with 81 additions and 7 deletions

View File

@@ -70,9 +70,9 @@ void JFJochHDF5Reader::ReadVector(std::vector<T> &v,
size_t nimages) {
try {
auto tmp = file.ReadOptVector<T>(dataset_name);
if (tmp.size() == nimages) {
if (tmp.size() <= nimages) {
v.resize(image0 + nimages);
for (int i = 0; i < nimages; i++)
for (int i = 0; i < tmp.size(); i++)
v[image0 + i] = tmp[i];
}
} catch (JFJochException &e) {}