using PaintDotNet.Base; using PaintDotNet.Base.Enum; using PaintDotNet.Base.Functionodel; using PaintDotNet.Data.Param; using System.Collections.Generic; namespace PaintDotNet.Data.Action { /// /// 闭运算 /// public class Action908 : ParamObject { public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src) { return Adjust.MorphologyIntent.ImageClose(src, this.Lists); } public override OpenCvSharp.Mat PerformProcess(PhaseModel phaseModel) { return Adjust.MorphologyIntent.ImageClose(phaseModel.mat, this.Lists); } public override OpenCvSharp.Mat PerformProcess(PhaseModel phaseModel, double rule) { return Adjust.MorphologyIntent.ImageClose(phaseModel.mat, this.Lists); } public Action908() { this.MenuId = ActionType.ActionCloseExtraction; this.OpenImage = "currentPhase"; IntegerNumber integerNumber = new IntegerNumber(1, 255); integerNumber.key = "Count"; integerNumber.name = PdnResources.GetString("Menu.numberoftimes.text"); integerNumber.initialValue = 1; integerNumber.Value = 1; lists.Add(integerNumber); StringArray stringArray = new StringArray(); stringArray.key = "Structures"; stringArray.name = PdnResources.GetString("Menu.structure.text"); stringArray.initialValue = InvariantData.structures; stringArray.Value = 0; // Structure.horizon; lists.Add(stringArray); } } }