Module Valley and Ridge Detection (Top Hat Approach)
Calculating fuzzy valley and ridge class memberships using the Top Hat approach. Based on the AML script 'tophat' by Jochen Schmidt, Landcare Research. 
References:
Rodriguez, F., Maire, E., Courjault-Rad'e, P., Darrozes, J. (2002): The Black Top Hat function applied to a DEM: a tool to estimate recent incision in a mountainous watershed. (Estib`ere Watershed, Central Pyrenees). Geophysical Research Letters, 29(6), 9-1 - 9-4.
- Author: O.Conrad (c) 2013
 
- Specification: grid
 
- Menu: Terrain Analysis|Terrain Classification
 
Parameters
|   | Name | Type | Identifier | Description | Constraints | 
| Input | Elevation | Grid (input) | DEM | - | - | 
| Output | Valley Depth (*) | Grid (optional output) | VALLEY | - | - | 
 | Hill Height (*) | Grid (optional output) | HILL | - | - | 
 | Valley Index | Grid (output) | VALLEY_IDX | - | - | 
 | Hill Index | Grid (output) | HILL_IDX | - | - | 
 | Hillslope Index (*) | Grid (optional output) | SLOPE_IDX | - | - | 
| Options | Valley Radius | Floating point | RADIUS_VALLEY | radius given in map units used to fill valleys | Minimum: 0.000000 Default: 1000.000000 | 
 | Hill Radius | Floating point | RADIUS_HILL | radius given in map units used to cut hills | Minimum: 0.000000 Default: 1000.000000 | 
 | Elevation Threshold | Floating point | THRESHOLD | elevation threshold used to identify hills/valleys | Minimum: 0.000000 Default: 100.000000 | 
 | Slope Index | Choice | METHOD | - | Available Choices: [0] default [1] alternative Default: 0 | 
| (*) optional | 
Command-line
Usage: saga_cmd ta_morphometry 24 [-DEM <str>] [-VALLEY <str>] [-HILL <str>] [-VALLEY_IDX <str>] [-HILL_IDX <str>] [-SLOPE_IDX <str>] [-RADIUS_VALLEY <str>] [-RADIUS_HILL <str>] [-THRESHOLD <str>] [-METHOD <str>]
  -DEM:<str>          	Elevation
	Grid (input)
  -VALLEY:<str>       	Valley Depth
	Grid (optional output)
  -HILL:<str>         	Hill Height
	Grid (optional output)
  -VALLEY_IDX:<str>   	Valley Index
	Grid (output)
  -HILL_IDX:<str>     	Hill Index
	Grid (output)
  -SLOPE_IDX:<str>    	Hillslope Index
	Grid (optional output)
  -RADIUS_VALLEY:<str>	Valley Radius
	Floating point
	Minimum: 0.000000
	Default: 1000.000000
  -RADIUS_HILL:<str>  	Hill Radius
	Floating point
	Minimum: 0.000000
	Default: 1000.000000
  -THRESHOLD:<str>    	Elevation Threshold
	Floating point
	Minimum: 0.000000
	Default: 100.000000
  -METHOD:<str>       	Slope Index
	Choice
	Available Choices:
	[0] default
	[1] alternative
	Default: 0