Feature request #4918

Bring out of raster properties the "contrast enhancement" and "standard deviation" options, and put them in QGIS general options

Added by Giovanni Manghi over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:Alexander Bruy
Category:Rasters
Pull Request or Patch supplied:No Resolution:fixed
Easy fix?:No Copied to github as #:14724

Description

In the raster properties there are two options

  • contrast enhancement
  • standard deviation

with a button to allow same the configuration in a way that it stays "persistent between qgis sessions"

Such configurations make more sense in QGIS general options, leaving them also in the raster properties to allow the user override the general configuration in any specific raster layer.

History

#1 Updated by Giovanni Manghi over 8 years ago

The button to save the standard deviation shows only in RGB raster, not single band. Don't know if this is right/on purpose or if it is another bug.

#2 Updated by Alexander Bruy over 8 years ago

Not sure that this makes sense. In some use cases it is necessary to have raster with and without stretching in same project

#3 Updated by Giovanni Manghi over 8 years ago

Alexander Bruy wrote:

Not sure that this makes sense. In some use cases it is necessary to have raster with and without stretching in same project

yes, this is because I wrote that is necessary to maintain the same configurations also at a layer level. Anyway it is just a suggestion to feel free to close it as invalid if you feel it does not make sense at all.

But this way a user would be able for example to not have stretching/stats by default, and then compute them only where needed.

#4 Updated by Maxim Dubinin over 8 years ago

I believe, the button to save STD should work for 1 band rasters as well.

Regarding remove 'save settings' buttons to general options, I agree this would nice to have! I'd just add a note or link to this section in general options right on the raster attributes window.

#5 Updated by Alexander Bruy over 8 years ago

Should we leave ability to change global defaults from raster properties or only allow to change this settings for current raster?

#6 Updated by Giovanni Manghi over 8 years ago

Alexander Bruy wrote:

Should we leave ability to change global defaults from raster properties or only allow to change this settings for current raster?

In my personal opinion the global behaviour should be moved to the "options" item in the "settings" menu. In each raster layer the global options (for stretching, standard deviation, etc.) should be available in case its necessary to override the general parameters.

#7 Updated by Paolo Cavallini over 8 years ago

+1
Please also add a sensible default for greyscale.

#8 Updated by Giovanni Manghi over 8 years ago

Paolo Cavallini wrote:

+1
Please also add a sensible default for greyscale.

Side notes: generally speaking rasters should be loaded "as they are", leaving computing of stats as an option. When computing stats a progress bar should be presented, to avoid let users think that qgis frooze (as it can take a lot for large rasters). The default stadard devation value (2) seems a bit to high, it easy to demonstrate that a smaller value (around 1.7) produced better results.

#9 Updated by Giovanni Manghi over 8 years ago

Alexander Bruy wrote:

Should we leave ability to change global defaults from raster properties or only allow to change this settings for current raster?

as suggested in the users mailing list it could be good also to put in the qgis general options the option about what colormap apply by default to newly one-banded rasters added to the project, leaving obviously the option to override at a layer level.

#10 Updated by alobo - over 8 years ago

According to what I'm seeing, is not only that the "save" (disquette) button is not
present for single band raster layers, the STD option results into a 0,0 range and black display,
no matter the value of the factor. I've also tried different data types (INTUS, INT2S, FLT8S...)
Perhaps this issue should be a different ticket?
Agus

#11 Updated by alobo - over 8 years ago

I withdraw my comment: the problem with the 0,0 range resulting
from applying the STD option is not related to the number of bands and is
not related to the presence of the save button. It is a different problem
that occurs for some raster layers.

#12 Updated by Alexander Bruy over 8 years ago

I tried to implement this, look at branch raster_settings in my fork.

#13 Updated by Giovanni Manghi over 8 years ago

Alexander Bruy wrote:

I tried to implement this, look at branch raster_settings in my fork.

Hi Alexander, finally I made to have a look to your branch. To me is a nice improvement. Will try more now with a large dataset.

#14 Updated by Alexander Bruy over 8 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Implemented in f74f70e6ea

Also available in: Atom PDF