Update the auto-stretch scheme and UI
ClosedPublic

Authored by murveit on Nov 15 2019, 8:46 AM.

Details

Summary

Modifies the auto-stretch algorithm.
Also, the UI is modified. When images are viewed, they can be viewed stretched or unstretched
and this can be toggled via a button in fitsviewer or on the floating tool bar in a fitsview.
This stretching does not modify the contents of the image.

Test Plan

Open a variety of fits images in fitsviewer and from captures in the capture, focus, align and guide tabs.
See if they can be stretched and unstretched.

Diff Detail

Repository
R321 KStars
Branch
new-stretch (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18935
Build 18953: arc lint + arc unit
murveit created this revision.Nov 15 2019, 8:46 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptNov 15 2019, 8:46 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
murveit requested review of this revision.Nov 15 2019, 8:46 AM

This is great thanks! It fails to compile:

kstars/fitsviewer/fitsview.cpp:406: error: undefined reference to Stretch<long>::Stretch(long*, int, int, int)
kstars/fitsviewer/fitsview.cpp:412: error: undefined reference to `Stretch<long>::computeParams()'

murveit updated this revision to Diff 69829.Nov 16 2019, 5:51 AM

Fixing compile error.
Remove some compiler warnings.

Even though FITS options AutoStretch is enabled, the FITS viewer does not automaitcally auto-stretch when loading a new image.

wreissenberger accepted this revision.Nov 18 2019, 10:49 PM

Works fine for me.

This revision is now accepted and ready to land.Nov 18 2019, 10:49 PM

The toggle button does not appear to be "checked" when it is turned on like the other ones I made do. Can you make it get highlighted/checked when you click it to turn it on?

murveit updated this revision to Diff 69974.Nov 19 2019, 9:32 AM

Removed some of the templating and refactored to simplify code.
Added highlighting to the stretch buttons when the image is stretched.
Needed to run initDisplayImage always in rescale, and not sure why.
Will continue to investigate.

murveit updated this revision to Diff 69976.Nov 19 2019, 9:40 AM

Fixed file permissions, which were accidentally set wrong.

mutlaqja accepted this revision.Nov 19 2019, 10:44 PM
This revision was automatically updated to reflect the committed changes.