Workshop day 1

From I Do Imaging
Jump to: navigation, search


Today we'll be looking at the image (pixel) and header content of medical image files. We'll look at the data stored within the files that relates to the patient, and also the technical details of the scan. Sample images will come from file downloads and from a PACS server.

Storing imaging applications and data

It is useful to have a single location for your image data, and can also be useful to have one place for your imaging programs - they are different than your 'normal' PC programs, and some of them do not have automatic installers.

One suitable location for imaging programs is C:\imaging. This location is equally accessible to all users. Most programs with an installer will allow you to specify the directory in which they are to be installed. Placing your imaging programs in C:\imaging keeps them all in one place.


Another good location for your imaging programs is a folder inside your home, or user, folder. If this were named imaging, the true or full path to this directory would be C:\Users\your-name\imaging. You can store an alias to this directory in the Favorites section of Windows explorer. Your image data can be stored in a subdirectory data under the imaging directory.

Install an imaging application

Remote workstation

The remote workstation already has the RadiAnt and Synedra View applications installed. These can open image files from disk and also download them from a PACS server.


Download and install RadiAnt. There are also many other DICOM-capable imaging applications listed on I Do Imaging.


Osirix has for many years been the top choice for DICOM imaging on the Mac, but the free version is restricted in some of its functionality. Horos is a new application built from the Osirix codebase and has a less restrictive license.

Download a sample data set

Download a zip file of DICOM data from the Sample Data page and unzip it into a known location. A good place would be the data folder you created, above. The zipped image sets are available in two formats: those named 'lee' are in Little Endian Explicit format (or Transfer Syntax, in DICOM terminology) and those named 'jpg' are in JPEG 2000 format. The images are essential identical but the JPG-encoded images are smaller as they use image compression. Much more information is available on the topic of transfer syntaxes.

Viewing DICOM images

Viewing images directly from files

Some DICOM viewing applications do not use an internal database, but rather read the files directly from disk. Use the RadiAnt viewer to open DICOM files that you have downloaded.

Import the data into an imaging application

Advanced DICOM imaging applications store images in an internal database. This allows the many images that comprise a series or study to be analysed and sorted, so they can be accessed collectively rather than as individual images. An additional advantage is that the header information from within the files (patient details, dates etc) can be used to locate studies and series, rather than relying on file and directory names. The application provides an abstraction layer from the physical storage. Images that are stored as files on disk must first be imported into the application's database. Most applications have an option 'Import' or 'Open' to read in DICOM files and sort them into series.

Viewing images and metadata

Most DICOM viewing applications have a function to allow viewing the metadata of an image. Read a DICOM dataset into RadiAnt and examine the image header.

Viewing DICOM headers with DICOM Browser

Install DicomBrowser and use it to examine individual DICOM files. Compare two DICOM files: from the both series, and from different series. Use the program to highlight the differences between the files.

Viewing DICOM headers with command-line tools

Many of the more powerful software tools are run from the command line. These tools offer many options and may be combined with other command line tools for filtering or running within scripts for automation.

Use dcmdump (dcm4che) to dump the header of a DICOM file. Note that the program you are running must be included in the Windows path in order to be run from the command line.

Viewing non-DICOM images

Download some sample NIFTI files from I Do Imaging or the NIFTI site.

Use LONI Inspector and Mango to view the image and header contents of a NIFTI file. A NIFTI header file is limited in size, so there is not as much information stored in a NIFTI header as in a DICOM header.

Viewing raw voxel data

The lowest-level access to image data is raw image files. One file format giving access to raw data is NIFTI, in its two-file (img / hdr) format. Use Mango or VINCI to read in the image data from the .img file. You'll need to specify the dimensions of the data: the number of slices, and the X and Y pixel counts of each slice. You may know this in advance, or you can get it from the header, or you can experiment with some common slice dimensions.

DICOM files may be viewed in this way if they do not use image compression (such as JPG compression). The image data is stored after the header; the length of the header can be calculated by subtracting the size of the image data from the total size of the file. Some imaging applications will perform this calculation for you.

Retrieve a DICOM data set from a PACS server

A PACS server is available to the workshop PCs. Its details are:

Port 4242

Test connection to the PACS server

Follow the DICOM echo tutorial to test the connection using the server details above.

Viewing flat images