This project (see `./test/jkqtplotter_simpletest_imageplot_opencv/`) simply creates a JKQtPlotter widget (as a new window) and adds a color-coded image plot of a mathematical function (here the Airy disk). The image is generated as an OpenCV cv::Mat image and then copied into a single column of the internal datasdtore (JKQTPMathImage could be directly used without the internal datastore).
To copy the data a special OpenCV Interface function `JKQTPdatastore::copyCvMatToColumn()` is used, that copies the data from a cv::Mat directly into a column.
The function `JKQTPdatastore::copyCvMatToColumn()` is only available, when the preprocessore macro `JKQTPLOTTER_OPENCV_INTERFACE` is defined when compiling the JKQtPlotter library.
The source code of the main application is (see `./test/jkqtplotter_simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp`):
// set size of the data (the datastore does not contain this info, as it only manages 1D columns of data and this is used to assume a row-major ordering
graph->set_Nx(airydisk.cols);
graph->set_Ny(airydisk.rows);
// where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner)
graph->set_x(-w/2.0);
graph->set_y(-h/2.0);
// width and height of the image in plot-axis-coordinates
graph->set_width(w);
graph->set_height(h);
// color-map is "MATLAB"
graph->set_palette(JKQTPMathImageMATLAB);
// get coordinate axis of color-bar and set its label
See [`test/jkqtplotter_simpletest_imageplot`](https://github.com/jkriege2/JKQtPlotter/tree/master/test/jkqtplotter_simpletest_imageplot) for a detailed description of the other possibilities that the class JKQTPColumnMathImage (and also JKQTPMathImage) offer with respect to determining how an image is plottet.