Copyright (c) 2011-2014 Rex Cardan, Portable Class Library adaptation (c) 2012-2014 Anders Gustafsson, Cureos AB
This project is a Portable Class Library adapted fork of Rex Cardan's original Evil DICOM library. For general information and tutorials, see here.
The EvilDicom.Core Visual Studio solution contains a Portable Class Library project, a .NET 4.5 project for the class that cannot be represented in PCL, and a unit test project. The PCL library EvilDICOM.Core supports the following targets:
- .NET Framework version 4.5 and higher
- Windows 8 and higher (f.k.a. Metro)
- Silverlight version 5 and higher
- Windows Phone (Silverlight) version 8 and higher
- Xamarin.Android
- Xamarin.iOS
To meet the requirements of a Portable Class Library project, the PCL library public API differs from Rex Cardan's original .NET 4 library as follows:
DICOMBinaryReader
andDICOMBinaryWriter
constructors,DICOMFileReader.Read
,DICOMFileReader.ReadFileMetadata
andDICOMFileWriter.WriteLittleEndian
methods takes aStream
argument instead of file pathstring
.DICOMNetworkBinaryReader
is excluded in the PCL library due to its dependency to theSocket
class. This class is instead incorporated in the .NET 4.5 class library EvilDICOM.Desktop.
Read a DICOM file with the name path
:
var dcm = DICOMFileReader.Read(File.OpenRead(path)); // .NET and Silverlight elevated trust applications
Write DICOM object dcm
to a file with the name path
:
DICOMFileWriter.WriteLittleEndian(File.OpenWrite(path), dcm); // .NET and Silverlight elevated trust applications