MXAnalysisWithoutFPGA never filled DataMessage.roi, so ROI integrals were only available on the FPGA path. Add a software ROI engine that mirrors the FPGA roi_calc kernel: per-ROI sum, sum of squares, good-pixel count, max and intensity-weighted centre of mass, with each pixel carrying a 16-bit mask so it can contribute to any subset of up to 16 ROIs. New image_analysis/roi/ library (JFJochROIIntegration), structured like azint: a base that precomputes the per-pixel mask and names, a templated CPU engine (generic over pixel type for a future 16-bit path), and a GPU kernel using per-block shared-memory atomics for the STXM case (half-detector ROIs). Masked pixels are excluded entirely; saturated pixels are excluded from the sums but still count towards the max, matching roi_calc exactly. The engine is only constructed when at least one ROI is defined. Downstream CBOR/HDF5 already consume message.roi, so no further changes are needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
57 lines
1.8 KiB
CMake
57 lines
1.8 KiB
CMake
SET(MINIGLOG ON)
|
|
SET(PROVIDE_UNINSTALL_TARGET OFF)
|
|
SET(USE_CUDA OFF)
|
|
SET(EIGENSPARSE ON)
|
|
|
|
# Prevent MKL from being found (guarantees no MKL)
|
|
SET(CMAKE_DISABLE_FIND_PACKAGE_MKL TRUE)
|
|
SET(CERES_THREADING_MODEL "CXX_THREADS")
|
|
|
|
FetchContent_Declare(
|
|
ceres
|
|
GIT_REPOSITORY https://github.com/ceres-solver/ceres-solver
|
|
GIT_TAG 0c70ed3
|
|
EXCLUDE_FROM_ALL
|
|
)
|
|
|
|
FetchContent_MakeAvailable(ceres)
|
|
|
|
ADD_LIBRARY(JFJochImageAnalysis STATIC
|
|
MXAnalysisWithoutFPGA.cpp
|
|
MXAnalysisWithoutFPGA.h
|
|
MXAnalysisAfterFPGA.h
|
|
MXAnalysisAfterFPGA.cpp
|
|
IndexAndRefine.cpp
|
|
IndexAndRefine.h
|
|
dark_mask_analysis/DarkMaskAnalysis.cpp
|
|
dark_mask_analysis/DarkMaskAnalysis.h
|
|
rotation_indexer/RotationIndexer.cpp
|
|
rotation_indexer/RotationIndexer.h
|
|
RotationParameters.cpp
|
|
RotationParameters.h
|
|
WriteReflections.cpp
|
|
WriteReflections.h
|
|
LoadFCalcFromMtz.cpp
|
|
LoadFCalcFromMtz.h
|
|
UpdateReflectionResolution.cpp
|
|
UpdateReflectionResolution.h
|
|
IntegrationOutcome.h
|
|
rotation_indexer/RotationIndexerCounter.cpp
|
|
rotation_indexer/RotationIndexerCounter.h)
|
|
|
|
FIND_PACKAGE(Eigen3 3.4 REQUIRED NO_MODULE) # provides Eigen3::Eigen
|
|
|
|
ADD_SUBDIRECTORY(spot_finding)
|
|
ADD_SUBDIRECTORY(bragg_integration)
|
|
ADD_SUBDIRECTORY(bragg_prediction)
|
|
ADD_SUBDIRECTORY(indexing)
|
|
ADD_SUBDIRECTORY(geom_refinement)
|
|
ADD_SUBDIRECTORY(lattice_search)
|
|
ADD_SUBDIRECTORY(scale_merge)
|
|
ADD_SUBDIRECTORY(image_preprocessing)
|
|
ADD_SUBDIRECTORY(azint)
|
|
ADD_SUBDIRECTORY(roi)
|
|
ADD_SUBDIRECTORY(pixel_refinement)
|
|
|
|
TARGET_LINK_LIBRARIES(JFJochImageAnalysis JFJochAzIntEngine JFJochROIIntegration JFJochImagePreprocessing JFJochBraggPrediction JFJochBraggIntegration JFJochLatticeSearch JFJochIndexing JFJochSpotFinding JFJochCommon JFJochGeomRefinement JFJochScaleMerge JFJochPixelRefine gemmi)
|