Feature request #2024

Add Raster Stretching/Enhancement based on portion of image in current window

Added by jgr007 - over 14 years ago. Updated over 13 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Rasters
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:12084

Description

I'd like to have the option to do enhancement/stretching based on the statistics of the portion of the image displayed in the current window (vs. stats of entire image). I posted a message to the developer list and Peter Ersts suggested that this would be a good one to add to the code base and asked that I file a ticket on it. Hopefully this is the right way to do that. :)

History

#1 Updated by ersts - over 14 years ago

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

It turns out this actually would have been a little easier as a plugin, but it should be core functionality. The issue at hand is that the layer itself does not know what is currently being display. draw() accepts a render context object which is used to determine what portion of the layer to display, but that object comes from the map canvas.

There is a solution in the trunk now, r 12015.

#2 Updated by cgsbob - over 14 years ago

  • Resolution deleted (fixed)
  • Status changed from Closed to Feedback

Replying to [comment:1 ersts]:

It turns out this actually would have been a little easier as a plugin, but it should be core functionality. The issue at hand is that the layer itself does not know what is currently being display. draw() accepts a render context object which is used to determine what portion of the layer to display, but that object comes from the map canvas.

There is a solution in the trunk now, r 12015.

What a handy addition to qgis! I was thinking that it would be nice to have this functionality available using the legend right click menu.

#3 Updated by ersts - over 13 years ago

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

The option "Stretch using current extent" was added to the right-click legend menu in d5e0f6bf (SVN r14032). This option is not available for "Palette" layers. If this menu option is selected while displaying a single band with a color map or as pseudo color, it will switch the layer back to gray scale. Additionally if, you to not have a contrast enhancement set stretch to min max will automatically be selected.

Also available in: Atom PDF