RotationIndexer: Separate ProcessImage and GetLattice

This commit is contained in:
2026-05-29 14:58:53 +02:00
parent a6f61b0d8a
commit 4b609a6e06
4 changed files with 38 additions and 30 deletions
+8 -4
View File
@@ -70,7 +70,9 @@ TEST_CASE("RotationIndexer") {
s.indexed = true;
spots.push_back(s);
}
if (indexer.ProcessImage(img, spots).has_value())
indexer.ProcessImage(img, spots);
auto result = indexer.GetLattice();
if (result.has_value())
cnt++;
}
@@ -147,8 +149,9 @@ TEST_CASE("RotationIndexer short scan indexes only at the end") {
s.indexed = true;
spots.push_back(s);
}
CHECK_FALSE(indexer.ProcessImage(img, spots).has_value());
indexer.ProcessImage(img, spots);
auto result = indexer.GetLattice();
CHECK_FALSE(result.has_value());
}
std::vector<SpotToSave> last_spots;
@@ -171,7 +174,8 @@ TEST_CASE("RotationIndexer short scan indexes only at the end") {
last_spots.push_back(s);
}
auto ret_last = indexer.ProcessImage(last_img, last_spots);
indexer.ProcessImage(last_img, last_spots);
auto ret_last = indexer.GetLattice();
REQUIRE(ret_last.has_value());
auto ret = indexer.GetLattice();