All Projects → fo-dicom → Fo Dicom

fo-dicom / Fo Dicom

Licence: other
Fellow Oak DICOM for .NET, .NET Core, Universal Windows, Android, iOS, Mono and Unity

Projects that are alternatives of or similar to Fo Dicom

Mathparser.org Mxparser
Math Parser Java Android C# .NET/MONO (.NET Framework, .NET Core, .NET Standard, .NET PCL, Xamarin.Android, Xamarin.iOS) CLS Library - a super easy, rich and flexible mathematical expression parser (expression evaluator, expression provided as plain text / strings) for JAVA and C#. Main features: rich built-in library of operators, constants, math functions, user defined: arguments, functions, recursive functions and general recursion (direct / indirect). Additionally parser provides grammar and internal syntax checking.
Stars: ✭ 624 (-7.42%)
Mutual labels:  pcl, mono, xamarin-android, xamarin-ios
Litenetlib
Lite reliable UDP library for Mono and .NET
Stars: ✭ 2,179 (+223.29%)
Mutual labels:  unity-3d, mono, dot-net
32feet
Personal Area Networking for .NET
Stars: ✭ 395 (-41.39%)
Mutual labels:  nuget, xamarin-android, xamarin-ios
AlizaMS
DICOM Viewer
Stars: ✭ 144 (-78.64%)
Mutual labels:  dicom, medical, medical-imaging
Starviewer
Starviewer, a cross-platform open source medical imaging software
Stars: ✭ 83 (-87.69%)
Mutual labels:  dicom, medical-imaging, medical
Stripe
Typed .NET clients for stripe.com REST APIs
Stars: ✭ 193 (-71.36%)
Mutual labels:  pcl, netcore, mono
EntryCustomReturnPlugin
Xamarin.Forms Plugin to customize the Xamarin.Forms.Entry Keyboard Return Button
Stars: ✭ 81 (-87.98%)
Mutual labels:  nuget, xamarin-ios, xamarin-android
Dot-Net-Ecosystem
Welcome to the GitHub repository of the .NET Ecosystem. This repository contains the examples for the Pluralsight course: The .NET Ecosystem: The Big Picture. You can download a copy and follow along in the course.
Stars: ✭ 34 (-94.96%)
Mutual labels:  mono, xamarin-ios, xamarin-android
VersionTrackingPlugin
Version Tracking Plugin for Xamarin and Windows
Stars: ✭ 62 (-90.8%)
Mutual labels:  nuget, xamarin-ios, xamarin-android
clara-dicom-adapter
DICOM Adapter is a component of the Clara Deploy SDK which facilitates integration with DICOM compliant systems, enables ingestion of imaging data, helps triggering of jobs with configurable rules and offers pushing the output of jobs to PACS systems.
Stars: ✭ 31 (-95.4%)
Mutual labels:  dicom, medical, medical-imaging
XamarinClipboardPlugin
Cross Platform Clipboard access for Xamarin
Stars: ✭ 24 (-96.44%)
Mutual labels:  pcl, xamarin-ios, xamarin-android
Megaapiclient
MegaApiClient is a C# .Net library to access http://mega.co.nz / http://mega.nz cloud storage and file hosting service.
Stars: ✭ 151 (-77.6%)
Mutual labels:  nuget, netcore, mono
Plugin.audiorecorder
Audio Recorder plugin for Xamarin and Windows
Stars: ✭ 140 (-79.23%)
Mutual labels:  nuget, xamarin-android, xamarin-ios
Connectivityplugin
Connectivity Plugin for Xamarin and Windows
Stars: ✭ 253 (-62.46%)
Mutual labels:  pcl, xamarin-android, xamarin-ios
Zipstorer
A Pure C# Class to Store Files in Zip
Stars: ✭ 139 (-79.38%)
Mutual labels:  nuget, netcore, mono
Portable-WebDAV-Library
Moved to codeberg.org - https://codeberg.org/DecaTec/Portable-WebDAV-Library - The Portable WebDAV Library is a strongly typed, async WebDAV client library which is fully compliant to RFC 4918, RFC 4331 and "Additional WebDAV Collection Properties". It is implemented as .NETStandard 1.1 library in oder to be used on any platform supporting .NETS…
Stars: ✭ 45 (-93.32%)
Mutual labels:  portable, mono, netcore
Opengl.net
Modern OpenGL bindings for C#.
Stars: ✭ 473 (-29.82%)
Mutual labels:  nuget, mono, xamarin-android
Dicom
⚡High Performance DICOM Medical Image Parser in Go.
Stars: ✭ 643 (-4.6%)
Mutual labels:  dicom, medical-imaging, medical
Dcm2niix
dcm2nii DICOM to NIfTI converter: compiled versions available from NITRC
Stars: ✭ 364 (-45.99%)
Mutual labels:  jpeg, dicom
Mitk
The Medical Imaging Interaction Toolkit.
Stars: ✭ 360 (-46.59%)
Mutual labels:  dicom, medical-imaging
fo-dicom logo

