The DICOM Package. August 23, Title Import medical imaging data using the DICOM Standard

Similar documents
Package oro.dicom. R topics documented: February 15, Version Date Title Rigorous - DICOM Input / Output

Type conversion functions

Universal Format Plug-in User s Guide. Version 10g Release 3 (10.3)

Python Working with files. May 4, 2017

ASC X12N INSURANCE SUBCOMMITTEE X061A1 820 GROUP PREMIUM PAYMENT FOR INSURANCE PRODUCTS

DICOM Conformance Statement

This document contains confidential information that is proprietary to SonoSite. Neither the document nor the information contained therein should be

nstream Version 3.1 DICOM Conformance Statement

Linear Tape File System (LTFS) Format Specification

Document Version FUNCTIONAL ACKNOWLEDGEMENT (ANSI X12 VERSION 4040) 10/10/2008. X12V General Parts, Inc./CARQUEST

Working with the DICOM Data Standard in R

The DICOM Standard. Miloš Šrámek Austrian Academy of Sciences

Technical Publications

dbase (DBF) Reader/Writer

DICOM Conformance Statement. for ES9410 DICOM

Memory Module. Data Logging Guide. For information: Within USA (800) Outside USA (951) Fax (951)

Change Object Description (QLICOBJD) API

Digital Imaging and Communications in Medicine (DICOM) Supplement 9 Multi-byte Character Set Support

Association Information Exchange Form

22 CP Value Representation corrections related to OL, UC and UR

Electricity Information Exchange Protocols (EIEP)

DICOM Conformance Statement. for C911 DICOM PRINTER SERIES : C911/C931 DICOM ES9411/ES9431 DICOM Pro9431 DICOM

Signed umbers. Sign/Magnitude otation

CS Programming In C

DICOM Correction Proposal

MATLAB Examples: Linear Block Codes

Storage Peak. Version 5.3. HL7 Interface Specification

DICOM 3.0 Conformance Statement

STAR Data Transfer Specification General File Format Requirements Version 2.0. Table Of Contents 1. DOCUMENT INFORMATION...1

19 CP Remove description of retired Big Endian Transfer syntax

Importing Excel into SAS: A Robust Approach for Difficult-To-Read Worksheets

997 Functional Acknowledgment

Using Custom Number Formats

Interlibrary Loan Protocol Implementors Group (IPIG) Directory Services for Interlibrary Loan Information Model Diagrams

Hexadecimal Numbers. Journal: If you were to extend our numbering system to more digits, what digits would you use? Why those?

Table 1. Explicit VR of OB, OW, OF, SQ, UT, UN Table 2. Explicit VR other than shown in table 1 Table 3. Implicit VR waveform content. We were not use

Building a Test Suite

Bulk Statistics. Feature Summary and Revision History. This chapter provides configuration information for:

Package UNF. June 13, 2017

RTL Reference 1. JVM. 2. Lexical Conventions

EnableBasic. The Enable Basic language. Modified by Admin on Sep 13, Parent page: Scripting Languages

No. MIIUS0015EA DICOM CONFORMANCE STATEMENT FOR DIAGNOSTIC ULTRASOUND SYSTEM APLIO MODEL SSA-770A TOSHIBA CORPORATION 2001 ALL RIGHTS RESERVED

Package sfc. August 29, 2016


A USER'S GUIDE TO THE NPL TELEPHONE TIME SERVICE

The UNF Package. R topics documented: June 2, Title Tools for creating universal numeric fingerprints for data. Version 1.16.

Inf2C - Computer Systems Lecture 2 Data Representation

11 Using the ADAP Command Line Language

Real Numbers finite subset real numbers floating point numbers Scientific Notation fixed point numbers

Advanced C Programming Topics

TABLE OF CONTENTS 2 CHAPTER 1 3 CHAPTER 2 4 CHAPTER 3 5 CHAPTER 4. Algorithm Design & Problem Solving. Data Representation.

Floating-Point Data Representation and Manipulation 198:231 Introduction to Computer Organization Lecture 3

TB-2 The Universal Text Trade Database File Format

DICOM Conformance Statement

Number Systems. Binary Numbers. Appendix. Decimal notation represents numbers as powers of 10, for example

Real Numbers finite subset real numbers floating point numbers Scientific Notation fixed point numbers

UNIT 7A Data Representation: Numbers and Text. Digital Data

efx Software DICONDE Conformance Statement

19 CP Remove description of retired Big Endian Transfer syntax

The following content has been imported from Legacy Help systems and is in the process of being checked for accuracy.

DICOM Conformance Statement

Linear Tape File System (LTFS) Format Specification

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1

Create!form Bind Technical Note. Software Version: 6.1 Operating Environment: Windows 2000/2003 Server

Chapter 7 File Access. Chapter Table of Contents

