having trouble decoding an image with dcmdjp2k

Questions regarding other OFFIS DICOM tools

Moderator: Moderator Team

Post Reply
Message
Author
JustSomeGuy
Posts: 56
Joined: Tue, 2007-08-07, 19:31

having trouble decoding an image with dcmdjp2k

#1 Post by JustSomeGuy » Thu, 2017-08-10, 23:27

dcmdjp2k v3.6.1 2016-02-16

I'm having an issue with dcmdjp2k it's giving me an error message failed to transcode.
jpc_dec_decodepkts failed
F: JPEG 2000 codec error: decompressing file:

Code: Select all

D: $dcmtk: dcmdjp2k v3.6.1 2016-02-16 $
D: 
I: reading input file CR.1.2.392.200036.9107.500.304.981.98116030207332.121.001.dcm
D: DcmMetaInfo::checkAndReadPreamble() TransferSyntax="Little Endian Explicit"
D: DcmDataset::read() TransferSyntax="JPEG 2000 (Lossless or Lossy)"
W: DcmItem: Invalid Element (0005,0005) found in data set
W: DcmItem: Invalid Element (0005,0006) found in data set
W: DcmItem: Invalid Element (0005,000b) found in data set
W: DcmSequenceOfItems: Length of item in sequence PixelData (7fe0,0010) is odd
I: decompressing file
D: Found correct SOC marker at the start of the fragment
type = 0xff4f (SOC);
type = 0xff51 (SIZ); len = 41;
caps = 0x00;
width = 2446; height = 2010; xoff = 0; yoff = 0;
tilewidth = 2446; tileheight = 2010; tilexoff = 0; tileyoff = 0;
prec[0] = 16; sgnd[0] = 0; hsamp[0] = 1; vsamp[0] = 1
type = 0xff52 (COD); len = 12;
csty = 0x00;
numdlvls = 8; qmfbid = 1; mctrans = 0
prg = 0; numlyrs = 7;
cblkwidthval = 4; cblkheightval = 4; cblksty = 0x00;
type = 0xff5c (QCD); len = 28;
type = 0xff64 (COM); len = 17;
regid = 1;
data = Kakadu-v5.2.4
type = 0xff64 (COM); len = 276;
regid = 1;
type = 0xff90 (SOT); len = 10;
tileno = 0; len = 64360; partno = 0; numparts = 0
type = 0xff58 (UNKNOWN); len = 23;
00 
81 
07 
82 
36 
86 
58 
92 
6b 
b5 
23 
81 
8b 
77 
81 
fc 
4a 
94 
3c 
87 
21 
type = 0xff93 (SOD);
type = 0xff90 (SOT); len = 10;
tileno = 0; len = 33524; partno = 1; numparts = 0
type = 0xff58 (UNKNOWN); len = 17;
00 
01 
0d 
01 
01 
01 
87 
2f 
ed 
0f 
81 
90 
00 
81 
04 
type = 0xff93 (SOD);
type = 0xff90 (SOT); len = 10;
tileno = 0; len = 98140; partno = 2; numparts = 0
type = 0xff58 (UNKNOWN); len = 19;
00 
01 
0d 
7c 
83 
2b 
8a 
47 
9b 
1b 
cf 
69 
84 
cd 
43 
b6 
76
type = 0xff93 (SOD);
type = 0xff90 (SOT); len = 10;
tileno = 0; len = 196144; partno = 3; numparts = 0
type = 0xff58 (UNKNOWN); len = 20;
00 
01 
01 
28 
15 
83 
11 
98 
03 
81 
88 
58 
85 
c3 
2d 
85 
94 
34 
type = 0xff93 (SOD);
type = 0xff90 (SOT); len = 10;
tileno = 0; len = 98972; partno = 4; numparts = 0
type = 0xff58 (UNKNOWN); len = 17;
00 
01 
0c 
2d 
10 
1e 
81 
07 
9b 
45 
e9 
53 
84 
fd 
74 
type = 0xff93 (SOD);
type = 0xff90 (SOT); len = 10;
tileno = 0; len = 69723; partno = 5; numparts = 0
type = 0xff58 (UNKNOWN); len = 15;
00 
01 
01 
01 
01 
01 
03 
90 
4d 
2a 
84 
8f 
3d 
type = 0xff93 (SOD);
type = 0xff90 (SOT); len = 10;
tileno = 0; len = 88708; partno = 6; numparts = 0
type = 0xff58 (UNKNOWN); len = 18;
00 
01 
01 
01 
81 
07 
3f 
87 
36 
9a 
63 
81 
54 
85 
8f 
2c 
type = 0xff93 (SOD);
jpc_dec_decodepkts failed
F: JPEG 2000 codec error: decompressing file: CR.1.2.392.200036.9107.500.304.981.98116030207332.121.001.dcm
hmmm... it's a bit greek to me, but looks like there is an error in the encapsulated stream.

So. dcmdjp2k is a licensed product. (As far as I've been told)
Do we have the latest version? If not, can i get it? I assume I can not simply build it myself.
As I believe we've for a license can we submit data and see if it is the Kakadu codec to generated bogus j2k or if this is an issue with dcmdjp2k?

I found the minor bugs within the dicom meta data for the invalid sequence length and 'patched' the file but I still get the decode errors at the same point ....

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1292
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

Re: having trouble decoding an image with dcmdjp2k

#2 Post by Marco Eichelberg » Tue, 2017-08-15, 10:54

The dcmdjp2k tool is part of the DCMJP2K library, which is indeed a licensed product that extends DCMTK with JPEG 2000 support.
The latest version is 3.6.2 (just as for the toolkit), but I don't think that any change to the JPEG 2000 decoder has taken place since the release mentioned in your post.
The error message comes from the JPEG 2000 decoder and complains about an invalid JPEG 2000 bitstream.
I have seen another one or two examples of JPEG 2000 encoded images compressed with Kakadu that cannot be decoded with JasPer (which is the implementation in DCMJP2K) and several other JPEG 2000 libraries.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest