Files
Jungfraujoch/image_analysis/QuickIntegrate.h
T
2025-05-28 18:49:27 +02:00

39 lines
1.2 KiB
C++

// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JFJOCH_QUICKINTEGRATE_H
#define JFJOCH_QUICKINTEGRATE_H
#include "../common/DiffractionExperiment.h"
#include "indexing/CrystalLattice.h"
#include "../common/Reflection.h"
class QuickIntegrate {
const DiffractionExperiment &experiment;
int32_t max_value = 30;
float ewald_sphere_dist_cutoff = 0.001;
float d_min = 1.5;
float r_1 = 4;
float r_2 = 5;
float r_3 = 8;
float r_1_sq = r_1 * r_1;
float r_2_sq = r_2 * r_2;
float r_3_sq = r_3 * r_3;
template <class T>
std::vector<Reflection> IntegrateInternal(const CompressedImage &image, const CrystalLattice &latt,
int64_t special_value, int64_t saturation);
template <class T>
bool IntegrateInternal(Reflection &r, const T* image, size_t xpixel, size_t ypixel, float x, float y,
int64_t special_value, int64_t saturation);
public:
QuickIntegrate(const DiffractionExperiment &experiment);
std::vector<Reflection> Integrate(const CompressedImage &image, const CrystalLattice &latt);
};
#endif //JFJOCH_QUICKINTEGRATE_H