[Insight-users] Re: Problem with lossless JPEG compression in GDCMImageIO

Pechin Lo pechin at gmail.com
Mon Sep 24 17:50:05 EDT 2007


After some tweaking around, I found out that JPEG compression works provided
that the minimum difference between two pixels is 2.
For example, if I have an image that only consists of n and n+1, the saved
image will only contains the value n.
However, if the image consists of value n and n+2, then the saved image will
contains both n and n+2.
In other words, the image will stores fine if I multiply it by a factor of
2.

Can someone please tell me why is this happening?
By the way, the my pixel is of type short, is there any possibility that
this is the reason for this weird phenomena?


On 9/24/07, Pechin Lo <pechin at gmail.com> wrote:
>
> Hi,
>
> I've been using ITK to load and write DICOM files for quite sometime and
> is quite happy with it. Recently however I try to write volumetric DICOM
> files using JPEG format, and for some reason I found out that the original
> information and the saved information is not the same. For some strange
> reason, random voxels/pixels in the saved image have +1 in intensity ( the
> rest are the same as the original image).
>
> There doesn't seem to be any problem with my code, as when I switch the
> compression to JPEG2000, the whole thing works just fine, that is the
> difference between original image and the saved image is 0.
>
> Anyone have any idea what is wrong here?
>
> Thanks.
>
> Pechin



Pechin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070924/693d3b8a/attachment.html


More information about the Insight-users mailing list