SharpDicom.Codecs 2.0.0

dotnet add package SharpDicom.Codecs --version 2.0.0
                    
NuGet\Install-Package SharpDicom.Codecs -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharpDicom.Codecs" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpDicom.Codecs" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SharpDicom.Codecs" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SharpDicom.Codecs --version 2.0.0
                    
#r "nuget: SharpDicom.Codecs, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SharpDicom.Codecs@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SharpDicom.Codecs&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SharpDicom.Codecs&version=2.0.0
                    
Install as a Cake Tool

SharpDicom.Codecs

High-performance native codec wrappers for SharpDicom supporting JPEG, JPEG 2000, and JPEG-LS compression.

Installation

Install the meta package, which automatically pulls in the correct runtime package for your platform:

dotnet add package SharpDicom.Codecs

Supported Platforms

Platform Runtime Identifier Package
Windows x64 win-x64 SharpDicom.Codecs.runtime.win-x64
Windows ARM64 win-arm64 SharpDicom.Codecs.runtime.win-arm64
Linux x64 linux-x64 SharpDicom.Codecs.runtime.linux-x64
Linux ARM64 linux-arm64 SharpDicom.Codecs.runtime.linux-arm64
macOS x64 (Intel) osx-x64 SharpDicom.Codecs.runtime.osx-x64
macOS ARM64 (Apple Silicon) osx-arm64 SharpDicom.Codecs.runtime.osx-arm64

Bundled Libraries

This package contains pre-built binaries from the following open-source projects:

libjpeg-turbo 3.0.4

  • Description: JPEG image codec with SIMD optimizations (2-6x faster than libjpeg)
  • License: BSD-3-Clause, IJG, Zlib (see THIRD_PARTY_LICENSES.txt)
  • Website: https://libjpeg-turbo.org/
  • Used for: JPEG baseline and extended transfer syntaxes

OpenJPEG 2.5.3

  • Description: Open-source JPEG 2000 codec
  • License: BSD-2-Clause (see THIRD_PARTY_LICENSES.txt)
  • Website: https://www.openjpeg.org/
  • Used for: JPEG 2000 lossless and lossy transfer syntaxes

CharLS 2.4.2

  • Description: JPEG-LS codec optimized for medical imaging
  • License: BSD-3-Clause (see THIRD_PARTY_LICENSES.txt)
  • Website: https://github.com/team-charls/charls
  • Used for: JPEG-LS lossless and near-lossless transfer syntaxes

Usage

The codecs are automatically registered when you reference SharpDicom.Codecs:

using SharpDicom.Codecs.Native;

// Register native codecs with the SharpDicom codec registry
NativeCodecs.RegisterAll();

// Now decompress/compress DICOM files with supported transfer syntaxes
var file = DicomFile.Open("compressed.dcm");
var pixelData = file.Dataset.GetPixelData();
byte[] decompressed = pixelData.Decompress();

Performance

Native codecs provide significant performance improvements over pure C# implementations:

Codec Speedup vs Pure C# Notes
JPEG 3-5x SIMD optimized (AVX2, NEON)
JPEG 2000 2-4x Multi-threaded decode
JPEG-LS 2-3x Optimized for medical images

Requirements

  • .NET Standard 2.0+ / .NET 6.0+ / .NET 8.0+
  • No system dependencies (statically linked)
  • AOT/Trimming compatible

License

The SharpDicom.Codecs package is licensed under GPL-3.0-or-later.

The bundled native libraries have their own licenses (all permissive BSD-style). See THIRD_PARTY_LICENSES.txt for complete license texts.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 89 2/3/2026