RotationIndexer: Add resulting data

This commit is contained in:
2025-11-29 19:02:57 +01:00
parent 36454a9637
commit c8d28a8921
3 changed files with 20 additions and 16 deletions

View File

@@ -102,7 +102,7 @@ void RotationIndexer::TryIndex() {
}
}
std::optional<RotatinIndexerImageResult> RotationIndexer::ProcessImage(int64_t image, const std::vector<SpotToSave> &spots) {
std::optional<RotationIndexerResult> RotationIndexer::ProcessImage(int64_t image, const std::vector<SpotToSave> &spots) {
std::unique_lock ul(m);
// For non-rotation just ignore the whole procedure
@@ -142,7 +142,7 @@ std::optional<RotatinIndexerImageResult> RotationIndexer::ProcessImage(int64_t i
};
if (XtalOptimizer(data, spots))
return RotatinIndexerImageResult{
return RotationIndexerResult{
.lattice = data.latt,
.search_result = search_result_,
.geom = data.geom
@@ -152,8 +152,12 @@ std::optional<RotatinIndexerImageResult> RotationIndexer::ProcessImage(int64_t i
}
std::optional<CrystalLattice> RotationIndexer::Finalize(bool retry) {
std::optional<RotationIndexerResult> RotationIndexer::Finalize(bool retry) {
if (!indexed_lattice || retry)
TryIndex();
return indexed_lattice;
return RotationIndexerResult{
.lattice = indexed_lattice.value(),
.search_result = search_result_,
.geom = geom_
};
}