Invalid lossless parameters Ss=1 Se=63 Ah=0 Al=0

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
mbransford
Posts: 2
Joined: Thu, 2016-06-02, 13:07

Invalid lossless parameters Ss=1 Se=63 Ah=0 Al=0

#1 Post by mbransford »

Hi,

I have incorporated the libijg8 decompression code into Mayo Clinic's internal (home grown) medical image viewer. Yesterday we encountered a dicom image encoded lossless non-hierarchical 1st order prediction. During decompression the error

Invalid lossless parameters Ss=1 Se=63 Ah=0 Al=0

was produced. I tracked down the origin to the method predict_start_pass in jdpred.c (line 223). Clearly the Se value is illegal (must be = 0) and is the origin of the fatal error. However, the comment indicates that the Se value is not used. I commented out the ERREXIT4 and made a warning in it's place. When I do that and run the jpeg through, it successfully decompresses and produces a displayable image.

My question: if Se is not used when passing through this method (nor Ah), why is there validity check for these two parameters, or is there other paths such that a check would be necessary? I wish to recompile with this as a warning, but I wanted to check to make sure that seemed reasonable.

Note that a vended product Mayo used to use, and that I recently replaced with DCMTK's libijg8/12/16 handle Se=64, so I'm guessing they simply ignored, but of course I cannot see their source code.

Thanks!

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

Re: Invalid lossless parameters Ss=1 Se=63 Ah=0 Al=0

#2 Post by Marco Eichelberg »

The check you mention is part of the original Independent JPEG Group library code (or the lossless patch thereof); this is not really DCMTK code.
My guess is that this is simply a (perhaps unnecessary) consistency check trying to avoid undefined behaviour. You would have to identify the real author of the code (and that code is 20+ years old) to verify or falsify that guess :)

mbransford
Posts: 2
Joined: Thu, 2016-06-02, 13:07

Re: Invalid lossless parameters Ss=1 Se=63 Ah=0 Al=0

#3 Post by mbransford »

Thank you Marco. My testing with simply eliminating the ERREXIT works with all the test images I've found that generated that condition, and I was able to display the decompressed images.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest