private void AdaptiveContrastDialog_Load(object sender, EventArgs e)
        {
            AdaptiveContrastCommand command = new AdaptiveContrastCommand();

            _amount    = command.Amount;
            _dimension = command.Dimension;
            _initialAdaptiveContrastType = command.Type;


            Amount               = _amount;
            Dimentions           = _dimension;
            AdaptiveContrastType = _initialAdaptiveContrastType;

            try
            {
                _numAmount.Value    = Amount;
                _numDimension.Value = Dimentions;

                switch ((int)AdaptiveContrastType)
                {
                case 0x00000001:
                    _cmbAdaptiveType.SelectedIndex = 0;
                    break;

                case 0x00000002:
                    _cmbAdaptiveType.SelectedIndex = 1;
                    break;
                }
            }
            catch (Exception /*ex*/)
            {
            }
        }
        private void ApplyFilter()
        {
            AdaptiveContrastCommandType type = AdaptiveContrastCommandType.Exponential;

            switch (_cbType.SelectedIndex)
            {
            case 0:
                type = AdaptiveContrastCommandType.Exponential;
                break;

            case 1:
                type = AdaptiveContrastCommandType.Linear;
                break;
            }
            AdaptiveContrastCommand command = new AdaptiveContrastCommand(Convert.ToInt32(_numSize.Value), Convert.ToInt32(_numAmount.Value), type);

            _mainForm.FilterRunCommand(command, true, false);
        }