7 namespace itk::itkpix::endec::codec {
11 void tag(uint64_t value) {
12 if constexpr (!enable)
return;
15 std::cout <<
"(" << value <<
")" << RESET;
17 void internal_tag(uint64_t value) {
18 if constexpr (!enable)
return;
21 std::cout <<
"(" << value <<
")" << RESET;
24 void ccol(uint64_t value) {
25 if constexpr (!enable)
return;
28 std::cout <<
"(" << value <<
")" << RESET;
30 void qrow(uint64_t value) {
31 if constexpr (!enable)
return;
34 std::cout <<
"(" << value <<
")" << RESET;
36 void hitmap(uint64_t value,
size_t length, uint64_t decoded) {
37 if constexpr (!enable)
return;
45 void tot(uint64_t value,
size_t length) {
46 if constexpr (!enable)
return;
48 bits(value, length*4);
50 for (
int i = 0; i < length; i++) {
51 std::cout << std::setw(2) << (value >> (i * 4) & 0xf);
53 std::cout <<
")" << RESET;
55 void ctrl(uint64_t value) {
56 if constexpr (!enable)
return;
63 void bits(uint64_t value,
size_t length) {
64 if constexpr (!enable)
return;
65 for (
int i = length - 1; i >= 0; --i) {
66 std::cout << ((value >> i) & 1);
71 static inline const std::string RED =
"\033[31m";
72 static inline const std::string GREEN =
"\033[32m";
73 static inline const std::string YELLOW =
"\033[33m";
74 static inline const std::string BLUE =
"\033[34m";
75 static inline const std::string MAGENTA =
"\033[35m";
76 static inline const std::string CYAN =
"\033[36m";
77 static inline const std::string RESET =
"\033[0m";
78 const std::string ORANGE =
"\033[38;5;214m";
Definition: print_utils.hpp:10