Action908.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using PaintDotNet.Base;
  2. using PaintDotNet.Base.Enum;
  3. using PaintDotNet.Base.Functionodel;
  4. using PaintDotNet.Data.Param;
  5. using System.Collections.Generic;
  6. namespace PaintDotNet.Data.Action
  7. {
  8. /// <summary>
  9. /// 闭运算
  10. /// </summary>
  11. public class Action908 : ParamObject
  12. {
  13. public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
  14. {
  15. return Adjust.MorphologyIntent.ImageClose(src, this.Lists);
  16. }
  17. public override OpenCvSharp.Mat PerformProcess(PhaseModel phaseModel)
  18. {
  19. return Adjust.MorphologyIntent.ImageClose(phaseModel.mat, this.Lists);
  20. }
  21. public override OpenCvSharp.Mat PerformProcess(PhaseModel phaseModel, double rule)
  22. {
  23. return Adjust.MorphologyIntent.ImageClose(phaseModel.mat, this.Lists);
  24. }
  25. public Action908()
  26. {
  27. this.MenuId = ActionType.ActionCloseExtraction;
  28. this.OpenImage = "currentPhase";
  29. IntegerNumber integerNumber = new IntegerNumber(1, 255);
  30. integerNumber.key = "Count";
  31. integerNumber.name = PdnResources.GetString("Menu.numberoftimes.text");
  32. integerNumber.initialValue = 1;
  33. integerNumber.Value = 1;
  34. lists.Add(integerNumber);
  35. StringArray stringArray = new StringArray();
  36. stringArray.key = "Structures";
  37. stringArray.name = PdnResources.GetString("Menu.structure.text");
  38. stringArray.initialValue = InvariantData.structures;
  39. stringArray.Value = 0; // Structure.horizon;
  40. lists.Add(stringArray);
  41. }
  42. }
  43. }