Action906.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using PaintDotNet.Base;
  2. using PaintDotNet.Base.Functionodel;
  3. using PaintDotNet.Data.Param;
  4. using System.Collections.Generic;
  5. namespace PaintDotNet.Data.Action
  6. {
  7. /// <summary>
  8. /// 细化
  9. /// </summary>
  10. public class Action906 : ParamObject
  11. {
  12. /*public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
  13. {
  14. return Adjust.MorphologyIntent.Thinning(src, this.Lists);
  15. }*/
  16. public override OpenCvSharp.Mat PerformProcess(PhaseModel phaseModel)
  17. {
  18. return Adjust.MorphologyIntent.Thinning(phaseModel.mat, this.Lists, phaseModel.color);
  19. }
  20. public override OpenCvSharp.Mat PerformProcess(PhaseModel phaseModel, double rule)
  21. {
  22. return Adjust.MorphologyIntent.Thinning(phaseModel.mat, this.Lists, phaseModel.color);
  23. }
  24. public Action906()
  25. {
  26. this.MenuId = ActionType.ActionThinning;
  27. this.OpenImage = "currentPhase";
  28. IntegerNumber integerNumber = new IntegerNumber(0, 255);
  29. integerNumber.key = "Count";
  30. integerNumber.name = PdnResources.GetString("Menu.numberoftimes.text");
  31. integerNumber.initialValue = 0;
  32. integerNumber.Value = 0;
  33. lists.Add(integerNumber);
  34. }
  35. }
  36. }