LCOV - code coverage report
Current view: top level - elsa/projectors - BSplines.cpp (source / functions) Hit Total Coverage
Test: coverage-all.lcov Lines: 11 23 47.8 %
Date: 2022-08-25 03:05:39 Functions: 6 16 37.5 %

          Line data    Source code
       1             : #include "BSplines.h"
       2             : 
       3             : namespace elsa
       4             : {
       5             :     template <typename data_t>
       6             :     BSpline<data_t>::BSpline(index_t dim, index_t order) : dim_(dim), order_(order)
       7           0 :     {
       8           0 :     }
       9             : 
      10             :     template <typename data_t>
      11             :     data_t BSpline<data_t>::operator()(Vector_t<data_t> x)
      12           0 :     {
      13           0 :         ELSA_VERIFY(dim_ == x.size());
      14           0 :         return bspline::nd_bspline_evaluate(x, order_);
      15           0 :     }
      16             : 
      17             :     template <typename data_t>
      18             :     index_t BSpline<data_t>::order() const
      19           0 :     {
      20           0 :         return order_;
      21           0 :     }
      22             : 
      23             :     template <typename data_t>
      24             :     index_t BSpline<data_t>::dim() const
      25           0 :     {
      26           0 :         return dim_;
      27           0 :     }
      28             : 
      29             :     template <typename data_t>
      30             : 
      31             :     ProjectedBSpline<data_t>::ProjectedBSpline(index_t dim, index_t order)
      32             :         : dim_(dim), order_(order)
      33          34 :     {
      34          34 :     }
      35             : 
      36             :     template <typename data_t>
      37             :     data_t ProjectedBSpline<data_t>::operator()(data_t x)
      38        4042 :     {
      39        4042 :         return bspline::nd_bspline_centered(x, order_, dim_ - 1);
      40        4042 :     }
      41             : 
      42             :     template <typename data_t>
      43             :     index_t ProjectedBSpline<data_t>::order() const
      44           2 :     {
      45           2 :         return order_;
      46           2 :     }
      47             : 
      48             :     template <typename data_t>
      49             :     index_t ProjectedBSpline<data_t>::dim() const
      50           2 :     {
      51           2 :         return dim_;
      52           2 :     }
      53             : 
      54             :     // ------------------------------------------
      55             :     // explicit template instantiation
      56             :     template class BSpline<float>;
      57             :     template class BSpline<double>;
      58             : 
      59             :     template class ProjectedBSpline<float>;
      60             :     template class ProjectedBSpline<double>;
      61             : } // namespace elsa

Generated by: LCOV version 1.14