mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-15 00:37:13 +02:00
add python bindings for numpy
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
#include <string>
|
||||
|
||||
#include "aare/defs.hpp"
|
||||
@ -27,10 +28,13 @@ PYBIND11_MODULE(_aare, m) {
|
||||
py::class_<Frame<uint16_t>>(m, "_Frame16")
|
||||
.def(py::init<std::byte*, ssize_t, ssize_t>())
|
||||
.def("get", &Frame<uint16_t>::get)
|
||||
.def("get_array", &Frame<uint16_t>::get_array)
|
||||
.def_property_readonly("rows", &Frame<uint16_t>::rows)
|
||||
.def_property_readonly("cols", &Frame<uint16_t>::cols)
|
||||
.def_property_readonly("bitdepth", &Frame<uint16_t>::bitdepth);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user