From 3179fca11228b2ac681515ecd4f784ab133db478 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 6 May 2026 15:30:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9fo-dicom=20=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Progranm.cs | 4 +++- .../_ServiceExtensions/DicomSetup.cs | 20 +++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.API/Progranm.cs b/IRaCIS.Core.API/Progranm.cs index 362f88c60..0ff83fb8f 100644 --- a/IRaCIS.Core.API/Progranm.cs +++ b/IRaCIS.Core.API/Progranm.cs @@ -1,4 +1,5 @@ -using IRaCIS.Core.API; +using FellowOakDicom; +using IRaCIS.Core.API; using IRaCIS.Core.API.HostService; using IRaCIS.Core.Application.BusinessFilter; using IRaCIS.Core.Application.BusinessFilter.LegacyController.Database.Api; @@ -178,6 +179,7 @@ var env = app.Environment; #region 配置中间件 +DicomSetupBuilder.UseServiceProvider(app.Services); app.UseMiddleware(); diff --git a/IRaCIS.Core.API/_ServiceExtensions/DicomSetup.cs b/IRaCIS.Core.API/_ServiceExtensions/DicomSetup.cs index c32dbd4c6..1039fa735 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/DicomSetup.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/DicomSetup.cs @@ -8,13 +8,21 @@ namespace IRaCIS.Core.API { public static void AddDicomSetup(this IServiceCollection services) { + + // ⭐ 先做全局 DICOM 配置 new DicomSetupBuilder() - .RegisterServices(s => s.AddFellowOakDicom() - .AddTranscoderManager() - .AddImageManager() - ) - .SkipValidation() - .Build(); + .SkipValidation() // 👈 在这里设置 + .Build(); + + services.AddFellowOakDicom().AddTranscoderManager().AddImageManager(); + + // new DicomSetupBuilder() + // .RegisterServices(s => s.AddFellowOakDicom() + //.AddTranscoderManager() + // .AddImageManager() + // ) + // .SkipValidation() + // .Build(); } } }