110 lines
3.2 KiB
Markdown
110 lines
3.2 KiB
Markdown
## XplorePlane 平面CT软件
|
||
|
||
### 系统目标
|
||
|
||
XplorePlane 系统用于控制平面 CT 设备的各个子系统(射线源、探测器、运动控制)并完成采集图像的处理与分析,为研发与调试提供统一的软件平台。
|
||
|
||
**总体架构风格**
|
||
|
||
- 客户端框架: WPF + Prism MVVM(项目 XplorePlane,目标框架 net8.0-windows)
|
||
- 图像处理内核: 独立类库 ImageProcessing.Core(算子基类与参数模型)和 ImageProcessing.Processors(具体算子实现),基于 EmguCV
|
||
- 基础设施: 日志使用 Serilog,序列化使用 Newtonsoft.Json,资源统一通过 WPF 资源系统管理
|
||
|
||
**开发目标**
|
||
|
||
在现有图像处理与 UI 基础上,引入并集成:
|
||
|
||
- 射线源子系统(X-Ray Source)
|
||
- 探测器子系统(Detector)
|
||
- 运动控制子系统(Motion Control)
|
||
- 通过统一的 CT 扫描工作流,在 UI 中实现一键式扫描、实时状态监控与图像后处理
|
||
|
||
### 项目框架
|
||
|
||
```css
|
||
XplorePlane/
|
||
├── XplorePlane.csproj # .NET 8 WPF project file
|
||
│
|
||
├── App.xaml # Application + global ResourceDictionary
|
||
├── App.xaml.cs
|
||
│
|
||
├── Views/
|
||
│ └── MainWindow.xaml # Main window (Grid + StackPanel layout)
|
||
│ └── MainWindow.xaml.cs # Code-behind (minimal – only TreeView event)
|
||
│
|
||
├── ViewModels/
|
||
│ └── MainViewModel.cs # Root VM: navigation, callouts, props, commands
|
||
│ └── NavGroupNode.cs # Tree group node VM
|
||
│ └── NavLeafNode.cs # Tree leaf node VM
|
||
│ └── InspectionCalloutVM.cs # Overlay callout card VM
|
||
│ └── CalloutRowVM.cs # Single callout data row VM
|
||
│ └── RelayCommand.cs # ICommand implementation
|
||
│
|
||
├── Models/
|
||
│ └── FeatureProperties.cs # Bindable domain model for right panel
|
||
│
|
||
└── Assets/
|
||
└── Icons/ # 28×28 toolbar icon PNGs
|
||
|
||
```
|
||
|
||
|
||
### XplorePlane.Hardware(硬件库)
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
### XplorePlane.ImageProcessing (图像库)
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
### 日志系统
|
||
|
||
项目已集成 Serilog 日志框架,提供统一的日志服务:
|
||
|
||
- **日志框架**: Serilog 4.3.1
|
||
- **日志输出**: 控制台、文件(按天滚动)、调试输出
|
||
- **日志路径**: `logs/xploreplane-YYYYMMDD.log`
|
||
- **配置文件**: `App.config`
|
||
- **服务接口**: `ILoggerService`
|
||
|
||
**使用示例**:
|
||
|
||
```csharp
|
||
public class MyService
|
||
{
|
||
private readonly ILoggerService _logger;
|
||
|
||
public MyService(ILoggerService logger)
|
||
{
|
||
// 使用泛型自动推断模块名
|
||
_logger = logger?.ForModule<MyService>() ?? throw new ArgumentNullException(nameof(logger));
|
||
}
|
||
|
||
public void DoSomething()
|
||
{
|
||
_logger.Info("执行操作");
|
||
_logger.Debug("调试信息:参数={Value}", someValue);
|
||
}
|
||
}
|
||
```
|
||
|
||
详细使用指南请参考:`Doc/Logging.README.md`
|
||
|
||
### TO-DO List
|
||
|
||
- [x] 软件基于 WPF + Prism 基础的框架
|
||
- [x] 日志库的引用
|
||
- [ ] 界面的布局
|
||
- [ ] 打通与硬件层的调用流程
|
||
- [ ] 打通与图像层的调用流程
|