Fellow Oak DICOM

NuGet build development Join the chat at https://gitter.im/fo-dicom/fo-dicom

Support Us!

If fo-dicom is a vital component in your open-source or commercial application and/or you want to contribute to its continued success, please consider making a small monetary contribution.

€25 €100 €500

License

This library is licensed under the Microsoft Public License (MS-PL). See License.txt for more information.

Features

  • Portable Class Library (PCL)
  • Targets .NET 4.5 and higher, .NET Core (.NET Standard 1.3 and higher), Universal Windows Platform, Xamarin iOS, Xamarin Android, Mono and Unity
  • DICOM dictionary version 2018b
  • 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 support
  • XML export
  • Anonymization

Installation

Easiest is to obtain fo-dicom binaries from NuGet. This package reference the core fo-dicom assemblies for all Microsoft and Xamarin platforms.

NuGet Packages

Valid for version 3.1.0 (incl. pre-releases) and later

Package Description
fo-dicom Dependencies package including core libraries for Microsoft and Xamarin platforms
fo-dicom.Portable Core library for PCL Profile 111
fo-dicom.Desktop Core library and native codec libraries for .NET 4.5.2 and higher
fo-dicom.NetCore Core library for .NET Core applications, Level 1.3 and higher
fo-dicom.Universal Core library and native codec libraries for Universal Windows Platform
fo-dicom.Android Core library for Xamarin Android
fo-dicom.iOS Core library for Xamarin iOS (Unified)
fo-dicom.Mono Core library for Mono 4.5 and higher
fo-dicom.log4net .NET connector to enable fo-dicom logging with log4net
fo-dicom.MetroLog PCL Profile 111 connector to enable fo-dicom logging with MetroLog
fo-dicom.NLog .NET connector to enable fo-dicom logging with NLog
fo-dicom.Serilog .NET connector to enable fo-dicom logging with Serilog
fo-dicom.Json PCL profile 111 library for JSON I/O support
fo-dicom.Drawing .NET Core library providing System.Drawing based image rendering and printing
fo-dicom.ImageSharp .NET Standard library providing SixLabors.ImageSharp based image rendering

API Documentation

The API documentation for the core library (represented by fo-dicom.Desktop) and the log4net, NLog and Serilog connectors is available here.

Usage Notes

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);

Logging configuration

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.

Cross-platform development

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.

Sample applications

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.

Examples

File Operations

var file = DicomFile.Open(@"test.dcm");             // Alt 1
var file = await DicomFile.OpenAsync(@"test.dcm");  // Alt 2

var patientid = file.Dataset.Get<string>(DicomTag.PatientID);

file.Dataset.AddOrUpdate(DicomTag.PatientName, "DOE^JOHN");

// creates a new instance of DicomFile
var newFile = file.Clone(DicomTransferSyntax.JPEGProcess14SV1);

file.Save(@"output.dcm");             // Alt 1
await file.SaveAsync(@"output.dcm");  // Alt 2

Render Image to JPEG

var image = new DicomImage(@"test.dcm");
image.RenderImage().AsBitmap().Save(@"test.jpg");                     // Windows Forms
image.RenderImage().AsUIImage().AsJPEG().Save(@"test.jpg", true);     // iOS