Site Effects Assessment Using Ambient Excitations SESAME WP06

Chapter Binary Representation of Numbers

c) Comments do not cause any machine language object code to be generated. d) Lengthy comments can cause poor execution-time performance.

Digital Imaging and Communications in Medicine (DICOM) Supplement 174: RESTful Rendering. Public Comment Draft

ANNEX A.3. ADARIO Data Block Field Definitions

Package Rwinsteps. February 19, 2015

Lecture (03) Binary Codes Registers and Logic Gates

Atlas-Based Autosegmentation. DICOM Conformance Statement DICOM 3.0

Hologic Physician s Viewer 5.0 DICOM Conformance Statement

Microsoft Compound Document File Format

StellarPACS DICOM Conformance Statement. Version 1.3, August 2008 SoftTeam Solutions

Programming Assignment 0

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

External File, Guide. Version Prepared by: Michael Davis- Hannibal. Softcon Software Control Services (Pty) Ltd.

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

Digital Imaging and Communications in Medicine (DICOM) Part 5: Data Structures and Encoding

DICOM Conformance Statement

Fundamentals of Python: First Programs. Chapter 4: Strings and Text Files

SU2017. LAB 1 (May 4/9) Introduction to C, Function Declaration vs. Definition, Basic I/O (scanf/printf, getchar/putchar)

Table of Contents 1 Basic Configuration Commands 1-1

Package RobustSNP. January 1, 2011

DICOM Correction Item

LECTURE #21: G-CPU & Assembly Code EEL 3701: Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz

Ordinary Differential Equation Solver Language (ODESL) Reference Manual

Data Types in MySQL CSCU9Q5. MySQL. Data Types. Consequences of Data Types. Common Data Types. Storage size Character String Date and Time.

SCOS-2000 OBSM External Interfaces Control Document

Lecture (02) Operations on numbering systems

Microprocessors (A) DOS Services

CHAPTER 3 Expressions, Functions, Output

Package qvcalc. R topics documented: September 19, 2017

Software and Hardware

MATLAB Introduction to MATLAB Programming

STRAT. A Program for Analyzing Statistical Strategic Models. Version 1.4. Curtis S. Signorino Department of Political Science University of Rochester

DICOM Correction Proposal

Flexible Rate Card Importer

Transcription:

The DICOM Package August 23, 2005 Version 0.12 Date 2005-8-23 Title Import medical imaging data using the DICOM Standard Author Brandon Whitcher <brandon.j.whitcher@gsk.com> Maintainer Brandon Whitcher <brandon.j.whitcher@gsk.com> Depends R (>= 2.0.0) ZipData no This package provides functions to import and manipulate medical imaging data via the Digital Imaging and Communications in Medicine (DICOM) Standard. License GPL version 2 or later URL http://medical.nema.org R topics documented: dec2base........................................... 2 DICOM Lookup Tables................................... 2 dicom.info.......................................... 3 dicom.separate....................................... 4 dicom.table......................................... 5 dicom2analyze....................................... 5 extract.hdr.......................................... 6 str2time........................................... 7 write.dicom.hdr....................................... 8 Index 10 1

2 DICOM Lookup Tables dec2base Convert Decimal to Base N Number in String This function converts the nonnegative integer to the specified base. dec2base(n, base, len=0) dec2hex(n, len=0) n Non-negative integer. base Number between 2 and 36. len Length of the character string. This function converts the nonnegative integer n to the specified base. n must be a nonnegative integer smaller than 2 5 2, base must be an integer between 2 and 36 and len suggests the lengt of the character string. The returned argument is a string. B. Whitcher Examples x <- dec2base(23, 2) print(x) DICOM Lookup Tables Lookup Tables for DICOM Header Information data(dicom.vrfields) data(dicom.fields)

dicom.info 3 Format Source See references. http://en.wikipedia.org/wiki/digital_imaging_and_communications_in_ Medicine dicom.info, dicom.separate. dicom.info Read Single DICOM File All information, both header and image, is read into a list structure from a DICOM file. dicom.info(fname, endian="little", flipud=true) fname endian flipud File name Binary encoding; default is "little". Flip image vertically; default is TRUE. Brandon Whitcher http://en.wikipedia.org/wiki/digital_imaging_and_communications_in_ Medicine

4 dicom.separate dicom.separate Examples x <- dicom.info(system.file("dcm/abdo.dcm", package="dicom")[1]) image(x$img, col=grey(0:127/128), axes=false, xlab="", ylab="") x <- dicom.info(system.file("dcm/spine1.dcm", package="dicom")[1]) image(x$img, col=grey(0:127/128), axes=false, xlab="", ylab="") dicom.separate Read All DICOM Files in a Directory All DICOM files are imported and a text file summarizing their content recorded. dicom.separate(path, debug=true) path debug Path name to the DICOM directory. Flag to provide limited progress information. Brandon Whitcher dicom.info

