首页 > 解决方案 > 无法在 .net 核心项目中访问 JsonDicomConverter

问题描述

我正在尝试使用fo-Dicom从JSON格式的Dicom文件中提取数据,但目前遇到此错误:

找不到类型或命名空间名称“JsonDicomConverter”(您是否缺少 using 指令或程序集引用?)

我在用:

string json = JsonConvert.SerializeObject(dataset, new JsonDicomConverter());

我正在使用的所有头文件

using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System.Diagnostics;
using System.Net;
using System.Reflection;
using System.Text;
using Dicom;
using Dicom.Imaging;
using Dicom.IO.Buffer;

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

using Xunit;
using Xunit.Abstractions;

为什么它仍然说我缺少参考?JsonDicomConverter 不在 Dicom 库中还是我做错了什么?我是 fo-Dicom 和 dotnet 的新手。

标签: c#asp.net-core.net-coredicomfo-dicom

解决方案


我必须使用 nuget 包管理器安装一个 fo-dicom.json 库,现在它可以工作了。


推荐阅读