15.12.2012 Views

Digital Imaging and Communications in Medicine (DICOM)

Digital Imaging and Communications in Medicine (DICOM)

Digital Imaging and Communications in Medicine (DICOM)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

10.1 <strong>DICOM</strong> File Format 225<br />

10.1.3<br />

Data Object<br />

The <strong>DICOM</strong> data object goes right after the 0002 group <strong>and</strong> stores the actual<br />

<strong>DICOM</strong> data; our usual <strong>DICOM</strong> data object, as we have used it so many times<br />

with <strong>DICOM</strong> network<strong>in</strong>g. <strong>DICOM</strong> object group number<strong>in</strong>g starts with group<br />

0008 (see the <strong>DICOM</strong> Data Dictionary), so it is fairly easy for an application to<br />

identify where the file meta <strong>in</strong>formation (group 0002) ends <strong>and</strong> the data object<br />

(group 0008) beg<strong>in</strong>s.<br />

If you are writ<strong>in</strong>g a <strong>DICOM</strong> application, be careful at this po<strong>in</strong>t. For example,<br />

you are required to encode file meta <strong>in</strong>formation (group 0002) with<br />

explicit VR syntax, but this is not necessarily true for the <strong>DICOM</strong> data (groups<br />

0008 <strong>and</strong> higher). If your <strong>DICOM</strong> application does not switch to the VR syntax<br />

used for the data object encod<strong>in</strong>g (as <strong>in</strong>dicated <strong>in</strong> the “Transfer Syntax”<br />

(0002,0010) field), it will fail to read the data. For this very reason, <strong>and</strong> to support<br />

<strong>DICOM</strong> compression formats (us<strong>in</strong>g explicit VR encod<strong>in</strong>g), <strong>DICOM</strong> recommends<br />

us<strong>in</strong>g explicit VR encod<strong>in</strong>g throughout the entire <strong>DICOM</strong> file; that<br />

is, for the <strong>DICOM</strong> data part as well. 30<br />

F<strong>in</strong>ally, the very end of a <strong>DICOM</strong> file can be padded with “Data Set trail<strong>in</strong>g<br />

padd<strong>in</strong>g” (FFFC,FFFC) elements to achieve a certa<strong>in</strong> length. Is this really needed?<br />

The <strong>DICOM</strong> st<strong>and</strong>ard says not. If your application runs <strong>in</strong>to this padd<strong>in</strong>g element,<br />

ignore it <strong>and</strong> gracefully exit because you have reached the end of the <strong>DICOM</strong> file.<br />

Most <strong>DICOM</strong> files <strong>and</strong> software do not use (FFFC,FFFC) elements.<br />

This very much concludes the review of the <strong>DICOM</strong> file format. Easily,<br />

99.9% of the <strong>DICOM</strong> files you ever run <strong>in</strong>to will follow this layout, <strong>and</strong> the<br />

rema<strong>in</strong><strong>in</strong>g 0.1% will probably be broken or corrupted.<br />

10.1.4<br />

<strong>DICOM</strong> File IDs <strong>and</strong> Names<br />

We have mentioned a few times that one cannot identify a <strong>DICOM</strong> file by its<br />

name. Nevertheless, part PS3.10 prescribes a couple of simple rules that st<strong>and</strong>ard<br />

<strong>DICOM</strong> file names should follow.<br />

Accord<strong>in</strong>g to these rules, all <strong>DICOM</strong> files are labeled with <strong>DICOM</strong> File IDs:<br />

unique file identifiers, essentially correspond<strong>in</strong>g to the file names. File ID consists<br />

of up to eight components. In traditional terms, the very last component<br />

corresponds to the short file name <strong>and</strong> the preced<strong>in</strong>g components correspond<br />

to the folders conta<strong>in</strong><strong>in</strong>g the file path (see Fig. 73). As a result, the file ID corresponds<br />

to the full name of the file. Each component can <strong>in</strong>clude only the<br />

30 At the same time, <strong>DICOM</strong> default encod<strong>in</strong>g (Transfer Syntax) is Implicit Little Endian.<br />

See how explicit <strong>and</strong> implicit syntaxes have become equally important. You can<br />

never rely on us<strong>in</strong>g just one of them.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!