Skip to content

imanabu/fo-dicom

This branch is 2427 commits behind fo-dicom/fo-dicom:master.

Folders and files

NameName
Last commit message
Last commit date
Feb 25, 2015
Feb 25, 2015
May 15, 2015
May 21, 2015
May 23, 2015
Mar 8, 2015
Feb 25, 2015
Feb 20, 2014
Sep 28, 2012
Dec 19, 2012
Mar 8, 2015
Jul 16, 2014
Nov 5, 2012
May 20, 2015
Jun 22, 2012
May 20, 2015
Mar 8, 2015
Jun 20, 2014
Jun 20, 2014

Repository files navigation

Fellow Oak DICOM for .NET

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

Binaries are available from 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 60.8%
  • C# 35.2%
  • C++ 4.0%