// ============================================================================
// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
// 文件名: ProcessorParameter.cs
// 描述: 图像处理算子参数定义类,用于描述算子的可配置参数
// 功能:
// - 定义参数的基本属性(名称、类型、默认值)
// - 支持参数范围约束(最小值、最大值)
// - 支持枚举类型参数(下拉选项)
// - 提供参数描述信息用于UI显示
// - 统一的参数管理机制
// 作者: 李伟 wei.lw.li@hexagon.com
// ============================================================================
namespace ImageProcessing.Core;
///
/// 图像处理算子参数定义
///
public class ProcessorParameter
{
/// 参数名称(代码中使用)
public string Name { get; set; }
/// 显示名称(UI中显示)
public string DisplayName { get; set; }
/// 参数类型
public Type ValueType { get; set; }
/// 当前值
public object Value { get; set; }
/// 最小值(可选)
public object? MinValue { get; set; }
/// 最大值(可选)
public object? MaxValue { get; set; }
/// 参数描述
public string Description { get; set; }
/// 可选值列表(用于下拉框)
public string[]? Options { get; set; }
/// 参数是否可见
public bool IsVisible { get; set; } = true;
public ProcessorParameter(string name, string displayName, Type valueType, object defaultValue,
object? minValue = null, object? maxValue = null, string description = "", string[]? options = null)
{
Name = name;
DisplayName = displayName;
ValueType = valueType;
Value = defaultValue;
MinValue = minValue;
MaxValue = maxValue;
Description = description;
Options = options;
}
}