[Dcmlib] Problem of parsing :Hopeless !

Mathieu Malaterre mathieu.malaterre at kitware.com
Tue Jan 24 16:15:39 CET 2006


 From PS5: "THE ENTIRE DATASET"...ouch !

Mathieu

A.5 DICOM DEFLATED LITTLE ENDIAN TRANSFER SYNTAX (EXPLICIT VR)

This Transfer Syntax applies to the encoding of the entire DICOM Data Set.

The entire Data Set is first encoded according to the rules specified in 
Section A.2 DICOM Little Endian Transfer Syntax (Explicit VR). The 
entire byte stream is then compressed using the "Deflate" algorithm 
defined in Internet RFC 1951.
Notes: 1. The Pixel Data (7FE0,0010) is not handled in any special 
manner. The pixel data is first encoded as sequential uncompressed 
frames without encapsulation, and then is handled as part of the byte 
stream fed to the "deflate" compressor in the same manner as the value 
of any other attribute. 2. This transfer syntax is particularly useful 
for compression of objects without pixel data, such as structured 
reports. It is not particularly effective at image compression, since 
any benefit obtained from compressing the non-pixel data is offset by 
less effective compression of the much larger pixel data. 3. A freely 
available reference implementation of the "deflate" compressor may be 
found in the zlib package, which may be downloaded from 
ftp://ftp.uu.net/pub/archiving/zip/zlib/.

In order to facilitate interoperability of implementations conforming to 
the DICOM Standard which elect to use this Transfer Syntax, the 
following policy is specified:

  Any implementation which has elected to support the Deflated Explicit 
VR Little Endian Transfer Syntax for any Abstract Syntax, shall also 
support the Explicit VR Little Endian Transfer for that Abstract Syntax
Notes: 1.This requirement to support the (uncompressed) Explicit VR 
Little Endian Transfer Syntax is in order to ensure full-fidelity 
exchange of VR information in the case that the Association Acceptor 
does not support the Deflated Explicit VR Little Endian Transfer Syntax. 
The requirement specified in Section 10.1 of this part, that the Default 
Implicit VR Little Endian Transfer Syntax be supported by all 
implementations except those that only have access to lossy compressed 
pixel data, is not waived. In otherwords, an implementation must support 
all three transfer syntaxes. 2. There are no such "baseline" 
requirements on media, since such requirements are at the discretion of 
the Media Application Profile. Furthermore, sufficient object 
"management" information should be present in the DICOMDIR even if an 
individual application cannot decompress an instance encoded with the 
deflated transfer syntax.

This DICOM Deflated Explicit VR Little Endian Transfer Syntax shall be 
identified by a UID of Value "1.2.840.10008.1.2.1.99".


