Lossless JPEG on RadWorks

Lossless JPEG on RadWorks

Post by Ken Sutherlan » Thu, 26 Oct 2000 04:00:00



I'm developing a tool to compress DICOM images with Lossless JPEG. The
images have to be viewable on RadWorks 5.0.

My tool is based on the IJG source.

It worked for 24-bit color, 8 and 12-bit gray, but it was not working on 16
bit gray.

It seemed to be barfing on negative values.

My first idea was to shift all the values so that the values are in the
range 0 .. max, and set the Rescale Intercept value to get the original
values back when viewing.

This didn't seem to work very well, but if I shift one more, so the values
are in the range 1 .. max+1 then it works great!

This makes me feel good, but can anyone explain why? I'd rather not shift
the pixel values at all, if possible.

I can decode and display unshifted signed values with my own tool no
problem, it is just getting RadWorks to display the images that is giving me
trouble.

I have the feeling that RadWorks is using the PICTools from Pegasus for
their Lossless JPEG routine.

Thanks!

------------------
Ken Sutherland

http://www.j-mac.co.jp/
http://www.voicenet.co.jp/~ken

 
 
 

Lossless JPEG on RadWorks

Post by HAPO » Fri, 27 Oct 2000 02:19:08


Dear Ken ,

You are Right !
You can find the "Applicare" on the customer list of Pegasus !

^_^

HAPO

 
 
 

Lossless JPEG on RadWorks

Post by ssm.. » Thu, 02 Nov 2000 04:25:55




> I'm developing a tool to compress DICOM images with Lossless JPEG. The
> images have to be viewable on RadWorks 5.0.

> My tool is based on the IJG source.

> It worked for 24-bit color, 8 and 12-bit gray, but it was not working on 16
> bit gray.

> It seemed to be barfing on negative values.

> My first idea was to shift all the values so that the values are in the
> range 0 .. max, and set the Rescale Intercept value to get the original
> values back when viewing.

> This didn't seem to work very well, but if I shift one more, so the values
> are in the range 1 .. max+1 then it works great!

> This makes me feel good, but can anyone explain why? I'd rather not shift
> the pixel values at all, if possible.

> I can decode and display unshifted signed values with my own tool no
> problem, it is just getting RadWorks to display the images that is giving me
> trouble.

> I have the feeling that RadWorks is using the PICTools from Pegasus for
> their Lossless JPEG routine.

> Thanks!

> ------------------
> Ken Sutherland

> http://www.j-mac.co.jp/
> http://www.voicenet.co.jp/~ken

Ken,

        You say your code is based on the IJG source?  I don't believe that
IJG provides a lossless component to their standard JPEG source code.  There
are a number of other places that you can obtain lossless JPEG code, however,
in the early days some developers misread the documentation and encoded
16-bit lossless images improperly.  Specifically the code for -32768 was
encoded using an extra 16 bits which messed up the subsequent code stream.
Unfortunatly, this code and images created with this code have proliferated.
Since -32768 often comes at the start of the image (in fact whenever a 16-bit
image starts with a pure black pixel), the entire code stream is bad.  The
Pegasus code does correctly handle this case.  To fix this get the Pegasus
code!  The Pegasus code also comes with a switch to manually or automatically
ignore the extra bits in images that have this problem. You can use this code
to verify that the problem you have is due to this improper 16-bit code.

        Steve Mann
        Pegasus Imaging Corp.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. Lossless JPEG on RadWorks

I'm developing a tool to compress DICOM images with Lossless JPEG. The
images have to be viewable on RadWorks 5.0.

My tool is based on the IJG source.

It worked for 24-bit color, 8 and 12-bit gray, but it was not working on 16
bit gray.

It seemed to be barfing on negative values.

My first idea was to shift all the values so that the values are in the
range 0 .. max, and set the Rescale Intercept value to get the original
values back when viewing.

This didn't seem to work very well, but if I shift one more, so the values
are in the range 1 .. max+1 then it works great!

This makes me feel good, but can anyone explain why? I'd rather not shift
the pixel values at all, if possible.

I can decode and display unshifted signed values with my own tool no
problem, it is just getting RadWorks to display the images that is giving me
trouble.

I have the feeling that RadWorks is using the PICTools from Pegasus for
their Lossless JPEG routine.

Thanks!

------------------
Ken Sutherland

http://www.j-mac.co.jp/
http://www.voicenet.co.jp/~ken

2. command line JFS format

3. Is JPEG 2000 lossless really a "data lossless" compression?

4. How do I get FP2000 to.... ?

5. Lossless JPEG

6. running C code under matlab

7. Bugs in Cornell Lossless Jpeg library

8. Lossless JPEG

9. JPEG Lossless encoding/decoding

10. Best JPEG-LS (lossless) implementation

11. fastest lossless JPEG - Press Release

12. Lossless JPEG