51 QColor c0(image.pixel(0, 0));
52 QColor c1(image.pixel(1, 0));
53 QColor c2(image.pixel(2, 0));
54 if (!(c0.red() == 255 && c0.green() == 0 && c0.blue() == 0)) {
55 errorMessage =
"positive real value is not mapped to red";
59 errorMessage =
"zero real value is not mapped to black";
62 if (!(c2.red() == 0 && c2.green() == 0 && c2.blue() == 255)) {
63 errorMessage =
"negative real value is not mapped to blue";
72 c0 = QColor(image.pixel(0, 0));
73 c2 = QColor(image.pixel(2, 0));
74 if (!(c0.red() == 255 && c0.blue() == 0 && c2.red() == 0 && c2.blue() == 255)) {
75 errorMessage =
"imaginary signed color mapping is incorrect";
84 c0 = QColor(image.pixel(0, 0));
85 c1 = QColor(image.pixel(1, 0));
86 c2 = QColor(image.pixel(2, 0));
87 if (c0.rgb() == c1.rgb()) {
88 errorMessage =
"different phases produced the same display color";
92 errorMessage =
"zero-amplitude phase pixel is not black";
101 }
catch (
const std::invalid_argument &) {
105 errorMessage =
"invalid gamma was not rejected";
109 errorMessage.clear();
111 }
catch (
const std::exception &e) {
112 errorMessage = e.what();
115 errorMessage =
"unknown exception";