有个人发布了一个代码,以使用 ClearCanvas 库在 C# 中加载和显示 DICOM 图像。但是,我尝试运行代码并且收到错误并且缺少库 dll 组件。我想知道个人从哪里获得的库dll文件ClearCanvas.Dicom.ImageViewwer.StudyManagement。我一直无法在互联网上找到该文件。代码显示在错误之后。我很感激谢谢。
用途:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ClearCanvas.Common;
using ClearCanvas.Dicom;
using System.Windows.Media.Imaging;
using ClearCanvas.ImageViewer;
using ClearCanvas.ImageViewer.StudyManagement;
using System.Windows.Interop;
using System.Windows.Media;
这是身体:
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "DICOM Files(*.*)|*.*";
if (ofd.ShowDialog() == DialogResult.OK)
{
if (ofd.FileName.Length > 0)
{
var imagen = new DicomFile(ofd.FileName);
LocalSopDataSource DatosImagen = new LocalSopDataSource(ofd.FileName);
ImageSop imageSop = new ImageSop(DatosImagen);
IPresentationImage imagen_a_mostrar = PresentationImageFactory.Create(imageSop.Frames[1]);
int width = imageSop.Frames[1].Columns;
int height = imageSop.Frames[1].Rows;
Bitmap bmp = imagen_a_mostrar.DrawToBitmap(pictureBox1.Width, pictureBox1.Height);
pictureBox1.Image = bmp;
imageOpened = true;
}
ofd.Dispose();
}
}