Object/Memory Management of DicomImage and DicomDataSet

The following diagram shows the relationship between DicomImage and DicomDataSet objects.

DicomImage object

DicomImage contains DicomDataSet which holds the pixel data.

DicomImage.Dispose() method does not need to be called explicitly as it will get cleaned up eventually via a finaliser when called from the Garbage Collector.

The following objects are cleared when DicomImage object is disposed:

Ultrasound Region Spacing Calibration

This article will show you how to create an Ultrasound image from imported pixel data.
DICOM Ultrasound images contain multiple regions specifying the different parts to the generated image. Each of these regions has it's own pixel geometry and each region can take priority over another if they overlap. See C.8.5.5 US Region Calibration Module for details.

DicomObjects 3D General

Medical Connections Ltd recently released COM and .NET versions of DicomObjects which incorporate 3D functionality:

  • MPR: Multi-planar reformatting
  • MIP: Maximum Intensity Projection
  • VR: Volume Rendering


The two versions are generally very similar, but have slight differences in the API to reflect the different underlying technologies. Select one of the links below to find more

Upgrading to DicomObjects v8

As a result of feedback from users, we've fixed a few bugs and improved resilience, but there are also a few breaking API changes in the 3D code:


We have removed Bouncy Castle.

Why we have removed Bouncy Castle etc. from DicomObjects.NET

Encryption in DICOM is important – and it’s going to become more important as hacking continues, which is why it needs to be done properly.

Specifying outgoing IP when making a DICOM connection

      using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
                var localEP = new IPEndPoint(IPAddress.Parse("outgoingIP"), 0);  0 means any available port
                var remoteEP = new IPEndPoint(IPAddress.Parse("remoteIP"), remotePort);
                NetworkStream ns = new NetworkStream(socket, true);                

Setting TransferFunction in 3D

Sample code for general purpose colour/opacity adjustment. This might not be sensible values because this is intended purely for demonstration purposes only!

C# code snippet:

Video support with FFmpeg

Starting with version 8 of DicomObjects, we have added support for video handling with the help of FFmpeg, a well established multimedia software (https://en.wikipedia.org/wiki/FFmpeg), which handles all sorts of popular video formats. This allows importing of supported video formats, embedding them into DICOM and exporting them using the appropriate transfer syntax and vice versa.

Simplifying 3D coordinate geometry in v7

All 3D calculations in DicomObjects are almost entirely in “real world” coordinated (patient X,Y,Z in mm). We have implemented a few dedicated methods to help you manipulate your 3D object or the ones that are displayed. A newly added method is DicomImage.ImagePlane() which returns an Image's plane in Plane3D form that can be used for other calculation (in real world units again), say the intersection of two Image planes, or to offset one of them by the slab thickness and to calculate that intersection, etc.

Implementing DICOM Composite Instance Retrieve Without Bulk Data

DICOM Composite Instance Retrieve Without Bulk Data is supported by DicomObjects and it's not difficult to implment.

Client Side:

The following code demonstrates how to retrieve individual instances without bulk data:


Subscribe to RSS - .NET