Medical Image File Formats and Converters

Slides:



Advertisements
Similar presentations
LV2IDL, a software package for automatic data transfer between LabVIEW and IDL Gelu M. Nita New Jersey Institute of Technology.
Advertisements

MODULE 4 File and Folder Management. Creating file and folder A computer file is a resource for storing information, which is available to a computer.
PET DICOM Format Chunlei Han Turku PET Centre Sep. 14, 2005, Turku, Finland.
What is DICOM? The standard for Digital Imaging and Communications in Medicine. Developed by the National Electrical Manufacturers Association (NEMA) in.
Digital Imaging and COmmunication in Medicine (DICOM) ผศ. รุจชัย อึ้งอารุณยะวี ภาควิชาวิศวกรรมคอมพิวเตอร์ คณะวิศวกรรมศาสตร์ มหาวิทยาลัยขอนแก่น
3/5/2009Computer systems1 Analyzing System Using Data Dictionaries Computer System: 1. Data Dictionary 2. Data Dictionary Categories 3. Creating Data Dictionary.
ETEC 100 Information Technology
Tutorial 6 Working with Web Forms
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
DICOM - Digital Imaging and Communications in Medicine
An Introduction to MINC John G. Sled. What is MINC? A medical image file format based on NetCDF A core set tools and libraries for image processing A.
The future of MINC Robert D. Vincent
Introducing Python CS 4320, SPRING Format: Field widths and Alignment The string representation of a value can be padded out to a specific width.
The HDF Group HDF5 Datasets and I/O Dataset storage and its effect on performance May 30-31, 2012HDF5 Workshop at PSI 1.
The netCDF-4 data model and format Russ Rew, UCAR Unidata NetCDF Workshop 25 October 2012.
ITCS373: Internet Technology Lecture 5: More HTML.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
+ Information Systems and Databases 2.2 Organisation.
 Lossless › Integer wavelet (+/- reversible color transformation).  Either lossless or lossy › Integer or floating point wavelet  Many features! › Region-of-interest.
General Purpose Packages DATA TYPES. Data Types Computer store information in the form of data. Information has meaning. Eg 23 May 2005 Data has no meaning.
Surgical Planning Laboratory -1- Brigham and Women’s Hospital Converting DTI data into Nrrd file format Sonia Pujol, Ph.D. Gordon.
The HDF Group Introduction to netCDF-4 Elena Pourmal The HDF Group 110/17/2015.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
DICOM AND PACS Value Representation. How Did DICOM Get Started? -The standard was conceived in 1983 by a joint committee formed by the American College.
Sally McCallum Library of Congress
CHAPTER 9 File Storage Shared Preferences SQLite.
Copyright © 2010 The HDF Group. All Rights Reserved1 Data Storage and I/O in HDF5.
The DICOM Standard Miloš Šrámek Austrian Academy of Sciences.
The purpose of a CPU is to process data Custom written software is created for a user to meet exact purpose Off the shelf software is developed by a software.
Text and Images Key Revision Points.
Section 8.1 Section 8.2 Create a custom theme Design a color scheme
Tutorial 6 Working with Web Forms
Chapter 3 Data Representation
Geog. 314 Working with tables.
How Computers Store Variables
Module 11: File Structure
GO! with Microsoft Office 2016
CHP - 9 File Structures.
Moving from HDF4 to HDF5/netCDF-4
f3d Format for Storage of 3D Grids
INTRODUCTION TO GEOGRAPHICAL INFORMATION SYSTEM
GUID Partition Table Unified Extensible Firmware Interface (UEFI)
Introduction to HDF5 Session Five Reading & Writing Raw Data Values
Containers and Lists CIS 40 – Introduction to Programming in Python
HDF5 Metadata and Page Buffering
Objectives Identify the built-in data types in C++
File System Structure How do I organize a disk into a file system?
Efficiently serving HDF5 via OPeNDAP
GO! with Microsoft Access 2016
What is FITS? FITS = Flexible Image Transport System
Other Kinds of Arrays Chapter 11
Other Kinds of Arrays Chapter 11
XNAT 1.7 DicomEdit 4, DicomEdit 6, and Mizer
The HP OpenVMS Itanium® Calling Standard
Representing Images 2.6 – Data Representation.
ELECTRONIC MAIL SECURITY
ELECTRONIC MAIL SECURITY
Data Model.
Why use Binary? It is a two state system (on/off) which makes it simple to operate Even if degradation of current occurs (ie a slight drop in voltage)
Variable Length Data and Records
funCTIONs and Data Import/Export
Fundamentals of Python: First Programs
ExPLORE Complex Oceanographic Data
Real-World File Structures
OPeNDAP/Hyrax Interfaces
Database Instructor: Bei Kang.
Presentation transcript:

