LCOV - code coverage report
Current view: top level - elsa/generators - Cylinder.cpp (source / functions) Hit Total Coverage
Test: coverage-all.lcov Lines: 9 9 100.0 %
Date: 2024-05-16 04:22:26 Functions: 4 6 66.7 %

          Line data    Source code
       1             : #include "Cylinder.h"
       2             : #include "EllipCylinder.h"
       3             : 
       4             : namespace elsa::phantoms
       5             : {
       6             : 
       7             :     template <typename data_t>
       8             :     Cylinder<data_t>::Cylinder(Orientation o, data_t amplit, elsa::phantoms::Vec3i center,
       9             :                                data_t radius, data_t length)
      10             :         : _orientation{o}, _amplit{amplit}, _center{center}, _radius{radius}, _length{length}
      11          49 :     {
      12          49 :     }
      13             : 
      14             :     template <Blending b, typename data_t>
      15             :     void rasterize(Cylinder<data_t>& cl, VolumeDescriptor& dd, DataContainer<data_t>& dc)
      16          49 :     {
      17          49 :         Vec2X<data_t> halfAxis;
      18          49 :         halfAxis << cl.getRadius(), cl.getRadius();
      19          49 :         EllipCylinder elCyl{cl.getOrientation(), cl.getAmplitude(), cl.getCenter(), halfAxis,
      20          49 :                             cl.getLength()};
      21          49 :         rasterize<b, data_t>(elCyl, dd, dc);
      22          49 :     };
      23             : 
      24             :     // ------------------------------------------
      25             :     // explicit template instantiation
      26             :     template class Cylinder<float>;
      27             :     template class Cylinder<double>;
      28             : 
      29             :     template void rasterize<Blending::ADDITION, float>(Cylinder<float>& el, VolumeDescriptor& dd,
      30             :                                                        DataContainer<float>& dc);
      31             :     template void rasterize<Blending::ADDITION, double>(Cylinder<double>& el, VolumeDescriptor& dd,
      32             :                                                         DataContainer<double>& dc);
      33             : 
      34             :     template void rasterize<Blending::OVERWRITE, float>(Cylinder<float>& el, VolumeDescriptor& dd,
      35             :                                                         DataContainer<float>& dc);
      36             :     template void rasterize<Blending::OVERWRITE, double>(Cylinder<double>& el, VolumeDescriptor& dd,
      37             :                                                          DataContainer<double>& dc);
      38             : 
      39             : } // namespace elsa::phantoms

Generated by: LCOV version 1.14