constrast enhancement for browser image

This commit is contained in:
nuknal
2024-07-17 12:45:29 +08:00
parent 63f995ccfe
commit cab03827f0
3 changed files with 164 additions and 13 deletions

View File

@@ -8,6 +8,7 @@ import (
type Config struct {
CoRegistration CoRegistrationConfig `yaml:"coregistration" mapstructure:"coregistration"`
Radiation RadiationConfig `yaml:"radiation" mapstructure:"radiation"`
BrowserImg BrowserImgConfig `yaml:"browser_img" mapstructure:"browser_img"`
LogLevel logrus.Level `yaml:"log_level" mapstructure:"log_level"`
}
@@ -33,6 +34,12 @@ type RadiationConfig struct {
HFBandStopWidth int `yaml:"hf_band_stop_width" mapstructure:"hf_band_stop_width"`
}
type BrowserImgConfig struct {
Enhancement string `yaml:"enhancement" mapstructure:"enhancement"`
CumulativeCutLower float64 `yaml:"cumulative_cut_lower" mapstructure:"cumulative_cut_lower"`
CumulativeCutUpper float64 `yaml:"cumulative_cut_upper" mapstructure:"cumulative_cut_upper"`
}
var GCONFIG Config
func init() {
@@ -58,5 +65,10 @@ func init() {
HfRadiusRatio: 0.49,
HFBandStopWidth: 24,
},
BrowserImg: BrowserImgConfig{
Enhancement: "StretchToCumulativeCutMinMax",
CumulativeCutLower: 0.01,
CumulativeCutUpper: 0.99,
},
}
}