File: gdcmraw.xml

package info (click to toggle)
gdcm 3.0.21-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 26,880 kB
  • sloc: cpp: 203,477; ansic: 78,582; xml: 48,129; python: 3,459; cs: 2,308; java: 1,629; lex: 1,290; sh: 334; php: 128; makefile: 117
file content (222 lines) | stat: -rw-r--r-- 8,136 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl" ?>
<!DOCTYPE Data [ <!ENTITY version SYSTEM 'version.txt'> ]>
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink">
<info>
<author><personname><firstname>Mathieu</firstname><surname>Malaterre</surname></personname><contrib>Main developer</contrib></author>
<copyright><year>2006</year><year>2011</year><holder>Mathieu Malaterre</holder></copyright>
</info>
  <refmeta>
    <refentrytitle>gdcmraw</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo class="source">GDCM</refmiscinfo>
    <refmiscinfo class="version">&version;</refmiscinfo>
    <refmiscinfo class="manual">DICOM Manipulation.</refmiscinfo>
  </refmeta>
  <refnamediv><refname>gdcmraw</refname>
    <refpurpose>Extract Data Element Value Field.</refpurpose>
</refnamediv>
<refsection xml:id="gdcmraw_1synopsis">
<title>SYNOPSIS</title>

<para><literallayout>gdcmraw [options] file-in file-out
</literallayout></para>
</refsection>
<refsection xml:id="gdcmraw_1description">
<title>DESCRIPTION</title>

<para>The <emphasis role="bold">gdcmraw</emphasis> tool is mostly used for development purpose. It is used to extract a specific binary field from a DICOM DataSet.</para>
</refsection>
<refsection xml:id="gdcmraw_1parameters">
<title>PARAMETERS</title>

<para><literallayout>file-in   DICOM input filename

file-out  output filename
</literallayout></para>
</refsection>
<refsection xml:id="gdcmraw_1options">
<title>OPTIONS</title>

<para><literallayout>  -i --input     Input filename
  -o --output    Output filename
  -t --tag       Specify tag to extract value from.
</literallayout></para>
</refsection>
<refsection xml:id="gdcmraw_1specific_options">
<title>specific options</title>

<para><literallayout>  -S --split-frags  Split fragments into multiple files.
  -p --pattern      Specify trailing file pattern (see split-frags).
  -P --pixel-data   Pixel Data trailing 0.
</literallayout></para>
</refsection>
<refsection xml:id="gdcmraw_1general_options">
<title>general options</title>

<para><literallayout>  -h   --help
         print this help text and exit

  -v   --version
         print version information and exit

  -V   --verbose
         verbose mode (warning+error).

  -W   --warning
         warning mode, print warning information

  -E   --error
         error mode, print error information

  -D   --debug
         debug mode, print debug information
</literallayout></para>
</refsection>
<refsection xml:id="gdcmviewer_1usage">
<title>Typical usage</title>
<refsection xml:id="gdcmraw_1copy_attribute">
<title>Copy Attribute Value to file</title>

<para>This will extract the value at Tag (0025,101b):</para>

<para><literallayout>$ gdcmraw -i GE_MR_0025xx1bProtocolDataBlock.dcm -t 25,101b -o pdb.raw
</literallayout></para>
</refsection>
<refsection xml:id="gdcmraw_1extract_pixeldata">
<title>Extract Pixel Data</title>

<para>If you do not specify any tag, the Pixel Data element is the default one. So for instance to grab the Pixel Data from an image:</para>

<para><literallayout>$ gdcmraw -i test.acr -o test.raw
</literallayout></para>

<para>You can then for example compute the md5sum of this pixel data (very useful):</para>

<para><literallayout>$ md5sum test.raw
f845c8f283d39a0204c325654493ba53  test.raw
</literallayout></para>
</refsection>
<refsection xml:id="gdcmraw_1encapsulated_syntax">
<title>Encapsulated Syntax</title>

<para>When the Pixel Data is encapsulated, multiple fragments can be used to store a single slice image:</para>

<para><literallayout>$ gdcmdump D_CLUNIE_CT1_J2KR.dcm
</literallayout></para>

<para><literallayout>...
(7fe0,0010) OB                                                    # u/l,1 Pixel Data
  (fffe,e000) ?? []                           # 0,1 Item
  (fffe,e000) ?? ff\\4f\\ff\\51\\00\\29\\00\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\02\\00\\00\\00\\02\\00         # 65536,1 Item
  (fffe,e000) ?? 2c\\b7\\ee\\68\\de\\e3\\93\\2d\\b3\\b8\\ba\\90\\7b\\42\\3e\\f8\\42\\16\\64\\88\\46\\30\\37\\d4\\50\\95\\9b\\b6\\a5\\c7\\38\\9b         # 65536,1 Item
  (fffe,e000) ?? 48\\3c\\03\\e8\\c4\\3f\\44\\e1\\8a\\5c\\73\\3b\\02\\0a\\ad\\a5\\8f\\e4\\0c\\81\\76\\a2\\d7\\1b\\7f\\b7\\cd\\bc\\30\\c6\\6a\\6a         # 43308,1 Item
(fffe,e0dd) 0
</literallayout></para>

<para>In order to create a J2K image out of it, we need to extract each fragments and concatenate them:</para>

