Esempio n. 1
0
        public EdgeDetectorDialog()
        {
            InitializeComponent();
            _EdgeDetectorCommand = new EdgeDetectorCommand();

            //Set command default values
            _Threshold = 60;
            InitializeUI();
        }
Esempio n. 2
0
        private void EdgeDetectorDialog_Load(object sender, EventArgs e)
        {
            EdgeDetectorCommand command = new EdgeDetectorCommand();

            _initialThreshold = command.Threshold;
            _initialFilter    = command.Filter;


            Threshold = _initialThreshold;
            Filter    = _initialFilter;

            Tools.FillComboBoxWithEnum(_cbFilter, typeof(EdgeDetectorCommandType), Filter);

            _numThreshold.Maximum = _max;
            _numThreshold.Minimum = _min;
            DialogUtilities.SetNumericValue(_numThreshold, Threshold);
        }
Esempio n. 3
0
        private void EdgeDetectorDialog_Load(object sender, System.EventArgs e)
        {
            if (_firstTimer)
            {
                _firstTimer = false;
                EdgeDetectorCommand command = new EdgeDetectorCommand();
                _initialThreshold = command.Threshold;
                _initialFilter    = command.Filter;
            }

            Threshold = _initialThreshold;
            Filter    = _initialFilter;

            Tools.FillComboBoxWithEnum(_cbFilter, typeof(EdgeDetectorCommandType), Filter);

            switch (_bitsPerPixel)
            {
            case 12:
                _numThreshold.Maximum = 4095;
                break;

            case 16:
            case 48:
            case 64:
                _numThreshold.Maximum = 65535;
                break;

            default:
                _numThreshold.Maximum = 255;
                break;
            }

            if (_image.Signed)
            {
                _numThreshold.Maximum /= 2;
                _numThreshold.Minimum  = -_numThreshold.Maximum;
            }


            DialogUtilities.SetNumericValue(_numThreshold, Threshold);
        }