Hi DCMTK members:
I've been trying to do a series of test on DCMJP2K module, which found one file that DCMJP2K module failed to decompress using example program dcmdjp2k.exe under default setup and debug mode:
cannot get marker segment
F: JPEG 2000 codec error: decompressing file: 91_image_0001_1.dcm
I'll send the file with same subject title, mind provide some insight on this specific JPEG2000 format file please? Really appreciated!
Best regards, Roger.
Problem on opening JPEG2000 compressed dicom file using DCMJP2K
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 120
- Joined: Thu, 2009-11-26, 08:15
Hi,
first the bad news:
I can decompress this file with dcmdjp2k without any problem.
However, a warning is printed.
The reason that you can't decompress this file is that it does not conform to the DICOM standard. The DICOM JPEG 2000 transfer syntax requires that just the code stream is put into the dicom file, not the whole file format that the JPEG 2000 standard also specifies. Your file breaks this rule.
The reason that I can decompress this file is that we added support for the file format a while ago (D2ReadStream finds the code stream box and skips everything before it in the file format). In your sample file, the code stream starts 111 bytes into the byte stream. These bytes are simply skipped while decompressing.
first the bad news:
I can decompress this file with dcmdjp2k without any problem.
However, a warning is printed.
The reason that you can't decompress this file is that it does not conform to the DICOM standard. The DICOM JPEG 2000 transfer syntax requires that just the code stream is put into the dicom file, not the whole file format that the JPEG 2000 standard also specifies. Your file breaks this rule.
The reason that I can decompress this file is that we added support for the file format a while ago (D2ReadStream finds the code stream box and skips everything before it in the file format). In your sample file, the code stream starts 111 bytes into the byte stream. These bytes are simply skipped while decompressing.
Who is online
Users browsing this forum: No registered users and 1 guest