C-Store SCU

var client = new DicomClient("127.0.0.1", 12345, false, "SCU", "ANY-SCP");
await client.AddRequestAsync(new DicomCStoreRequest(@"test.dcm"));
await client.SendAsync();

C-Echo SCU/SCP

var server = new DicomServer<DicomCEchoProvider>(12345);

var client = new DicomClient("127.0.0.1", 12345, false, "SCU", "ANY-SCP");
client.NegotiateAsyncOps();
for (int i = 0; i < 10; i++)
    await client.AddRequestAsync(new DicomCEchoRequest());
await client.SendAsync();

C-Find SCU

var cfind = DicomCFindRequest.CreateStudyQuery(patientId: "12345");
cfind.OnResponseReceived = (DicomCFindRequest rq, DicomCFindResponse rp) => {
	Console.WriteLine("Study UID: {0}", rp.Dataset.Get<string>(DicomTag.StudyInstanceUID));
};

var client = new DicomClient("127.0.0.1", 11112, false, "SCU-AE", "SCP-AE");
await client.AddRequestAsync(cfind);
await client.SendAsync();

C-Move SCU

var cmove = new DicomCMoveRequest("DEST-AE", studyInstanceUid);

var client = new DicomClient("127.0.0.1", 11112, false, "SCU-AE", "SCP-AE");
await client.AddRequestAsync(cmove);
await client.SendAsync(); 

N-Action SCU

// It is better to increase 'associationLingerTimeoutInMs' default is 50 ms, which may not be
// be sufficient
var dicomClient = new Dicom.Network.Client.DicomClient("127.0.0.1", 12345, false, "SCU-AE", "SCP-AE",
DicomClientDefaults.DefaultAssociationRequestTimeoutInMs, DicomClientDefaults.DefaultAssociationReleaseTimeoutInMs,5000);
var txnUid = DicomUIDGenerator.GenerateDerivedFromUUID().UID;
var nActionDicomDataSet = new DicomDataset
{
    { DicomTag.TransactionUID,  txnUid }
};
var dicomRefSopSequence = new DicomSequence(DicomTag.ReferencedSOPSequence);
var seqItem = new DicomDataset()
{
    { DicomTag.ReferencedSOPClassUID, "1.2.840.10008.5.1.4.1.1.1" },
    { DicomTag.ReferencedSOPInstanceUID, "1.3.46.670589.30.2273540226.4.54" }
};
dicomRefSopSequence.Items.Add(seqItem);
nActionDicomDataSet.Add(dicomRefSopSequence);
var nActionRequest = new DicomNActionRequest(DicomUID.StorageCommitmentPushModelSOPClass,
                DicomUID.StorageCommitmentPushModelSOPInstance, 1)
{
    Dataset = nActionDicomDataSet,
    OnResponseReceived = (DicomNActionRequest request, DicomNActionResponse response) => 
    {
        Console.WriteLine("NActionResponseHandler, response status:{0}", response.Status);
    },
};
await dicomClient.AddRequestAsync(nActionRequest);
dicomClient.OnNEventReportRequest = OnNEventReportRequest;
await dicomClient.SendAsync();

private static Task<DicomNEventReportResponse> OnNEventReportRequest(DicomNEventReportRequest request)
{
    var refSopSequence = request.Dataset.GetSequence(DicomTag.ReferencedSOPSequence);
    foreach(var item in refSopSequence.Items)
    {
        Console.WriteLine("SOP Class UID: {0}", item.GetString(DicomTag.ReferencedSOPClassUID));
        Console.WriteLine("SOP Instance UID: {0}", item.GetString(DicomTag.ReferencedSOPInstanceUID));
    }
    return Task.FromResult(new DicomNEventReportResponse(request, DicomStatus.Success));
}

New to DICOM?

If you are new to DICOM, then take a look at the DICOM tutorial of Saravanan Subramanian: https://saravanansubramanian.com/dicomtutorials/ The author is also using fo-dicom in some code samples.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].