Integration of the per-image detection scores, the analysis mode, the grid-scan crystal search, its rugnux entry point and the viewer display. GridScanCrystal/GridScanResult had two definitions - a placeholder in common/ and the real one in image_analysis/ - which is a redefinition in any translation unit reaching both, and tests/RasterReportTest.cpp reaches both. Unified into common/GridScanResult.h, beside ScanResult where the data type belongs, leaving the algorithm in image_analysis/. Same reason UnitCell lives in common while the indexers do not. GridScanAnalysisSettings is now the only home for the search parameters, replacing the loose GridScanAnalysisParameters struct the raster lane carried while the class did not yet exist. Three values changed with the move: - decisive_single_cell_score 0.9 -> 0.6. 0.9 drops a real two-cell crystal peaking at 0.751 and costs a loop on the labelled corpus. 0.6 is the middle of a measured gap: over 67 rasters no water raster peaks above 0.15 and no ice raster above 0.50, while the weakest confirmed-protein raster peaks at 0.67. - max_crystals is std::optional, unset meaning no cap. 0 as a sentinel for "unlimited" reads as "find nothing", which is the opposite of what it did. - grow_score_threshold was missing from the class entirely. The viewer reads protein_score, ice_score and the crystal list from the reader rather than a local stub, and asks the broker for ice_ring_ratio rather than the retired ice_ring_score spelling. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFEJG6WBQv8th4UJFNe53N
59 lines
1.6 KiB
C++
59 lines
1.6 KiB
C++
// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#include "GridScanAnalysisSettings.h"
|
|
|
|
GridScanAnalysisSettings &GridScanAnalysisSettings::ProteinScoreThreshold(float input) {
|
|
protein_score_threshold = input;
|
|
return *this;
|
|
}
|
|
|
|
GridScanAnalysisSettings &GridScanAnalysisSettings::GrowScoreThreshold(float input) {
|
|
grow_score_threshold = input;
|
|
return *this;
|
|
}
|
|
|
|
GridScanAnalysisSettings &GridScanAnalysisSettings::MinBlobCells(int64_t input) {
|
|
min_blob_cells = input;
|
|
return *this;
|
|
}
|
|
|
|
GridScanAnalysisSettings &GridScanAnalysisSettings::DecisiveSingleCellScore(float input) {
|
|
decisive_single_cell_score = input;
|
|
return *this;
|
|
}
|
|
|
|
GridScanAnalysisSettings &GridScanAnalysisSettings::MaxCrystals(std::optional<int64_t> input) {
|
|
max_crystals = input;
|
|
return *this;
|
|
}
|
|
|
|
GridScanAnalysisSettings &GridScanAnalysisSettings::Indexing(bool input) {
|
|
indexing = input;
|
|
return *this;
|
|
}
|
|
|
|
float GridScanAnalysisSettings::GetProteinScoreThreshold() const {
|
|
return protein_score_threshold;
|
|
}
|
|
|
|
float GridScanAnalysisSettings::GetGrowScoreThreshold() const {
|
|
return grow_score_threshold;
|
|
}
|
|
|
|
int64_t GridScanAnalysisSettings::GetMinBlobCells() const {
|
|
return min_blob_cells;
|
|
}
|
|
|
|
float GridScanAnalysisSettings::GetDecisiveSingleCellScore() const {
|
|
return decisive_single_cell_score;
|
|
}
|
|
|
|
std::optional<int64_t> GridScanAnalysisSettings::GetMaxCrystals() const {
|
|
return max_crystals;
|
|
}
|
|
|
|
bool GridScanAnalysisSettings::IsIndexing() const {
|
|
return indexing;
|
|
}
|