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