Jean-Pierre Roux wrote:
> Mathieu.
> 
> I give up !
> The header is just a mess :-(
> Have a look a the output of hexedit vs the output of PrintFile/
> gdcm Parser does the job correctly.
> The problem comes from the header is *not* correct at all.
> The supposed to be DataElement *5ae4|707d *has *no* Explicit VR, 
> therefore its length *is* x(3f75d754).
> It looks like a part of the header vanished at write time ...
> Could you tell it to David Clunie.
> Thx
> JP
> 
> D 0002|0000 lg :        x(4)        4 Off.:       x(8c)      140 
> [UL]                           [Group Length] [170]
> D 0002|0001 lg :        x(2)        2 Off.:       x(9c)      156 
> [OB]          [File Meta Information Version] [gdcm::Binary data 
> loaded;length = 2]
> D 0002|0002 lg :       x(1e)       30 Off.:       x(a6)      166 
> [UI]            [Media Storage SOP Class UID] 
> [1.2.840.10008.5.1.4.1.1.9.2.1 ]  ==>      [Hemodynamic Waveform Storage]
> D 0002|0003 lg :       x(14)       20 Off.:       x(cc)      204 
> [UI]         [Media Storage SOP Instance UID] [1.3.6.1.4.1.6018.1.1]
> D 0002|0010 lg :       x(16)       22 Off.:       x(e8)      232 
> [UI]                    [Transfer Syntax UID] [1.2.840.10008.1.2.1.99]  
> ==>        [Deflated Explicit VR - Little Endian]
> D 0002|0012 lg :       x(12)       18 Off.:      x(106)      262 [UI  
>               [Implementation Class UID] [1.3.6.1.4.1.5962.2]
> D 0002|0013 lg :        x(a)       10 Off.:      x(120)      288 
> [SH]            [Implementation Version Name] [DCTOOL100 ]
> D 0002|0016 lg :        x(8)        8 Off.:      x(132)      306 
> [AE]        [Source Application Entity Title] [CLUNIE1 ]
> D *5ae4|707d* lg :  x(3f75d754) 1064687444 Off.:   x(142)      322 [  
> ]                       [gdcm::Unknown] [gdcm::NotLoaded]
> 
> 00000080   44 49 43 4D  02 00 00 00  55 4C 04 00  AA 00 00 00  
> DICM....UL......
> 00000090   02 00 01 00  4F 42 00 00  02 00 00 00  00 01 02 00  
> ....OB..........
> 000000A0   02 00 55 49  1E 00 31 2E  32 2E 38 34  30 2E 31 30  
> ..UI..1.2.840.10
> 000000B0   30 30 38 2E  35 2E 31 2E  34 2E 31 2E  31 2E 39 2E  
> 008.5.1.4.1.1.9.
> 000000C0   32 2E 31 00  02 00 03 00  55 49 14 00  31 2E 33 2E  
> 2.1.....UI..1.3.
> 000000D0   36 2E 31 2E  34 2E 31 2E  36 30 31 38  2E 31 2E 31  
> 6.1.4.1.6018.1.1
> 000000E0   02 00 10 00  55 49 16 00  31 2E 32 2E  38 34 30 2E  
> ....UI..1.2.840.
> 000000F0   31 30 30 30  38 2E 31 2E  32 2E 31 2E  39 39 02 00  
> 10008.1.2.1.99..
> 00000100   12 00 55 49  12 00 31 2E  33 2E 36 2E  31 2E 34 2E  
> ..UI..1.3.6.1.4.
> 00000110   31 2E 35 39  36 32 2E 32  02 00 13 00  53 48 0A 00  
> 1.5962.2....SH..
> 00000120   44 43 54 4F  4F 4C 31 30  30 20 02 00  16 00 41 45  DCTOOL100 
> ....AE
> 00000130   08 00 43 4C  55 4E 49 45  31 20 *E4 5A  7D 70* 54 D7  
> ..CLUNIE1 .Z}pT.
> 00000140   75 3F FB B4  88 F5 46 96  17 81 65 45  C6 F8 45 26  
> u?....F...eE..E&
> 00000150   84 61 CC 76  B5 FA 40 50  E2 41 48 02  44 85 A4 48  
> .a.v.. at P.AH.D..H
> 00000160   8B 62 33 1E  82 30 F2 80  07 63 55 96  3D 1E 9A 50  
> .b3..0...cU.=..P
> 00000170   DB CD 87 43  1C 86 A1 AE  ED F1 10 17  63 EA 3A D8  
> ...C........c.:.
> 00000180   25 84 52 E2  32 C4 A5 0C  65 18 A2 51  55 57 C1 84  
> %.R.2...e..QUW..
> 00000190   60 82 55 55  96 65 59 56  D7 62 59 8B  D5 3B FD 9D  
> `.UU.eYV.bY..;..
> 000001A0   F3 DE 4A FB  56 72 CB DF  81 9D A7 7D  EF F7 CE 3D  
> ..J.Vr.....}...=
> 000001B0   F7 DC F3 75  CF 3D 8B 8F  72 A8 B2 DC  47 E1 50 28  
> ...u.=..r...G.P(
> 000001C0   54 18 0A 15  F9 68 26 45  D6 64 52 61  69 49 49 E1  
> T....h&E.dRaiII.
> 000001D0   62 1F E5 D2  DA EA 39 54  18 0C 07 CB  8A 43 41 50  
> b.....9T.....CAP
> 000001E0   84 CA 82 25  C1 C2 60 31  AE C2 E0 62  E0 85 E4 A3  
> ...%..`1...b....
> 000001F0   3C 50 E5 82  AA 28 58 EA  BC 2B 0D 15  96 E1 71 F1  
> <P...(X..+....q.
> 00000200   62 F0 30 75  86 42 DC 17  86 C3 98 E1  9E B4 E7 AF  
> b.0u.B..........
> 00000210   A7 3D 2F A0  CA 48 F6 F8  33 E6 5C 14  02 97 90 2D  
> .=/..H..3.\....-
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Dcmlib mailing list
> Dcmlib at creatis.insa-lyon.fr
> http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib




More information about the Dcmlib mailing list