c# - 无法在 .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 的新手。
解决方案
我必须使用 nuget 包管理器安装一个 fo-dicom.json 库,现在它可以工作了。
推荐阅读
- lua - Lua:在两个字符串之间查找字符串
- javascript - MUI Tab-组件属性到 Tab 渲染但抛出异常
- java - SQL 语句中的错误:NoClassDefFoundError: com/macasaet/fernet/Validator
- javascript - 使用 JavaScript 在栏外单击时如何关闭侧边栏
- perl - 在 Solaris 11 中安装 DBI Perl 模块时出现问题
- audio - Alexa是如何编程唱歌的?
- java - 如何从 recyclerview 创建音频前台通知。任何班级
- r - devtools::install_github 在 R4.0.03 中失败
- java - 使用 Java 将动态 XML 转换为 JSON
- node.js - 关于在 NodeJS 中构建微服务系统的意见。如何让他们通信、共享数据和向客户端公开 API