<div dir="ltr"><div>One note I would add is that the  2-click option does not work with a  singleband pseudocolor renderer(neither does the raster toolbar which offers a 1-click stretch).  So I think updating the right-click>"Stretch using current extent" to work with singleband pseudocolor would be excellent to include. Also, I agree that min/max would be good as a default, for singleband at least.  Beyond that I like the sound of solution and I would love to see this functionality in QGIS.<br><br></div><div>a<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 2, 2016 at 3:38 AM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
There has been interest expressed to improve the usability of the contrast<br>
enhancement function. Basically there are workflows where you want the min/max<br>
values used by contrast enhancement to be updated each time you pan or zoom<br>
the canvas. From what I've seen, here's what currently exists:<br>
- a long method (6 clicks): through the Style tab of the layer properties<br>
- a faster method (2 clicks): through the "Strech using current extent" of the<br>
contextual menu of the layer panel.<br>
<br>
When you have several rasters loaded, even the 2-click method is inconvenient,<br>
so there's a need for a 0-click solution (once the layers have been configured)<br>
<br>
Another shortcoming in the current implementation is that the settings of the<br>
"Load min/max values" foldable group are not persistant, which requires re-<br>
setting them if you're not happy with the default Cumlative count cut method.<br>
And if you use the "Strech using current extent" menu item, the genuine<br>
min/max values are used (not the 2-98% cumulative count cut)<br>
<br>
So I was thinking to something along the following lines:<br>
- make the min/max settings persistant<br>
- remove the "Load" button and "Clip extent to canvas" checkbox, and replace<br>
them by 3 radio buttons to determine the scope of statistics : "Whole raster",<br>
"Current canvas" and "Updated canvas". See the attached proposal_min_max.png.<br>
The function of the Load button would be replaced by the general Apply / OK<br>
buttons.<br>
- when the user manually enters the min/max values, the 2 groups of radio<br>
buttons (method to compute min/max and scope of statistics) would be unchecked<br>
so that is is clear that they don't come from computed statistics. I also<br>
think that when you select "Current canvas", once the Apply/OK buttons have<br>
been pushed, the checked state of Current canvas shouldn't be saved. This way<br>
when you display the layer properties you have a good idea of where the<br>
current min/max values come from.<br>
- make the "Strech using current extent" method honour the way min/max are<br>
computed in the min/max settings instead of using systematically the min/max.<br>
So when "Updated canvas" would be selected, it would have no (extra) effect as<br>
expected.<br>
<br>
Any opinions ?<br>
<span class="HOEnZb"><font color="#888888"><br>
Even<br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</font></span><br>______________________________<wbr>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br></blockquote></div><br></div>