1

I call the following function to set an image rendered by ClearCanvas library to a picture box. But it gives an error *Unable to load bilinearinterpolation.dll the specified module could not be found *

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


    }
CharlesB
  • 86,532
  • 28
  • 194
  • 218
y_zyx
  • 582
  • 4
  • 10
  • 28

1 Answers1

3

I solved the problem. What I have done

  1. Copy the BilinearInterpolation.dll (found at ClearCanvas\ReferencedAssemblies\Interpolators directory)
  2. Paste the dll in the same folder where your .exe is placed.

Wow. It worked. It will work for you well.

y_zyx
  • 582
  • 4
  • 10
  • 28