dicom.table 5 dicom.table Construct Data Frame from DICOM Headers A data frame is created given the valid DICOM fields provided by the user. dicom.table(hdrs, fields, numeric=rep(true,length(fields))) hdrs fields numeric List object of DICOM headers. Vector of character strings; i.e., valid DICOM field names. Logical vector; each field is converted to numeric when TRUE. The function extract.hdr is called for each DICOM field and the resulting vectors are rearranged into a convenient matrix. Data frame where the rows correspond to images and the columns to DICOM fields. B. Whitcher extract.hdr dicom2analyze Convert DICOM Header to Analyze A subset of header information from DICOM is placed into Analyze 7.5 format. dicom2analyze(hdr, img)

6 extract.hdr hdr img DICOM header 4D data volume See the references. A list containing Analyze header information. Brandon Whitcher Analyze 7.5 http://www.mayo.edu/bir/pdf/analyze75.pdf extract.hdr Extract Single Field from DICOM Headers A particular DICOM field is extracted for a collection of DICOM headers. extract.hdr(hdrs, string, numeric=true, names=false) hdrs string numeric names List object of DICOM headers. DICOM field name. Logical; values are converted to numbers when TRUE. Logical; file names are kept with elements of the vector. The DICOM field is extracted from each DICOM header and placed into a vector. Vector of values from the requested DICOM field.

str2time 7 B. Whitcher dicom.info str2time Convert DICOM Time/Date Entry The DICOM time entry (TM) is converted into two alternative formats: a text version of the original format and a number in seconds. The DICOM date entry (DA) is converted into a simple alternative format. str2time(tt) str2date(dd) tt dd TM field from a DICOM header. DA field from a DICOM header. DICOM "TM" format consists of a string of characters of the format hhmmss.frac; where hh contains hours (range "00" - "23"), mm contains minutes (range "00" - "59"), ss contains seconds (range "00" - "59"), and frac contains a fractional part of a second as small as 1 millionth of a second (range 000000-999999). A 24 hour clock is assumed. Midnight can be represented by only 0000 since 2400 would violate the hour range. The string may be padded with trailing spaces. Leading and embedded spaces are not allowed. One or more of the components mm, ss, or frac may be unspecified as long as every component to the right of an unspecified component is also unspecified. If frac is unspecified the preceding "." may not be included. Frac shall be held to six decimal places or less to ensure its format conforms to the ANSI HISPP MSDS Time common data type. Examples: 1. 070907.0705 represents a time of 7 hours, 9 minutes and 7.0705 seconds. 2. 1010 represents a time of 10 hours, and 10 minutes. 3. 021 is an invalid value. Notes: For reasons of backward compatibility with versions of this standard prior to V3.0, it is recommended that implementations also support a string of characters of the format hh:mm:ss.frac for this VR. DICOM "DA" format A string of characters of the format yyyymmdd; where yyyy shall contain year, mm shall contain the month, and dd shall contain the day. This conforms to the ANSI HISPP MSDS Date common data type. Example:

8 write.dicom.hdr 1. 19930822 would represent August 22, 1993. Notes: For reasons of backward compatibility with versions of this standard prior to V3.0, it is recommended that implementations also support a string of characters of the format yyyy.mm.dd for this VR. For "TM", a list structure containing two fields txt time A text version of the time where colons have been inserted for readability. Time in seconds from midnight. for "DA", a simple character string. B. Whitcher http://en.wikipedia.org/wiki/digital_imaging_and_communications_in_ Medicine dicom.info write.dicom.hdr Write DICOM Table to ASCII File A wrapper to write.table specifically for DICOM tables. write.dicom.hdr(dtable, filename,...) dtable The DICOM table. filename Name of the file to be created.... Additional parameters to be passed to write.table. This function is a straightforward wrapper to write.table. None.

write.dicom.hdr 9 B. Whitcher write.table

Index Topic datasets DICOM Lookup Tables, 2 Topic file dicom.info, 3 dicom.separate, 4 dicom2analyze, 5 write.dicom.hdr, 8 Topic misc dec2base, 1 dicom.table, 4 extract.hdr, 6 str2time, 7 dec2base, 1 dec2hex (dec2base), 1 DICOM Lookup Tables, 2 dicom.fields (DICOM Lookup Tables), 2 dicom.info, 2, 3, 4, 6, 8 dicom.separate, 2, 3, 4 dicom.table, 4 dicom.vrfields (DICOM Lookup Tables), 2 dicom2analyze, 5 extract.hdr, 5, 6 str2date (str2time), 7 str2time, 7 write.dicom.hdr, 8 write.table, 9 10