Note that there are some explanatory texts on larger screens.

plurals
  1. POC#: Decoding JPEG images with 12-bit precision using Silverlight FJCore library?
    primarykey
    data
    text
    <p>In my C# Silverlight application, I am trying to decode DICOM images in compressed JPEG transfer syntax, using the <a href="http://code.google.com/p/fjcore/" rel="nofollow noreferrer">FJCore</a> class library.</p> <p>The DICOM images are normally compressed with 12-bit precision. When trying to decode such an image using the original FJCore source code, I get an exception saying "Unsupported codec type", because in the original FJCore implementation only SOF0 (Baseline DCT) and SOF2 (Progressive DCT) Start-of-Frame markers are supported. If I change the implementation to also accept the SOF1 marker (Extended Sequential DCT) and treat SOF1 frames the same way as SOF0 frames, the images are decoded, but only 8 bits are accounted for.</p> <p>A typical 12-bit precision image now looks like this after decoding with the modified FJCore library:</p> <p><img src="https://i.stack.imgur.com/3yq64.png" alt="12-bit precision JPEG image encoded to 8-bit precision by FJCore"></p> <p>Ideally, the image should look like this:</p> <p><img src="https://i.stack.imgur.com/c0AAp.png" alt="12-bit precision JPEG image encoded to full 12-bit precision"></p> <p>As far as I have been able to tell from the FJCore implementation, the image precision is recorded in the JpegFrame class, but it is never used. The original FJCore implementation seems to only fully support grayscale images with 8 bit precision.</p> <p>I am planning to "take the bull by the horns" and try to extend FJCore myself to support 12-bit precision for grayscale images. But before I do, I thought I should pose the question here in StackOverflow to see if anyone has encountered and solved this problem before? In that case, I would be very happy to learn how you solved the problem.</p> <p>Many thanks in advance!<br> Anders @ Cureos</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload