

In addition to the byte ordering and VR encoding, the type of compression (or lack of) is also required to encode DICOM data (can be 'uncompressed', lossy' or 'lossless'). In the explicit encoding, the data type of the DICOM attributes in explicitly specified whereas this is left out in implicit encoding leaving the attribute to understood purely using the DICOM tag number that is specified. Another aspect of the transfer syntax is the type of VR encoding utilized ('implicit' or 'explicit'). Big-Endian, also known as the “Motorola” format” or “Mac OS format”, refers to a type of encoding where the most-significant byte appears first and remaining bytes follow in descending order of significance. Little Endian, also known as the “Intel” or “MS Windows OS” format, refers to a type of encoding where the least-significant byte appears first and the higher order bytes follow in ascending order of significance. There are two types of byte ordering namely, Little Endian and Big Endian. In my previous tutorial that covered the contents of a DICOM file, I briefly touched on what a transfer syntax is and the role it plays in ensuring that any two devices running on completely different operating systems can still exchange DICOM information with one another by negotiating the VR encoding, byte ordering and the compression mechanisms used for encoding/decoding the DICOM file. Let us proceed to look at how to implement this functionality when required, but let us understand or review a few more DICOM terms first. However, this approach is sometimes necessary when a clinic for instance doesn’t have a DICOM-compliant modality or when you have plain film, text reports, or when you want to take screenshots and need to store them in your PACS server. This operation is generally to avoided as much as possible since there is greater risk of encoding both image pixel data as well as associating with other non-image data for the image. This is referred to as "Secondary Image Capture" operation in DICOM. In this tutorial, I will illustrate how to create a DICOM file from scratch using a simple JPEG image that you already have. This tutorial also assumes that you know the basics of Java or any equivalent object-oriented language such as C# or C++. As this tutorial requires some understanding of the structure of the DICOM file, please also have a look at my other tutorial titled “DICOM Basics using Java - Making Sense of the DICOM File”. Before we get started on this tutorial, have a quick look at my earlier article titled “Introduction to the DICOM Standard” for a short and quick introduction to the standard. This is part of my series of articles on the DICOM standard. Creating a DICOM file from a Non-DICOM Image.The PixelMed Java DICOM Toolkit - Quick Overview.DICOM Basics using Java - Creating a DICOM File Contents
