Bug report #7619

Setting a "max" value in Raster Properties Histogram has no effect

Added by Anita Graser over 11 years ago. Updated over 11 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Etienne Tourigny
Category:GUI
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data:No Copied to github as #:16544

Description

Setting a max value does not change the histogram. It doesn't even affect when I call "recompute histogram".

This is a new functionality which was not available in 1.8.

Tested on Win7.

History

#1 Updated by Pedro Venâncio over 11 years ago

Anita, if you activate the option "Show min/max markers", the min/max are shown in the histogram by dashed lines.

Then you can make a manual "zoom" on the histogram to only show the area between min and max values.

#2 Updated by Anita Graser over 11 years ago

Thanks for your feedack Pedro. Do you mean that editing the min and max values should not do anything? I was expecting that the histogram would zoom to these bounds. If it shouldn't, then the UI is misleading. The user should not be able to edit these values if it doesn't affect anything. Just turn the fields into read-only then.

#3 Updated by Pedro Venâncio over 11 years ago

Hi Anita,

I also think it could be implemented the functionality to zoom to histogram bounds.

However, I think we can not say that currently does not affect anything, because when you set the min and max values and click Apply, these values are applied to raster.

#4 Updated by Anita Graser over 11 years ago

Oh, so they are applied to the raster style?

Isn't that even worse? I as a user find that totally confusing. I can already change the value in the style tab. I wouldn't expect the field on the histogram tab to do the same.

#5 Updated by Pedro Venâncio over 11 years ago

I see an advantage in having this function, which is the ability to manually set the min and max limits according to the values plotted in the histogram.

#6 Updated by Etienne Tourigny over 11 years ago

  • Assignee set to Etienne Tourigny

I implemented these features some time ago, and will look into it.

#7 Updated by Etienne Tourigny over 11 years ago

  • Status changed from Open to Feedback

I see what you mean Anita, I implemented this to be able to manually set the bounds, based on the actual histogram. Going back and forth from the style and histogram tabs is highly tedious. Originally I wanted something like what you have in gimp or Photoshop, with arrows to select the min/max values on the histogram. However, I couldn't find a suitable QT widget and gave up.

How would you improve this? I do not want to remove the ability to set the min/max of the style from histogram.

I could add an option to zoom to these bounds. However, how do you zoom back out? Currently you can right-click after doing a left-click + drag zoom in.

I would suggest the following:

1) always show min/max markers when one of the hands are clicked, regardless of "show min/max markers"
2) add an option (off by default) to zoom to min/max

#8 Updated by Anita Graser over 11 years ago

Hi Etienne! I now understand what was the motivation behind the feature. To communicate to the user what to expect from the dialog, I could imagine having labels such as:

"style Band [band dropdown] using Min [input] and Max [input]"

Just to make clear that these input fields are not meant to modify the histogram but rather are a shortcut to layer styling.

#9 Updated by Etienne Tourigny over 11 years ago

I'll try your suggestion, along with 1) and 2) that I wrote above and 3) here.

3) Also, it might be worth not updating the style automatically. should this be done with a button and/or option to update automatically when values are changed?

#10 Updated by Etienne Tourigny over 11 years ago

I have committed changes that should resolve all points mentioned here. Please test this week and give me your feedback.

#11 Updated by Anita Graser over 11 years ago

I guess it's fine now. Thanks!

#12 Updated by Etienne Tourigny over 11 years ago

  • % Done changed from 0 to 100
  • Resolution set to fixed

thanks for your input

#13 Updated by Etienne Tourigny over 11 years ago

  • Status changed from Feedback to Resolved

#14 Updated by Mathieu Pellerin - nIRV over 11 years ago

  • Status changed from Resolved to Closed

Changing status from resolved to closed, resolution fixed.

Also available in: Atom PDF