public HistogramEqualizeDialog(MedicalViewerMultiCell cell, MainForm mainForm)
 {
     _cell     = cell;
     _mainForm = mainForm;
     InitializeComponent();
     _cbColorSpace.SelectedIndex = 0;
     _firstTime       = true;
     _oldWindowWidth  = _cell.GetWindowLevelWidth();
     _oldWindowCenter = _cell.GetWindowLevelCenter();
 }
Esempio n. 2
0
        public CLAHEDialog(MainForm mainForm, MedicalViewerCell cell)
        {
            _mainForm = mainForm;
            _cell     = (MedicalViewerMultiCell)cell;
            _command  = new CLAHECommand();

            InitializeComponent();

            _firstTime = true;

            _cbFlags.SelectedIndex      = 0;
            _cbBinsNumber.SelectedIndex = 6;

            _numAlpha.Value       = (decimal)_command.AlphaFactor;
            _numTilesNumber.Value = (decimal)_command.TilesNumber;
            _numClipLimit.Value   = (decimal)_command.TileHistClipLimit;

            _oldWindowWidth  = _cell.GetWindowLevelWidth();
            _oldWindowCenter = _cell.GetWindowLevelCenter();

            switch (_command.Flags)
            {
            case CLAHECommandFlags.ApplyNormalDistribution:
                _cbFlags.SelectedIndex = 0;
                break;

            case CLAHECommandFlags.ApplyExponentialDistribution:
                _cbFlags.SelectedIndex = 1;
                break;

            case CLAHECommandFlags.ApplyRayliehDistribution:
                _cbFlags.SelectedIndex = 2;
                break;

            case CLAHECommandFlags.ApplySigmoidDistribution:
                _cbFlags.SelectedIndex = 3;
                break;
            }
        }