Medical Image File Formats and Converters MBI Data Tutorial 7 June 2012 Amanda Ng

Outline DICOM HDF5 MINC Analyze/NIfTI RAW DaRIS built-in converters FILE FORMATS CONVERTERS DICOM HDF5 MINC Analyze/NIfTI RAW DaRIS built-in converters Matlab ITK dcm2nii (MRICron) MRTrix MRConvert MIPAV

Image file formats (general) Consists of: Metadata (information about the data, eg file size, image dimensions, scan date, patient id) Data (usually big long string of bytes) Organised as: Header (metadata) followed by data Containers (each has an identifier, metadata, data) Header Data 352 EOF bytes Example: NIfTI file format Container Example: DICOM file format Tag Data Type # elements Data

Medical image file formats Lots of information Only data DICOM HDF5 MINC NIfTI Analyze7.5 RAW

DICOM Digital Imaging and Communications in Medicine File format and network communications protocol Developed/maintained by ACR/NEMA Current version is 3.0 (since 1993), however updates are released and numbered according to year. Container-based format ACR = American College of Radiology NEMA = National Electrical Manufacturers Association

DICOM Advantages Disadvantages Store infinite amount (well, a lot) of metadata Easily appendable Recognised by most software packages (eg Matlab, SPM, MRTrix, MPIAV, Freesurfer) Usually in the form of a converter to the native format Except FSL. Grrr… 3D volumes are usually stored as separate DICOM files for each slice Metadata repeated in every file 100 slices means 100 separate files … ewww For multi-volume datasets (eg fMRI, diffusion) manufacturers implemented custom embedding of 3D volumes in single files.

Value Representation (VR) DICOM … Data Element DICOM file Data Element Tag Value Representation (VR) Value Length (VL) Value Field Tag Unique Id Index to the DICOM dictionary Even numbers are standard (eg Patient Name) Odd numbers are ‘user defined’ (eg Siemens CSA entry) VR Description AE Application Entity AS Age String AT Attribute Tag CS Code String DA Date DS Decimal String DT Date/Time FL Floating Point Single FD Floating Point Double IS Integer String LO Long String LT Long Text OB Other Byte OF Other Float OW Other Word PN Person Name SH Short String SL Signed Long SQ Sequence of Items SS Signed Short ST Short Text TM Time UI Unique Identifier UL Unsigned Long UN Unknown US Unsigned Short UT Unlimited Text Value Length Number of values in ‘Value Field’ VL > 1 for arrays (eg voxel dimensions) Value Field Contains actual metadata

Browsing Data Elements Most DICOM packages have facility to browse data elements or “metadata” (DCMTK) dcmdump dcmdump 0001.dcm | grep ‘Manufacturer’ (python) pydicom import dicom ds = dicom.read_file(‘0001.dcm’) ds[0x00080070] ds.Manufacturer Most important data element: Pixel Data 7FE0 0010 OW 1 01110010001010101010… Tag VR VL Value Field

HDF5 Hierarchical Data Format “data model, library and file format for storing and managing data” Not medical image specific Container based format (sort of)

HDF5 MINC2 Advantages Disadvantages general self-describing unlimited *cough* amount of metadata can embed compressed data still require some sort of convention for storing medical data (eg metadata fields that should be included, such as voxel size) MINC2

HDF5 Format (basic) … … … HDF5 File Data Descriptor Data Descriptor Block Block Size Offset to Next Block Data Descriptor … Every DD Block is the same size. Usually 16 descriptors, but can be changed. Data Descriptor Tag Reference # Offset Length 2 4 8 12 HDF File Header Data Descriptor Block Data Descriptor Block … Data Element Data Element …

