LCOV - code coverage report
Current view: top level - builds/IP/elsa/build/pyelsa - bind_generators.cpp (source / functions) Hit Total Coverage
Test: test_coverage.info.cleaned Lines: 0 20 0.0 %
Date: 2020-09-17 02:55:02 Functions: 0 5 0.0 %

          Line data    Source code
       1             : #include <pybind11/pybind11.h>
       2             : #include <pybind11/eigen.h>
       3             : 
       4             : #include "CircleTrajectoryGenerator.h"
       5             : #include "EllipseGenerator.h"
       6             : #include "PhantomGenerator.h"
       7             : 
       8             : #include "generators_hints.hpp"
       9             : 
      10             : namespace py = pybind11;
      11             : 
      12           0 : void add_definitions_pyelsa_generators(py::module& m)
      13             : {
      14           0 :         py::class_<elsa::EllipseGenerator<float>> EllipseGeneratorf(m, "EllipseGeneratorf");
      15             :         EllipseGeneratorf
      16           0 :                 .def_static("drawFilledEllipsoid3d", (void(*)(elsa::DataContainer<float>&, float, Eigen::Matrix<long, 3, 1, 0, 3, 1>, Eigen::Matrix<long, 3, 1, 0, 3, 1>, float, float, float))(&elsa::EllipseGenerator<float>::drawFilledEllipsoid3d), py::arg("dc"), py::arg("amplitude"), py::arg("center"), py::arg("sizes"), py::arg("phi"), py::arg("theta"), py::arg("psi"))
      17           0 :                 .def_static("drawFilledEllipse2d", (void(*)(elsa::DataContainer<float>&, float, const Eigen::Matrix<long, 2, 1, 0, 2, 1>&, Eigen::Matrix<long, 2, 1, 0, 2, 1>, float))(&elsa::EllipseGenerator<float>::drawFilledEllipse2d), py::arg("dc"), py::arg("amplitude"), py::arg("center"), py::arg("sizes"), py::arg("angle"));
      18             : 
      19           0 :         m.attr("EllipseGenerator") = m.attr("EllipseGeneratorf");
      20             : 
      21           0 :         py::class_<elsa::EllipseGenerator<double>> EllipseGeneratord(m, "EllipseGeneratord");
      22             :         EllipseGeneratord
      23           0 :                 .def_static("drawFilledEllipsoid3d", (void(*)(elsa::DataContainer<double>&, double, Eigen::Matrix<long, 3, 1, 0, 3, 1>, Eigen::Matrix<long, 3, 1, 0, 3, 1>, double, double, double))(&elsa::EllipseGenerator<double>::drawFilledEllipsoid3d), py::arg("dc"), py::arg("amplitude"), py::arg("center"), py::arg("sizes"), py::arg("phi"), py::arg("theta"), py::arg("psi"))
      24           0 :                 .def_static("drawFilledEllipse2d", (void(*)(elsa::DataContainer<double>&, double, const Eigen::Matrix<long, 2, 1, 0, 2, 1>&, Eigen::Matrix<long, 2, 1, 0, 2, 1>, double))(&elsa::EllipseGenerator<double>::drawFilledEllipse2d), py::arg("dc"), py::arg("amplitude"), py::arg("center"), py::arg("sizes"), py::arg("angle"));
      25             : 
      26           0 :         py::class_<elsa::PhantomGenerator<float>> PhantomGeneratorf(m, "PhantomGeneratorf");
      27             :         PhantomGeneratorf
      28           0 :                 .def_static("createModifiedSheppLogan", (elsa::DataContainer<float>(*)(Eigen::Matrix<long, -1, 1, 0, -1, 1>))(&elsa::PhantomGenerator<float>::createModifiedSheppLogan), py::arg("sizes"), py::return_value_policy::move);
      29             : 
      30           0 :         m.attr("PhantomGenerator") = m.attr("PhantomGeneratorf");
      31             : 
      32           0 :         py::class_<elsa::PhantomGenerator<double>> PhantomGeneratord(m, "PhantomGeneratord");
      33             :         PhantomGeneratord
      34           0 :                 .def_static("createModifiedSheppLogan", (elsa::DataContainer<double>(*)(Eigen::Matrix<long, -1, 1, 0, -1, 1>))(&elsa::PhantomGenerator<double>::createModifiedSheppLogan), py::arg("sizes"), py::return_value_policy::move);
      35             : 
      36           0 :         py::class_<elsa::CircleTrajectoryGenerator> CircleTrajectoryGenerator(m, "CircleTrajectoryGenerator");
      37             :         CircleTrajectoryGenerator
      38           0 :                 .def_static("createTrajectory", (std::unique_ptr<elsa::DetectorDescriptor, std::default_delete<elsa::DetectorDescriptor>>(*)(long, const elsa::DataDescriptor&, long, float, float))(&elsa::CircleTrajectoryGenerator::createTrajectory), py::arg("numberOfPoses"), py::arg("volumeDescriptor"), py::arg("arcDegrees"), py::arg("sourceToCenter"), py::arg("centerToDetector"));
      39             : 
      40           0 :         elsa::GenratorsHints::addCustomFunctions(m);
      41           0 : }
      42             : 
      43           0 : PYBIND11_MODULE(pyelsa_generators, m)
      44             : {
      45           0 :         add_definitions_pyelsa_generators(m);
      46           0 : }

Generated by: LCOV version 1.13