mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-06 21:00:41 +02:00

major changes: - add python bindings for all c++ features except network_io - changes to cross compile on windows,linux and macos - fix bugs with cluster_finder - use Dtype in Frame instead of bitdepth - remove boost::program_options and replace with our implementation - add Transforms class that applies a sequence of functions (c++ or python functions) on a Frame. - remove frame reorder and flip from SubFile.cpp. use Transforms instead - Test clusterFinder and Pedestal results in comparison with slsDetectorCalibration --------- Co-authored-by: Bechir <bechir.brahem420@gmail.com> Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
26 lines
553 B
C++
26 lines
553 B
C++
#include "aare.hpp"
|
|
#include "aare/examples/defs.hpp"
|
|
|
|
#include <iostream>
|
|
|
|
using aare::File;
|
|
using aare::FileConfig;
|
|
using aare::Frame;
|
|
|
|
int main() {
|
|
auto path = std::filesystem::path("/tmp/test.npy");
|
|
auto dtype = aare::Dtype(typeid(uint32_t));
|
|
FileConfig const cfg = {dtype, 100, 100};
|
|
File npy(path, "w", cfg);
|
|
Frame f(100, 100, dtype);
|
|
for (int i = 0; i < 10000; i++) {
|
|
f.set<uint32_t>(i / 100, i % 100, i);
|
|
}
|
|
|
|
npy.write(f);
|
|
f.set<uint32_t>(0, 0, 77);
|
|
npy.write(f);
|
|
npy.write(f);
|
|
return 0;
|
|
}
|