51 lines
1.7 KiB
C++
51 lines
1.7 KiB
C++
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#ifndef JFJOCH_IMAGEANALYSISCPU_H
|
|
#define JFJOCH_IMAGEANALYSISCPU_H
|
|
|
|
#include <mutex>
|
|
|
|
#include "../common/JFJochMessages.h"
|
|
#include "../common/DiffractionExperiment.h"
|
|
#include "../common/AzimuthalIntegration.h"
|
|
#include "../common/PixelMask.h"
|
|
#include "../common/AzimuthalIntegrationProfile.h"
|
|
#include "bragg_prediction/BraggPrediction.h"
|
|
#include "spot_finding/ImageSpotFinder.h"
|
|
#include "indexing/IndexerThreadPool.h"
|
|
#include "azint/AzIntEngine.h"
|
|
#include "IndexAndRefine.h"
|
|
#include "image_preprocessing/ImagePreprocessor.h"
|
|
|
|
// MXAnalysisWithoutFPGA is not thread safe - it has to owned by a single thread
|
|
class MXAnalysisWithoutFPGA {
|
|
const DiffractionExperiment &experiment;
|
|
const AzimuthalIntegration &integration;
|
|
|
|
std::vector<uint8_t> decompression_buffer;
|
|
|
|
std::unique_ptr<ImagePreprocessor> preprocessor;
|
|
|
|
size_t npixels;
|
|
size_t xpixels;
|
|
|
|
std::unique_ptr<AzIntEngine> azint;
|
|
std::unique_ptr<ImageSpotFinder> spotFinder;
|
|
IndexAndRefine &indexer;
|
|
std::unique_ptr<BraggPrediction> prediction;
|
|
const PixelMask &mask;
|
|
|
|
std::vector<bool> mask_resolution;
|
|
float mask_high_res;
|
|
float mask_low_res;
|
|
void UpdateMaskResolution(const SpotFindingSettings& settings);
|
|
public:
|
|
MXAnalysisWithoutFPGA(const DiffractionExperiment &experiment, const AzimuthalIntegration &integration,
|
|
const PixelMask &mask, IndexAndRefine &indexer);
|
|
void Analyze(DataMessage &output, AzimuthalIntegrationProfile &profile, const SpotFindingSettings &spot_finding_settings);
|
|
};
|
|
|
|
|
|
#endif //JFJOCH_IMAGEANALYSISCPU_H
|