<para><literallayout>$ gdcmraw -i D_CLUNIE_CT1_J2KR.dcm -o D_CLUNIE_CT1_J2KR.j2k
</literallayout></para>

<para>This is a valid J2K file, using the Kakadu software package:</para>

<para><literallayout>$ kdu_expand -i D_CLUNIE_CT1_J2KR.j2k -o D_CLUNIE_CT1_J2KR.tiff -record D_CLUNIE_CT1_J2KR.txt
</literallayout></para>

<para><literallayout>$ cat D_CLUNIE_CT1_J2KR.txt
</literallayout></para>

<para><literallayout>Sprofile=PROFILE2
Scap=no
Sextensions=0
Ssize={512,512}
Sorigin={0,0}
Stiles={512,512}
Stile_origin={0,0}
Scomponents=1
Ssigned=yes
Sprecision=16
Ssampling={1,1}
Sdims={512,512}
Cycc=no
Cmct=0
Clayers=1
Cuse_sop=no
Cuse_eph=no
Corder=LRCP
Calign_blk_last={no,no}
Clevels=5
Cads=0
Cdfs=0
Cdecomp=B(-:-:-)
Creversible=yes
Ckernels=W5X3
Catk=0
Cuse_precincts=no
Cblk={64,64}
Cmodes=0
Qguard=1
Qabs_ranges=18,19,19,20,19,19,20,19,19,20,19,19,20,19,19,20

&gt;&gt; New attributes for tile 0:
</literallayout></para>
</refsection>
<refsection xml:id="gdcmraw_1extract_fragments">
<title>Extract fragments as single file</title>

<para>Sometimes each fragments is in fact a single slice, so we would not need to concatenate them:</para>

<para><literallayout>$ gdcmdump 00191113.dcm
</literallayout></para>

<para><literallayout>...
(7fe0,0010) OB                                                    # u/l,1 Pixel Data
  (fffe,e000) ?? 00\\00\\00\\00\\6b\\38\\01\\00\\10\\77\\02\\00\\37\\b6\\03\\00\\a7\\f4\\04\\00         # 20,1 Item
  (fffe,e000) ?? ff\\d8\\ff\\c3\\00\\0b\\08\\02\\00\\02\\00\\01\\00\\11\\00\\ff\\c4\\00\\1b\\00\\01\\01\\01\\01\\01\\01\\01\\01\\00\\00\\00\\00         # 79970,1 Item
  (fffe,e000) ?? ff\\d8\\ff\\c3\\00\\0b\\08\\02\\00\\02\\00\\01\\00\\11\\00\\ff\\c4\\00\\1b\\00\\01\\01\\01\\01\\01\\01\\01\\01\\00\\00\\00\\00         # 81564,1 Item
  (fffe,e000) ?? ff\\d8\\ff\\c3\\00\\0b\\08\\02\\00\\02\\00\\01\\00\\11\\00\\ff\\c4\\00\\1b\\00\\01\\01\\01\\01\\01\\01\\01\\01\\00\\00\\00\\00         # 81694,1 Item
  (fffe,e000) ?? ff\\d8\\ff\\c3\\00\\0b\\08\\02\\00\\02\\00\\01\\00\\11\\00\\ff\\c4\\00\\1b\\00\\01\\01\\01\\01\\01\\01\\01\\01\\00\\00\\00\\00         # 81511 (81512),1 Item
(fffe,e0dd) 0
</literallayout></para>

<para>Let&apos;s try to extract those 4 individual Lossless jpeg individually:</para>

<para><literallayout>$ gdcmraw --split-frags -i 00191113.dcm -o jpeg --pattern %02d.ljpeg
</literallayout></para>

<para>This will output 4 files:</para>

<para><literallayout>-rw-r--r--  1 mathieu mathieu   81512 2008-08-08 22:10 jpeg03.ljpeg
-rw-r--r--  1 mathieu mathieu   81694 2008-08-08 22:10 jpeg02.ljpeg
-rw-r--r--  1 mathieu mathieu   81564 2008-08-08 22:10 jpeg01.ljpeg
-rw-r--r--  1 mathieu mathieu   79970 2008-08-08 22:10 jpeg00.ljpeg
</literallayout></para>
</refsection>
</refsection>
<refsection xml:id="gdcmraw_1footnote">
<title>Footnote about JPEG files</title>

<para>It is a common misunderstanding to interchange &apos;JPEG 8bits lossy&apos; with simply JPEG file. The JPEG specification is much broader than simply the common lossy 8bits file (as found on internet).</para>

<para>You can have:</para>

<para><itemizedlist>
<listitem>
<para>JPEG Lossy 8bits </para>
</listitem>
<listitem>
<para>JPEG Lossy 12bits </para>
</listitem>
<listitem>
<para>JPEG Lossless 2-16bits</para>
</listitem>
</itemizedlist>
Those are what is defined in ITU-T T.81, ISO/IEC IS 10918-1.</para>
</refsection>
<refsection xml:id="gdcmraw_1see_also">
<title>SEE ALSO</title>

<para><emphasis role="bold">gdcmdump</emphasis>(1), <emphasis role="bold">gdcmraw</emphasis>(1)</para>
</refsection>
</refentry>