Sunday, September 20, 2015

FITSViewer Histogram gets a face lift

The FITS histogram tool is one of the few tools in KStars that did not receive any significant updates for more than 10+ years. I first wrote it back in 2004 and used a custom painting widget to show the overall shape of the histogram. But with KStars gaining color FITS support a while back, it was necessary to support multi-channel histogram within the viewer.

While the FITSViewer tool, as the name suggests, is not designed for processing of astrophotography images; features such as the histogram and statistics tools are often important for decision-making during the capture process and for quickly inspecting images, and hence they were made available to the end user. The histogram implementation was also quite buggy as it was designed for 8-bit FITS, but now KStars support 8, 16, 32-bit signed integer, 32-bit IEEE floating point, and 64-bit IEEE double precision floating point. The updated implementation now caters to all data types and is smarter about selection of bin widths for each image.

In addition to supporting multi-channel histograms, the GUI was revamped and is now utilizing the amazing QCustomPlot library. At first, I wanted to utilize the KPlotting KDE library, which was authored by our very own Jason Harris, KStars founder back in 2001! But QCustomPlot offers several advantages over KPlotting including user interaction capabilities such as zoom and drag in addition to a host of other features. Furthermore, QCustomPlot is being actively developed while KPlotting hasn't received any noticeable updates in a very long time.

The following is a screenshot of the older histogram implementation:

And this the updated implementation, to be available for KDE Applications 15.12:

No comments: