示例#1
0
        public LocalHistogramEqualizeDialog(RasterImage TempImage)
        {
            InitializeComponent();
            _LocalHistogramEqualizeCommand = new LocalHistogramEqualizeCommand();
            _MaxWidth  = TempImage.Width;
            _MaxHeight = TempImage.Height;

            //Set command default values
            InitializeUI();
        }
示例#2
0
        private void LocalEqualizerDialog_Load(object sender, EventArgs e)
        {
            LocalHistogramEqualizeCommand command = new LocalHistogramEqualizeCommand();

            _initialWidth        = command.Width;
            _initialHeight       = command.Height;
            _initialWidthExt     = command.WidthExtension;
            _initialHeightExt    = command.HeightExtension;
            _initialSmooth       = command.Smooth;
            _initialEqualizeType = command.Type;


            nWidth       = _initialWidth;
            nHeight      = _initialHeight;
            nWidthExt    = _initialWidthExt;
            nHeightExt   = _initialHeightExt;
            nSmooth      = _initialSmooth;
            EqualizeType = _initialEqualizeType;

            _numWidth.Value     = nWidth;
            _numHeight.Value    = nHeight;
            _numWidthExt.Value  = nWidthExt;
            _numHeightExt.Value = nHeightExt;
            _numSmooth.Value    = nSmooth;

            _numWidth.Maximum    = _width;
            _numWidth.Minimum    = 1;
            _numWidthExt.Maximum = _width;
            _numWidthExt.Minimum = 0;

            _numHeight.Maximum    = _height;
            _numHeight.Minimum    = 1;
            _numHeightExt.Maximum = _height;
            _numHeightExt.Minimum = 0;

            _numWidth.Value  = _width;
            _numHeight.Value = _height;

            Tools.FillComboBoxWithEnum(_cbEqualizeType, typeof(HistogramEqualizeType), EqualizeType, new object[] { UnsharpMaskCommandColorType.None });
        }