5 #ifndef ITKPIXV2QCOREENCODINGLUT_H
6 #define ITKPIXV2QCOREENCODINGLUT_H
18 template<std::
size_t Length,
typename Generator>
19 constexpr
auto lut(Generator&&
f){
20 using content_type = decltype(
f(std::size_t{0}));
21 std::array<content_type, Length> arr;
23 auto rangy = views::iota(std::size_t{0}, Length)
25 copy(rangy, arr.begin());
39 for(
int i = 0 ;
i<8;
i++) {
40 b[
i] = ((word >> (2*
i)) & 0x1) << 1 | ((word >> (2*
i+1)) & 0
x1);
46 std::array<uint32_t, 8>
b;
71 encoded |= (0b0) << (28 -
pos);
74 encoded |= (
src & 0x3) << (28 -
pos);
79 S1, S2t, S3tl, S3tr,
b[0],
b[1],
b[2],
b[3],
80 S2b, S3bl, S3br,
b[4],
b[5],
b[6],
b[7]
89 std::array<uint32_t, LookUpTableSize>
lut;
101 template<std::
size_t Length>
107 template<std::
size_t Length>