A C# DICOM Library
Pull request Compare This branch is 83 commits ahead, 32 commits behind rexcardan:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Portable Evil DICOM

NuGet NuGet

Copyright (c) 2011-2015 Rex Cardan. Portable Class Library adaptation (c) 2012-2015 Anders Gustafsson, Cureos AB.

A simple to use C# library for reading and manipulating DICOM files. Github is just the distro.

This project is a Portable Class Library adapted fork of Rex Cardan's original Evil DICOM library. For general information, online API and Getting Started tutorials, see here.

The following links will help you get started:

Project website at http://rexcardan.com/evildicom

Content Link
Introductory Video https://www.youtube.com/watch?v=rmYpxxqQ90s
Examples http://rexcardan.com/evildicom
Online API http://www.rexcardan.com/api/evildicom/index.html


The EvilDicom.Core Visual Studio solution contains a Portable Class Library project and a unit test project. The PCL library EvilDICOM.Core supports the following targets:

  • .NET Framework version 4 and higher
  • Windows 8 and higher (f.k.a. Metro)
  • Silverlight version 5 and higher
  • Windows Phone (Silverlight) version 8 and higher
  • Windows Phone 8.1 and higher
  • Xamarin.Android
  • Xamarin.iOS Classic and Unified APIs

Public API Differences

To meet the requirements of a Portable Class Library project, the PCL library public API differs from Rex Cardan's original .NET library as follows:

  • DICOMBinaryReader and DICOMBinaryWriter constructors, DICOMFileReader.Read, DICOMFileReader.ReadFileMetadata, DICOMFileWriter.WriteLittleEndian, DICOMObject.Open, DICOMObject.SaveAs, DoseMatrix.Load and DoseMatrix.Save methods takes a Stream argument instead of a file path string.
  • ConsoleLogger is excluded

PCL example usage

Read a DICOM file with the name path:

var dcm = DICOMFileReader.Read(File.OpenRead(path));            // .NET and (Windows Phone) Silverlight applications

Write DICOM object dcm to a file with the name path:

DICOMFileWriter.WriteLittleEndian(File.OpenWrite(path), dcm);   // .NET and (Windows Phone) Silverlight applications