Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Toolbox/SubpixelReader.h @ 1571:85e117739eca
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Sep 2020 17:46:39 +0200 |
parents | 244ad1e4e76a |
children | 4fb8fdf03314 |
comparison
equal
deleted
inserted
replaced
1570:9a04f42098a3 | 1571:85e117739eca |
---|---|
39 const Orthanc::ImageAccessor& source_; | 39 const Orthanc::ImageAccessor& source_; |
40 unsigned int width_; | 40 unsigned int width_; |
41 unsigned int height_; | 41 unsigned int height_; |
42 | 42 |
43 public: | 43 public: |
44 SubpixelReaderBase(const Orthanc::ImageAccessor& source) : | 44 explicit SubpixelReaderBase(const Orthanc::ImageAccessor& source) : |
45 source_(source), | 45 source_(source), |
46 width_(source.GetWidth()), | 46 width_(source.GetWidth()), |
47 height_(source.GetHeight()) | 47 height_(source.GetHeight()) |
48 { | 48 { |
49 } | 49 } |
80 { | 80 { |
81 public: | 81 public: |
82 typedef Orthanc::PixelTraits<Format> Traits; | 82 typedef Orthanc::PixelTraits<Format> Traits; |
83 typedef typename Traits::PixelType PixelType; | 83 typedef typename Traits::PixelType PixelType; |
84 | 84 |
85 SubpixelReader(const Orthanc::ImageAccessor& source) : | 85 explicit SubpixelReader(const Orthanc::ImageAccessor& source) : |
86 SubpixelReaderBase(source) | 86 SubpixelReaderBase(source) |
87 { | 87 { |
88 } | 88 } |
89 | 89 |
90 inline bool GetValue(PixelType& target, | 90 inline bool GetValue(PixelType& target, |
104 { | 104 { |
105 public: | 105 public: |
106 typedef Orthanc::PixelTraits<Format> Traits; | 106 typedef Orthanc::PixelTraits<Format> Traits; |
107 typedef typename Traits::PixelType PixelType; | 107 typedef typename Traits::PixelType PixelType; |
108 | 108 |
109 SubpixelReader(const Orthanc::ImageAccessor& source) : | 109 explicit SubpixelReader(const Orthanc::ImageAccessor& source) : |
110 SubpixelReaderBase(source) | 110 SubpixelReaderBase(source) |
111 { | 111 { |
112 } | 112 } |
113 | 113 |
114 inline bool GetFloatValue(float& target, | 114 inline bool GetFloatValue(float& target, |