图像处理 - ClearCanvas 库 C#
本文关键字:ClearCanvas 图像处理 | 更新日期: 2023-09-27 17:56:43
我调用以下函数将 ClearCanvas 库呈现的图像设置为图片框。但它给出了一个错误*无法加载双线性插值.dll找不到指定的模块 *
//// Code
void OpenFile()
{
try
{
LocalSopDataSource dataSource = new LocalSopDataSource(fileName);
ImageSop imageSop = new ImageSop(dataSource);
//IPresentationImage presentationImage =
// PresentationImageFactory.Create(imageSop);
IPresentationImage theOne = null;
foreach (IPresentationImage image in PresentationImageFactory.Create(imageSop))
{
theOne = image;
}
Bitmap bmp = new Bitmap(500, 500);
theOne.DrawToBitmap(bmp);
pictureBox1.Image = bmp;
}
catch (Exception e2)
{
MessageBox.Show(e2.Message);
}
}
我解决了这个问题。我做了什么
- 复制双线性插值.dll(可在 ClearCanvas''ReferencedAssemblies''Interpolators 目录中找到)
- 将 dll 粘贴到放置.exe的同一文件夹中。
哇。成功了。它会很好地为您工作。