Thursday, February 09, 2012
Google Custom Search

ClearCanvas Highlights

Download our Open Source software
Watch some Videos
Get the Source
Check out our Licensing
Join our  Forums
Some Research: OICR IPP-Trials

Our Community

Membership Membership:
Latest New User Latest: VMCCNY
New Today New Today: 18
New Yesterday New Yesterday: 26
User Count Overall: 20581

People Online People Online:
Visitors Visitors: 18
Members Members: 5
Total Total: 23

Online Now Online Now:
01: ednfran
02: sfrank
03: rmk
04: munir24hr
05: demidias

ClearCanvas Community Forums

Unable to load BilinearInterpolation.dll when using DrawToBitmap
Last Post 2009-11-06 11:48 AM by stiank81. 11 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
hleinan
Basic Member
Basic Member
Posts:27

--
2009-10-30 09:32 AM  

I am reading a dicom file and want to display the image in the file, but are getting the following error: Unable to load BilinearInterpolation.dll, The specified module could not be loaded.

I am using the following code:

ImageSop sop = new ImageSop(new LocalSopDataSource("C:\\dicom.dcm"));
IPresentationImage image = PresentationImageFactory.Create(sop.Frames[1]);
Bitmap bmp = image.DrawToBitmap(800, 800);
bmp.Save("C:\\testDicom.bmp", System.Drawing.Imaging.ImageFormat.Bmp);

I tried adding the dll manually, but the following error appears:

ClearCanvas SDK\1.5\bin\plugins\BilinearInterpolation.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.

I am using VS 2008 and are creating a WPF C# application!

 

Thanks

Tags: error wpf
steve
Senior Member
Senior Member
Posts:1885

--
2009-10-30 02:26 PM  
This DLL is a native 32-bit dll. Are you running on a 64-bit os?
Real-time support available to Clinical Edition and Team Edition customers
hleinan
Basic Member
Basic Member
Posts:27

--
2009-11-02 02:47 AM  
Yes, I am running 64-bit Windows 7, so that explains it then!
hleinan
Basic Member
Basic Member
Posts:27

--
2009-11-02 04:45 AM  
Is it possible to build this dll for a 64 bit system?
hleinan
Basic Member
Basic Member
Posts:27

--
2009-11-02 05:07 AM  
I tried recompiling the BilinearInterpolation project and replaced the dll with this build's dll, but still the same error appears as described above!

Any ideas?
hleinan
Basic Member
Basic Member
Posts:27

--
2009-11-02 07:13 AM  
Now I did a test on the Win XP (32 bit) machine next to me with the binaries from the 1.5 download, and I am getting the same error as described above!

Any ideas?
steve
Senior Member
Senior Member
Posts:1885

--
2009-11-02 09:30 AM  

On the 64-bit DLL, technically, you could install the 64-bit workstation, and take the DLL from this installation, if you want one we've compiled.

Concerning your moving to a 32-bit system, did you have the VS2005 C++ Redistributable package installed on this system? Since this is a native DLL compiled with VS2005, you need this package installed. Our installer is supposed to install this automatically for you on a system.

Steve

Real-time support available to Clinical Edition and Team Edition customers
hleinan
Basic Member
Basic Member
Posts:27

--
2009-11-02 11:43 AM  
Thanks for the feedback and guidelines, Steve! I will give it a shot and see if the 64-bit dll from the 64 bit workstation works.

Thanks
hleinan
Basic Member
Basic Member
Posts:27

--
2009-11-03 02:56 AM  
I was able to use the 64 bit version of the .dll, but had to copy this dll manually to our project's Debug folder... All the other dll's that we have referenced in our application (ClearCanvas.Common.dll, ClearCanvas.Dicom.dll, ClearCanvas.ImageViewer.dll) gets copied to the Debug folder, but not BilinearInterpolation.dll.

But thanks for the support and guidelines!
stiank81
Advanced Member
Advanced Member
Posts:33

--
2009-11-03 04:34 AM  
What causes this problem anyway? Is the dependency from ImageViewer.dll to BilinearInterpolation.dll defined in some loose way such that visual studio doesn't understand that it needs to copy this too to the Debug folder? Is this something I should do myself, or should I expect it to be copied automagically to the Debug folder on compile?

Thanks.
stewart
Senior Member
Senior Member
Posts:2032

--
2009-11-03 01:54 PM  
Because the ImageViewer is a .NET assembly and the BilinearInterpolation.dll is an unmanaged C++ DLL, Visual Studio does not automatically recognize the dependency. As far as I know, you have to copy it to the Debug folder yourself.

Best regards,
Stewart
Real-time support available to Clinical Edition and Team Edition customers
stiank81
Advanced Member
Advanced Member
Posts:33

--
2009-11-06 11:48 AM  
Okay, thanks. Will integrate that into our build and bundle scripts then. Thanks for the assistance!

Best regards,
Stian
You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.