| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- using System.Xml.Serialization;
- namespace PaintDotNet.Base.SettingModel
- {
- /// <summary>
- /// 二值提取 - 参数设置
- /// </summary>
- [XmlRoot("ROOT")]
- public class BinaryExtractionModel
- {
- /// <summary>
- /// 1个颜色区间或2个颜色区间
- /// </summary>
- public int ColorInterval { get; set; }
- /// <summary>
- /// 第一个颜色区间起始值
- /// </summary>
- public int ColorOneStart { get; set; }
- /// <summary>
- /// 第一个颜色区间结束值
- /// </summary>
- public int ColorOneEnd { get; set; }
- /// <summary>
- /// 第二个颜色区间起始值
- /// </summary>
- public int ColorTwoStart { get; set; }
- /// <summary>
- /// 第二个颜色区间结束值
- /// </summary>
- public int ColorTwoEnd { get; set; }
- /// <summary>
- /// 第三个颜色区间起始值
- /// </summary>
- public int ColorThreeStart { get; set; }
- /// <summary>
- /// 第三个颜色区间结束值
- /// </summary>
- public int ColorThreeEnd { get; set; }
- /// <summary>
- /// 自动阈值
- /// </summary>
- public bool AutoThreshold { get; set; }
- /// <summary>
- /// 删除边界对象
- /// </summary>
- public bool DeleteBoundaryObject { get; set; }
- /// <summary>
- /// 孔洞填充
- /// </summary>
- public bool HoleFilling { get; set; }
- /// <summary>
- /// 碎屑删除
- /// </summary>
- public bool DebrisRemoval { get; set; }
- /// <summary>
- /// 碎屑删除面积起始值
- /// </summary>
- public int DebrisAreaStart { get; set; }
- /// <summary>
- /// 碎屑删除面积结束值
- /// </summary>
- public int DebrisAreaEnd { get; set; }
- /// <summary>
- /// 二值样式
- /// </summary>
- public int BinaryStyle { get; set; }
- /// <summary>
- /// 相颜色
- /// </summary>
- public int PhaseColor { get; set; }
- /// <summary>
- /// 目标选择
- /// </summary>
- public int TargetSelection { get; set; }
- /// <summary>
- /// 是否二值化和显示原图, 0不二值化和不显示原图,1不二值化和显示原图,2二值化和不显示原图,3二值化和显示原图
- /// </summary>
- public int BinaryCheckFlag { get; set; }
- public BinaryExtractionModel cloneModel()
- {
- BinaryExtractionModel newMod = new BinaryExtractionModel();
- newMod.ColorInterval = this.ColorInterval;
- newMod.ColorOneStart = this.ColorOneStart;
- newMod.ColorOneEnd = this.ColorOneEnd;
- newMod.ColorTwoStart = this.ColorTwoStart;
- newMod.ColorTwoEnd = this.ColorTwoEnd;
- newMod.ColorThreeStart = this.ColorThreeStart;
- newMod.ColorThreeEnd = this.ColorThreeEnd;
- newMod.AutoThreshold = this.AutoThreshold;
- newMod.DeleteBoundaryObject = this.DeleteBoundaryObject;
- newMod.HoleFilling = this.HoleFilling;
- newMod.DebrisRemoval = this.DebrisRemoval;
- newMod.DebrisAreaStart = this.DebrisAreaStart;
- newMod.DebrisAreaEnd = this.DebrisAreaEnd;
- newMod.BinaryStyle = this.BinaryStyle;
- newMod.PhaseColor = this.PhaseColor;
- newMod.TargetSelection = this.TargetSelection;
- newMod.BinaryCheckFlag = this.BinaryCheckFlag;
- return newMod;
- }
- }
- }
|