-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Médéric RIBREUX
committed
May 29, 2016
1 parent
651302e
commit 89ec2fb
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
python/plugins/processing/algs/grass7/description/i.colors.enhance.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
i.colors.enhance | ||
Performs auto-balancing of colors for RGB images. | ||
Imagery (i.*) | ||
ParameterRaster|red|Name of red channel|False | ||
ParameterRaster|green|Name of green channel|False | ||
ParameterRaster|blue|Name of blue channel|False | ||
ParameterNumber|strength|Cropping intensity (upper brightness level)|0|100|98|True | ||
*ParameterBoolean|-f|Extend colors to full range of data on each channel|False | ||
*ParameterBoolean|-p|Preserve relative colors, adjust brightness only|False | ||
*ParameterBoolean|-r|Reset to standard color range|False | ||
*ParameterBoolean|-s|Process bands serially (default: run in parallel)|False | ||
OutputRaster|redoutput|Enhanced Red | ||
OutputRaster|greenoutput|Enhanced Green | ||
OutputRaster|blueoutput|Enhanced Blue | ||
|
48 changes: 48 additions & 0 deletions
48
python/plugins/processing/algs/grass7/ext/i_colors_enhance.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
*************************************************************************** | ||
i_colors_enhance.py | ||
------------------- | ||
Date : March 2016 | ||
Copyright : (C) 2016 by Médéric Ribreux | ||
Email : medspx at medspx dot fr | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
*************************************************************************** | ||
""" | ||
|
||
__author__ = 'Médéric Ribreux' | ||
__date__ = 'March 2016' | ||
__copyright__ = '(C) 2016, Médéric Ribreux' | ||
|
||
# This will get replaced with a git SHA1 when you do a git archive | ||
|
||
__revision__ = '$Format:%H$' | ||
|
||
from i import exportInputRasters | ||
|
||
|
||
def processCommand(alg): | ||
|
||
# Temporary remove outputs: | ||
outputs = [alg.getOutputFromName('{}output'.format(f)) for f in ['red', 'green', 'blue']] | ||
for out in outputs: | ||
alg.removeOutputFromName(out.name) | ||
|
||
alg.processCommand() | ||
|
||
# Re-add outputs | ||
for output in outputs: | ||
alg.addOutput(output) | ||
|
||
|
||
def processOutputs(alg): | ||
# Input rasters are output rasters | ||
rasterDic = {'red': 'redoutput', 'green': 'greenoutput', 'blue': 'blueoutput'} | ||
exportInputRasters(alg, rasterDic) |