[Insight-developers] Conversion DICOM -> JPEG Problem

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Mar 25 14:07:28 EDT 2009


On Wed, Mar 25, 2009 at 6:41 PM, Mario Ciampi <ciampi.mario at gmail.com> wrote:
> Hi,
> I'm trying to convert a DICOM series to JPEG files. I'm able to write JPEG
> files, but the issue is that these ones are coded in 8 bits rather than in
> 16 bits, and thus the quality of JPEG images is poor. I report below the
> code I use to perform the conversion.

There is a general confusion when it comes to saying 'JPEG image'. The
itk::JPEGImageIO will only output 8bits lossy jpeg image (restricted
part of ISO/IEC IS 10918-1). Most application out there (firefox,
gimp...) expects that 'JPEG image' are indeed only the 8bits lossy
variant of the specification. So in short: yes it is possible to write
lossy/lossless JPEG (ISO/IEC IS 10918-1) file but you will not be able
to redistribute them easily.
I would suggest you start looking into J2K where all implementations
that I know of, provide both lossy & lossless and scalar bits support
up 32bits.
Or else you need to redefine your problem/requirements if you really
want to write out 'JPEG image'.

-- 
Mathieu


More information about the Insight-developers mailing list