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.

7.2 Services <strong>and</strong> Data 125<br />

simply meant to identify each message dur<strong>in</strong>g its brief life span. When an<br />

Rsp message is constructed, the message ID from the Rq message is copied<br />

<strong>in</strong>to the (0000,0120) field, this is how <strong>DICOM</strong> pairs up request<strong>in</strong>g <strong>and</strong> respond<strong>in</strong>g<br />

messages. Imag<strong>in</strong>e a busy <strong>DICOM</strong> network on which the same<br />

AE can receive dozens of DIMSE messages each second. The message ID <strong>in</strong><br />

this case becomes the only way to dist<strong>in</strong>guish among them, to keep track of<br />

the request<strong>in</strong>g AEs, <strong>and</strong> reply to them correctly.<br />

6. The Status field, which is always set to 0000 <strong>in</strong> the C-Echo-Rsp message, <strong>in</strong>dicates<br />

success. This means that the peer AE has received the C-Echo-Rq,<br />

understood it, <strong>and</strong> replies back with a success C-Echo-Rsp. We really do<br />

not have other options for C-Echo status; simply receiv<strong>in</strong>g a C-Echo-Rsp<br />

reply implies that C-Echo was successful. The C-Echo message is considered<br />

failed only if no response returns dur<strong>in</strong>g the preset timeout <strong>in</strong>terval<br />

(several seconds). Nonzero values <strong>in</strong> the Status field are used by the other<br />

DIMSE services to return various warn<strong>in</strong>g or error messages <strong>in</strong> case someth<strong>in</strong>g<br />

goes wrong. For example, if a DIMSE service tries to pr<strong>in</strong>t an image<br />

<strong>and</strong> the image is not available, an error value is reported <strong>in</strong> the Status field<br />

for that service.<br />

With all this knowledge, take a look at the follow<strong>in</strong>g Table 22 sample C-Echo-<br />

Rq <strong>in</strong> its f<strong>in</strong>al <strong>DICOM</strong> encod<strong>in</strong>g. Just like any <strong>DICOM</strong> comm<strong>and</strong> object, it follows<br />

implicit VR data encod<strong>in</strong>g (default <strong>DICOM</strong> encod<strong>in</strong>g, see Table 5).<br />

The sequence of 68 bytes <strong>in</strong> the b<strong>in</strong>ary row is exactly what will be sent on a<br />

<strong>DICOM</strong> network from one AE to another as the C-Echo-Rq. Note that this sequence<br />

is <strong>in</strong> Little Endian order (see 5.2); when <strong>in</strong> multibyte numbers, the least<br />

significant bytes go first. In our example, bytes number 15 <strong>and</strong> 16 form element<br />

number e = 0002 = 02 (least significant byte) <strong>and</strong> 00 (most significant byte).<br />

The C-Echo-Rsp is built <strong>in</strong> a similar manner <strong>and</strong> returned as shown <strong>in</strong><br />

Table 23. We marked the fields that changed <strong>in</strong> the C-Echo-Rsp compared<br />

to the C-Echo-Rq. First is the comm<strong>and</strong> field (0000,0100), which reflects the<br />

change <strong>in</strong> the comm<strong>and</strong> type. Second is the message ID, which <strong>in</strong> the C-Echo-<br />

Rsp is stored <strong>in</strong> (0000,0120) <strong>and</strong> corresponds to the value <strong>in</strong> (0000,0110) <strong>in</strong> the<br />

C-Echo-Rq.<br />

In brief, as you can see, there is really noth<strong>in</strong>g baffl<strong>in</strong>g about the C-Echo<br />

DIMSE service; nearly all service parameters are fixed. If you are writ<strong>in</strong>g<br />

<strong>DICOM</strong> software, the only parameter you should generate <strong>in</strong> the C-Echo protocolvis<br />

the message ID number. It has to be different for each new C-Echo<br />

request, <strong>and</strong> matched <strong>in</strong> the C-Echo-Rsp (0000,0120) field. As long as this is<br />

done, you are good to go.

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

Saved successfully!

Ooh no, something went wrong!