LCOV - code coverage report
Current view: top level - elsa/generators - CylinderFree.cpp (source / functions) Hit Total Coverage
Test: coverage-all.lcov Lines: 9 9 100.0 %
Date: 2024-12-21 07:37:52 Functions: 4 6 66.7 %

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

Generated by: LCOV version 1.14