Relevant Links

This page describes several ways by which you can obtain data to be used with the applications in the toolkit or, more generally, with any image analysis application.

The management of real medical image data is strictly regulated in order to protect the privacy of patients. Both hospitals and research institutions have strict controls on the way their data can be distributed. For these reasons the last thing that could be offered on a public web page is real patient data. The methods described here are based in simulations of medical data and provide enough quality for testing image processing code.

Some Words About File Formats
The INSIGHT toolkit does not endorse nor enforce any particular file format. The world of file formats is in perpetual movement and it will be impossible to agree in one that can be widely accepted.

The best thing about standards is that there are so many to choose from

The toolkit provide instead a mechanism by which anybody can add readers and writer for particular file formats, register them in a central place and use them with a uniform API. This design is based on the use of pluggable factories [1]. Details about this design can be found in the ImageIO library paper [2]. This structure is integrated with the factory design pattern used in ITK for most of the high level classes [3].

The basic class that manages the reading and writing of images from files is itk::ImageIOBase. This class has been derived in order to read:

In order to read custom image file formats users can derive the itk::ImageIOBase class and reimplement a set of virtual methods that actually perform the reading and/or writing of files. This design provides a great flexibility as to what file formats will be managed by a particular application that uses ITK.

How to Get Data
Selected Visible Woman Data

Selected Visible Woman and other data for ITK can be obtained via the following link at http://public.kitware.com/pub/itk/Data/.

The data set of the Head is available in different formats. Probably the most convenient for being used with ITK is the format available in the RawRGB subdirectory

http://public.kitware.com/pub/itk/Data/VisibleWomanHead/RawRGB.

This is the cryogenic data of the head. It is organized in 897 files with one slice per file. Every slice has the RGB components of a pixels as consecutive bytes.

The resolution of the data is 1/3 millimeter along x,y,z directions. Because there are three slices per millimeter, the files are named with the millimeter position and a letter {a,b,c}. For example, the file "1021a" corresponds to the spatial position 1021.00 mm, "1021b" corresponds to the spatial position 1021.333 and "1021c" corresponds to 1021.6667. A MetaImage header is available that illustrates how a text header file can be easily written in order to load the slices as a volume. The text header specifies general information about the slices and then list the filenames of selected slices to be loaded as a volume. The MetaImage header is named VisibleWomanHead.mhd.

Selected Visible Human Data (in DICOM)
Selected Visible Human Data in DICOM format can be obtained via the following link at http://mri.radiology.uiowa.edu/VHDicom/.

The BrainWeb Project
The BrainWeb project is a good source for 3D brain images. These images are synthesized from a brain atlas [4]. Users can download images for free just by selecting a set of parameters in a web page.

The following is as example of a session to download an image from their web site:

That will prompt you to another web page where the first part will display a header with data corresponding to the volume date you are about to download. It will look like:

BrainWeb download: T1 ICBM normal 1 mm pn3 rf20
Modality=T1, Protocol=ICBM, Phantom_name=normal, Slice_thickness=1mm, Noise=3%, INU=20%

MINC volume info:

image: signed__ short 0 to 4095
image dimensions: zspace yspace xspace
dimension name length step start
-------------- ------ ---- -----
zspace 181 1 -72
yspace 217 1 -126
xspace 181 1 -90

Original MINC file size: 10.4 Mb
You need to write down the following data under the "length" column because that tells you how many pixels the volume will have in each direction: x,y,z.

Below this header you will find additional selection:
  • Select file format = "raw byte (unsigned)"
  • Select Compression = "gunzip"
  • Fill out the fields with your: Name, Institution and email
  • Click in the "Start Download" button.

You will be asked for a file name for the volume you are about to download. Once you provide this name, the file will be saved in your disk. This can take a while depending on you internet connection. The files are typically 5-10 Mb in size.

The name of the file is arbitrary and you might want to rename it with extension ".gz" in order to convince gunzip that this is a compressed file. Once renamed you can decompress it and you will get the raw data of a brain image in binary format.

