Skip to content

raysearchlabs/fo-dicom

 
 

Repository files navigation

Fellow Oak DICOM for Windows Store and Windows Phone 8 apps

Last updated August 25, 2013.

Copyright (c) 2012-2013 Colby Dillion, adaptations to Windows Store and Windows Phone 8 (c) 2012-2013 Anders Gustafsson, Cureos AB

This is a fork of Colby Dillion's fo-dicom toolkit, aimed at Windows Store and Windows Phone 8 applications. This repository provides libraries with prefixes Store and Phone, targetting Windows Store and Windows Phone, respectively.

To sufficiently use the library in a Windows Store application, consider enabling the following capabilities and declarations in the application manifest file:

  • Documents Library capability
  • Internet (Client & Server) capability
  • Private Networks (Client & Server) capability
  • Removable Storage capability
  • File Type Associations declaration e.g. for files with extensions .dcm and .dic

At this stage, the Store.DICOM and Phone.DICOM class libraries expose the same API as the regular .NET Framework fo-dicom class library. Store.DICOM and Phone.DICOM currently do not publicly expose Windows Runtime API asynchronous methods for file and network I/O etc.

The libraries have dependencies to native (C/C++) codec classes and therefore have to be built separately for each platform. Supported platforms are x86, x64 (only Windows Store) and ARM.

Compared to the regular fo-dicom class library, Store.DICOM and Phone.DICOM exhibit the following known limitations:

  • Only Secure Sockets Layer (SSL) client is supported, SSL server functionality is not enabled.
  • Database query transforms are not supported, i.e. it is not possible to update a DICOM dataset based on a database query.

Issues directly related to using fo-dicom in Windows Store or Windows Phone 8 applications can be reported here. General fo-dicom issues should be reported to the parent repository Issues page.

Fellow Oak DICOM for .NET

Please join the Google group for updates and support. Binaries are available from GitHub and NuGet.

Features

  • High-performance, fully asynchronous, .NET 4.0 API
  • JPEG (including lossless), JPEG-LS, JPEG2000, and RLE image compression
  • Supports very large datasets with content loading on demand
  • Image rendering

Notes

  • Support for compressed images requires the Visual Studio 2010 SP1 Redistributable Package to be installed. (x86 or x64)

Examples

File Operations

var file = DicomFile.Open(@"test.dcm");

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

file.Dataset.Add(DicomTag.PatientsName, "DOE^JOHN");

// creates a new instance of DicomFile
file = file.ChangeTransferSyntax(DicomTransferSyntax.JPEGProcess14SV1);

file.Save(@"output.dcm");

Render Image to JPEG

var image = new DicomImage(@"test.dcm");
image.RenderImage().Save(@"test.jpg");

C-Store SCU

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

C-Echo SCU/SCP

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

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

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();
client.AddRequest(cfind);
client.Send("127.0.0.1", 104, false, "SCU-AE", "SCP-AE");

C-Move SCU

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

var client = new DicomClient();
client.AddRequest(cmove);
client.Send("127.0.0.1", 104, false, "SCU-AE", "SCP-AE");

Contributors

License

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

Packages

No packages published

Languages

  • C 49.6%
  • C# 44.4%
  • C++ 6.0%