29 lines
937 B
C#
29 lines
937 B
C#
using FellowOakDicom;
|
|
using FellowOakDicom.Imaging;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace IRaCIS.Core.API
|
|
{
|
|
public static class DicomSetup
|
|
{
|
|
public static void AddDicomSetup(this IServiceCollection services)
|
|
{
|
|
|
|
// ⭐ 先做全局 DICOM 配置
|
|
new DicomSetupBuilder()
|
|
.SkipValidation() // 👈 在这里设置
|
|
.Build();
|
|
|
|
services.AddFellowOakDicom().AddTranscoderManager<FellowOakDicom.Imaging.NativeCodec.NativeTranscoderManager>().AddImageManager<ImageSharpImageManager>();
|
|
|
|
// new DicomSetupBuilder()
|
|
// .RegisterServices(s => s.AddFellowOakDicom()
|
|
//.AddTranscoderManager<FellowOakDicom.Imaging.NativeCodec.NativeTranscoderManager>()
|
|
// .AddImageManager<ImageSharpImageManager>()
|
|
// )
|
|
// .SkipValidation()
|
|
// .Build();
|
|
}
|
|
}
|
|
}
|