MINC Medical Image NetCDF Originally (1992) an extension to the NetCDF file format specific for medical imaging purposes Reworked into MINC2 in 2003 because of huge datasets, based on HDF5 format Advantages Disadvantages All the HDF5 advantages! Woo!! Loads of metadata Doesn’t seem to be well supported by non-MNI applications. Some software doesn’t support MINC2

NIfTI/Analyze 7.5 Analyze 7.5 NIfTI Created by Mayo clinic Considered old and superseded by Mayo Clinic Header + data format (but in two separate files) Ambiguous/limited support for orientation schemes NIfTI Specified by NIH Modified Analyze 7.5 format (backward compatible) Extended header Single file Also an SPM version of NIfTI

NIfTI Advantages Disadvantages Recognised by many software packages (including FSL! Yay!) Stores translations from patient to image space. Although facility to extend the header, not usually done and therefore limited in the metadata contained Limited to 7 dimensions

Dim 3 (slices in a volume) Analyze 7.5 Format Header Key Dimensions History (description) (aux_file) Orientation … Number of dimensions Dim 1 (voxels in a row) Dim 2 (rows in a slice) Dim 3 (slices in a volume) Dim 4 (time points) Dim 5 Dim 6 Dim 7 Datatype Bits per pixel Voxel width Voxel height Slice thickness … Size of Header (data type) (db_name) (extents) (session_error) (regular) (hkey_un0) Header Orientation Dim 1 Dim 2 Dim 3 Transverse unflipped R  L P  A I  S Coronal unflipped Sagittal unflipped Transverse flipped A  P Coronal flipped S  I Sagittal flipped Data

NIfTI changes Header is 4 bytes longer Optional extended header (though not yet used) History section of header different Specifies translation between patient space and image space Quaternion representation (rotation matrix and offsets), or Affine matrix representation Complete set of data types Standardised storage of data Dual (.hdr, .img) or single (.nii) file storage

Raw Binary Files No header, just the data. Need to know The dimensions of the data The datatype (integer, float) and datatype size (8 bit, 16 bit, 32 bit) Endian-ness Ordering of the data Column-major order Row-major order

File Format Support Software DICOM MINC Analyze NIfTI RAW Matlab ✔ EMMA File XΔ SPM via Matlab FSL ✖ MNI Tools MRTrix MPIAV FreeSurfer MRICron ITK Python pydicom nibabel

Converters DaRIS built-in converters Matlab MRIConvert MIPAV ITK dcm2nii (MRICron) MRTrix

DaRIS built-in converters Datasets stored as Can convert to DICOM Analyze (neurological) Analyze (radiological) MINC NIfTI Siemens Spectrum Doesn’t play nice with Skyra frames data *sad face* Doesn’t appear to convert translation matrix to MINC. Issues with translation matrix in NIfTI

Matlab Can read in these Can write these DICOM NIfTI/Analyze MINC RAW HDF5 … NIfTI DICOM MINC RAW HDF5 … Reads Skyra data fMRI/Diffusion data! *happy face* Not straight-forward click-a-button (may need to download files from file exchange)

Converts these formats MRIConvert Converts these formats to these formats DICOM FSL NIfTI SPM Analyze Meta Image NIfTI Analyze 7.5 BrainVoyager Doesn’t play nice with Skyra frames data *sad face* Creates bvec and bvals files for FSL Diffusion Toolkit *happy face* Comes with command line version “mcverter”

MIPAV Opens these formats Saves these formats DICOM Analyze NIfTI MINC … others DICOM Analyze NIfTI MINC … others Opens Skyra frames data!!! *big happy face*

Other converters dcm2nii (comes with MRICron) ITK MRTrix Converts DICOM to all forms of NIfTI Has a GUI ITK Sounds amazing! I’m yet to install and play. MRTrix Diffusion imaging package Easy to use command line converter (mrconvert)

File Format Links HDF5 MINC MRTrix NIfTI Analyze 7.5 Basic format outline http://www.hdfgroup.org/ftp/HDF/Documentation/HDF4.2.7/hdf_UsrGuid e_html/UG_Fundmtls.html Detailed format description: http://www.hdfgroup.org/HDF5/doc/H5.format.html MINC http://en.wikibooks.org/wiki/MINC MRTrix http://www.brain.org.au/software/mrtrix/index.html NIfTI http://nifti.nimh.nih.gov/ Analyze 7.5 http://wideman-one.com/gw/brain/analyze/