Medical Image Resource Center (MIRC)-
Radiological Society of North America (RSNA)

http://www.rsna.org/mirc/ 
The MIRC project develops tools to enable the medical imaging community to share images and information for education, research and clinical practice--within an institution and via the Internet. MIRC provides a common index that can be searched using medically relevant criteria. MIRC also offers an authoring tool that makes it easy to create radiology teaching files and other electronic documents in flexible formats with a common underlying structure.

MyPACS
http://www.mypacs.net 
MyPACS is a free service offered to the international radiology community by Vivalog Technologies. Its mission is to help clinicians share knowledge through the use of content management technology. This service is funded in part by a Small Business Innovative Research grant from the National Institute of Mental Health. Any person can open a free account with this system and store medical image data for the purpose of sharing it with the community. An advanced query system allow to search for typical cases. Users have contributed already about 3500 cases containing 14,000 images.

MultiChannel Multiple Sclerosis (MS) Phantom Data
A small data set of a phantom created to mimic MS lesions in MRI scans can be obtained at http://public.kitware.com/pub/itk/Data/MultiChannelMSPhantomData/ Please read the ReadMe.txt file included with the data for more information.

Segmentations of Selected Structures in the Visible Female Head
Several segmentations of four structures (right eye, optic nerves, right lens, right lateral rectus) in the Visible Female head and neck color cryosection data are available. They were generated using both hand contouring and a watershed-assisted segmentation approach as part of the validation study described in InsightDocuments/Validation/WatershedSegmentation (see http://www.itk.org/HTML/Download.htm) to access the InsightDocuments repository).

This data can obtained at http://public.kitware.com/pub/itk/Data/WatershedSegmentationValidation/.

Writing a MetaImage header for raw data
One of the formats for which a reader is already available in the toolkit is the MetaImage file format. This is a fairly simple yet powerful format consisting of a text header and a binary data section. The following instructions describe how you can write a MetaImage header for the data that you download from the BrainWeb page.

The minimal structure of the MetaImage header is the following:

NDims = 3
DimSize = 181 217 181
ElementType = MET_UCHAR
ElementSpacing = 1.2 1.2 3.4
Offset = 13.4 27.5 43.2
ElementByteOrderMSB = False
ElementDataFile = brainweb1.raw

  • NDims indicate that this is a 3D image. ITK can handle images of arbitrary dimension.
  • DimSize indicates the size of the volume in pixels along each direction.
  • ElementType indicate the primitive type used for pixels. In this case is "unsigned char", implying that the data is digitized in 8 bits / pixel.
  • ElementSpacing indicates the physical separation between the center of one pixel and the center of the next pixel along each direction in space. The units used are millimeters.
  • Offset indicates the position of the image origin. It is expected to be specified in physical units (e.g. millimeters, microns...).
  • ElementByteOrderMSB indicates is the data is encoded in little or big endian order. You might want to play with this value when moving data between different computer platforms.
  • ElementDataFile is the name of the file containing the raw binary data of the image. This file must be in the same directory as the header.
MetaImage headers are expected to have extension: ".mha" or ".mhd"

Once you write this header text file, it should be possible to read the image into your ITK based application using the itk::FileIOToImageFilter class.

Reference

[1] Culp, Timothy R. "Industrial Strength Pluggable Object Factories". C++ Report Online.

[2] P. Chandra, L. Ibanez, "ImageIO: Design of an Extensible Image Input/Output Library", ACM Crossroad online magazine, April 2001. Available online at http://www.acm.org/crossroads/xrds7-4/imageIO.html

[3] E. Gamma, R. Helm, R. Johnson, J. Vlissides, "Design Patterns", Addison Wesley, 1995.

[4] R.K.-S. Kwan, A.C. Evans, G.B. Pike, "MRI simulation-based evaluation of image-processing and classifications methods", IEEE Transactions on Medical Imaging. 18(11):1087-97, Nov 1999.
http://www.bic.mni.mcgill.ca/brainweb/