jfjoch_viewer: Track top-pixels without storing/sorting all valid pixels
This commit is contained in:
@@ -290,11 +290,15 @@ void JFJochDiffractionImage::DrawBeamCenter() {
|
||||
|
||||
void JFJochDiffractionImage::DrawTopPixels() {
|
||||
int i = 0;
|
||||
for (auto iter = image->ValidPixels().crbegin();
|
||||
iter != image->ValidPixels().rend() && i < show_highest_pixels;
|
||||
iter++, i++)
|
||||
DrawCross(iter->second % image->Dataset().experiment.GetXPixelsNum() + 0.5,
|
||||
iter->second / image->Dataset().experiment.GetXPixelsNum() + 0.5, 15, 3);
|
||||
for (const auto& p : image->GetTopPixels()) {
|
||||
if (i >= show_highest_pixels)
|
||||
break;
|
||||
|
||||
const int32_t idx = p.second;
|
||||
DrawCross(idx % image->Dataset().experiment.GetXPixelsNum() + 0.5,
|
||||
idx / image->Dataset().experiment.GetXPixelsNum() + 0.5, 15, 3);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user