ImageSpotFinder: Getting ready for abstract class for both CPU and GPU spot finders
This commit is contained in:
@@ -14,7 +14,6 @@ MXAnalysisWithoutFPGA::MXAnalysisWithoutFPGA(const DiffractionExperiment &in_exp
|
||||
IndexerThreadPool *in_indexer)
|
||||
: experiment(in_experiment),
|
||||
integration(in_integration),
|
||||
updated_image(experiment.GetPixelsNum()),
|
||||
roi_count(0),
|
||||
npixels(experiment.GetPixelsNum()),
|
||||
xpixels(experiment.GetXPixelsNum()),
|
||||
@@ -35,6 +34,7 @@ MXAnalysisWithoutFPGA::MXAnalysisWithoutFPGA(const DiffractionExperiment &in_exp
|
||||
mask_1bit[i] = (in_mask.GetMask().at(i) != 0);
|
||||
|
||||
spotFinder = std::make_unique<ImageSpotFinderCPU>(experiment.GetXPixelsNum(), experiment.GetYPixelsNum());
|
||||
updated_image = spotFinder->GetHostBuffer();
|
||||
}
|
||||
|
||||
void MXAnalysisWithoutFPGA::Analyze(DataMessage &output, std::vector<uint8_t> &image, AzimuthalIntegrationProfile &profile,
|
||||
@@ -159,10 +159,12 @@ void MXAnalysisWithoutFPGA::Analyze(DataMessage &output,
|
||||
|| mask_low_res != settings.low_resolution_limit)
|
||||
UpdateMaskResolution(settings);
|
||||
|
||||
const std::vector<DiffractionSpot> spots = spotFinder->Run(updated_image.data(), settings, mask_resolution);
|
||||
const std::vector<DiffractionSpot> spots = spotFinder->Run(settings, mask_resolution);
|
||||
|
||||
SpotAnalyze(experiment, settings, spots,
|
||||
CompressedImage(updated_image, experiment.GetXPixelsNum(), experiment.GetYPixelsNum()),
|
||||
CompressedImage(updated_image, sizeof(int32_t) * experiment.GetPixelsNum(),
|
||||
experiment.GetXPixelsNum(), experiment.GetYPixelsNum(),
|
||||
CompressedImageMode::Int32),
|
||||
indexer, output);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user