0

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

2 に答える 2

0

私は実際にコードを投稿しました..

これらは、私のプロジェクトで使用した DLL です。

クリアキャンバス:

ClearCanvas.Common.dll
ClearCanvas.Desktop.dll
ClearCanvas.Dicom.dll
ClearCanvas.ImageViewer.Common.dll
ClearCanvas.ImageViewer.dll
ClearCanvas.Utilities.Manifest.dll

画像を表示しようとしたときにエラーが発生したため、他のものも追加しました..

log4net.dll
nunit.framework.dll
WindowsBase.dll
BilinearInterpolation.dll --> For this one make sure you add either the 32 or 64 bits dll depending on what's your project defaults.
于 2013-07-19T19:30:44.267 に答える