Example #1
0
        private void applyFunctionCorrection_Click(object sender, EventArgs e)
        {
            if (currentType == TransformType.FunctionCorrection)
            {
                switch ((string)comboBoxFunctionCorrection.SelectedItem)
                {
                case "Линейная коррекция":
                    var mm = correction3.getMinMaxIntens();
                    pictureBoxHistCorrection2.Image =
                        correction3.TransformWithLinearCorrection(mm.Item1, mm.Item2);
                    break;

                case "Гамма-коррекция":
                    pictureBoxHistCorrection2.Image =
                        correction3.TransformWithGammaCorrection(Double.Parse(gammaCounterFunctionCorrection.Text));
                    break;
                }
                fillHistAfterTransfrom(correction3);
            }
            else
            {
                pictureBoxHistCorrection2.Image = correction4.Transform();
                fillHistAfterTransfrom(correction4);
            }
        }