fo-dicom API documentation
Fellow Oak DICOM, a DICOM toolkit in C# for .NET Framework, .NET Core, Universal Windows, Android, iOS, Mono and Unity.
Portable Class Library (PCL)
Targets .NET 4.5.2 and higher, .NET Core (.NET Standard 1.3 and higher), Universal Windows Platform, Xamarin iOS, Xamarin Android, Mono and Unity
DICOM dictionary version 2016e
High-performance, fully asynchronous async/await API
JPEG (including lossless), JPEG-LS, JPEG2000, and RLE image compression (limited on .NET Core, Xamarin, Mono and Unity platforms)
Supports very large datasets with content loading on demand
Platform-specific image rendering
JSON import and export
Easiest is to obtain fo-dicom binaries from NuGet. The fo-dicom package reference the core fo-dicom assemblies for all Microsoft and Xamarin platforms.
Dependencies package including core libraries for Microsoft and Xamarin platforms
Core library for PCL Profile 111
Core library and native codec libraries for .NET 4.5.2 and higher
Core library for .NET Core applications, .NET Standard 1.3 and higher
Core library and native codec libraries for Universal Windows Platform, UWP
Core library for Xamarin Android
Core library for Xamarin iOS (Unified)
.NET connector to enable fo-dicom logging with log4net
PCL Profile 111 connector to enable fo-dicom logging with MetroLog
.NET connector to enable fo-dicom logging with NLog
.NET connector to enable fo-dicom logging with Serilog
PCL profile 111 library for JSON I/O support
PCL profile 111 library with obsolete asynchronous methods (to be deprecated in 4.0)
Image rendering configuration
Out-of-the-box, fo-dicom for .NET defaults to Windows Forms-style image rendering. To switch to WPF-style image rendering, call: ImageManager.SetImplementation(WPFImageManager.Instance);
By default, logging defaults to the no-op NullLogerManager. On .NET, several log managers are available and can be enabled like this:
LogManager.SetImplementation(ConsoleLogManager.Instance); // or ...
LogManager.SetImplementation(NLogManager.Instance); // or ...
On Universal Windows Platform, Xamarin iOS, Xamarin Android and Mono there is only one operational log manager available, namely MetroLogManager.Instance.
To facilitate cross-platform development, the core library is strong name signed and denoted Dicom.Core.dll on all platforms. From an assembly reference point-of-view this convention makes the core assemblies mutually replaceable. It is thus possible to develop a Portable Class Library that depends on the PCL Dicom.Core assembly, and when the developed Portable Class Library is used in a platform-specific application, the PCL Dicom.Core assembly can be replaced with the platform-specific Dicom.Core assembly without needing to re-build anything. fo-dicom.Json and fo-dicom.MetroLog are examples of portable class libraries that depend on the PCL Dicom.Core.dll.
The assembly naming convention is often referred to as the bait-and-switch trick. The fo-dicom package supports the bait-and-switch trick by automatically selecting the best suited Dicom.Core assembly depending on the targeted platform of the development project upon download from NuGet.
Important notice for Universal Windows Platform applications
The fo-dicom class library is not fully Windows Runtime compatible, and therefore cannot be built with the .NET Native tool chain enabled in Universal Windows Platform applications. Typically, the Compile with .NET Native tool chain checkbox is checked in Release mode for UWP applications. To enable building the application in Release mode, uncheck this checkbox.
There are a number of simple sample applications that use fo-dicom available in separate repository here . These also include the samples that were previously included in the Examples sub-folder of the VS solutions.