clearcanvas library c#

时间:2011-05-18 14:50:02

标签: c# image-processing dicom clearcanvas

我调用以下函数将ClearCanvas库呈现的图像设置为图片框。但它给出了一个错误 * 无法加载bilinearinterpolation.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);
        }


    }

1 个答案:

答案 0 :(得分:2)

我解决了这个问题。我做了什么

  1. 复制 BilinearInterpolation.dll (在ClearCanvas \ ReferencedAssemblies \ Interpolators目录中找到)
  2. 将dll粘贴到放置.exe的同一文件夹中。
  3. 哇。有效。它对你很有用。