Inheritance: StageOperationParameters
        public override object Clone()
        {
            BrightnessStageOperationParameters target = new BrightnessStageOperationParameters();

            CopyDataTo(target);
            return(target);
        }
Example #2
0
        public override void OnDo(IBitmapCore hdp)
        {
            BrightnessStageOperationParameters pm = (BrightnessStageOperationParameters)Parameters;


            Console.WriteLine("Calculating current median...");
            double median = hdp.AmplitudeFindMedian();

            Console.WriteLine("Setting brightness...");

            if (pm.Normalize)
            {
                hdp.AmplitudeMultiply(pm.Brightness * 0.5 / median,
                                      delegate(double progress) {
                    return(OnReportProgress(progress));
                }
                                      );
            }
            else
            {
                hdp.AmplitudeMultiply(pm.Brightness,
                                      delegate(double progress) {
                    return(OnReportProgress(progress));
                }
                                      );
            }
        }
        public override void CopyDataTo(StageOperationParameters target)
        {
            base.CopyDataTo(target);
            BrightnessStageOperationParameters t = (BrightnessStageOperationParameters)target;

            t.mBrightness = mBrightness;
            t.mNormalize  = mNormalize;
            t.OnChanged();
        }
 public override object Clone()
 {
     BrightnessStageOperationParameters target = new BrightnessStageOperationParameters();
     CopyDataTo(target);
     return target;
 }