2011-05-18 52 views
1

我調用以下函數將ClearCanvas庫呈現的圖像設置爲圖片框。但是它給出了一個錯誤 * 無法加載bilinearinterpolation.dll指定模塊找不到 *clearcanvas庫c#

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


    } 

回答

2

我解決了這個問題。我做了什麼

  1. 複製BilinearInterpolation.dll(在ClearCanvas \ ReferencedAssemblies \內插器目錄中找到)
  2. 粘貼在你的.exe文件放置在同一文件夾中的DLL。

哇。有效。它會很好地爲你工作。