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();
}
}