[Insight-users] Reading compressed DICOM files

Bing Jian bing.jian at gmail.com
Wed Dec 24 19:15:39 EST 2008


Hi Mathieu,

   Thanks a lot for your quick response. I am using ITK CVS however it has
not been updated for a while
(maybe more than 2 months). Seems I have to update it later since I am not
able to connect to
www.itk.org:2401 now (is the cvs server for ITK down now?).  The link to the
old post regarding the
dicom compression was wrong,  it should be this post
   http://www.itk.org/pipermail/insight-users/2007-January/020481.html

I will also look at the gdcm info you point to me.

Thanks again,
Bing


On Wed, Dec 24, 2008 at 7:01 PM, Mathieu Malaterre <
mathieu.malaterre at gmail.com> wrote:

> Bing,
>
> On Thu, Dec 25, 2008 at 12:45 AM, Bing Jian <bing.jian at gmail.com> wrote:
> > Hi all,
> >
> >     I have some dicom files that are probably in compressed format as
> they
> > are
> > much smaller than other files of same slice size (512x512x1) in the same
> > folder
> > and there is a tag (0008,2111) called derivative description found in
> these
> > files with value
> > "Compress BN JPEG Lossless".
>
> The safest way to check whether the image is compressed or not, is
> check the transfer syntax.
> See gdcminfo for example
> (
> http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=GDCM_Release_2.0
> )
>
> > The problem I encountered is that when reading
> > these files using itk::GDCMImageIO, I receive the following message:
> >
> >        "Must downscale data from 16 bits to 12"
>
> :(
>
> > To make things worse, sometimes my program aborts when trying to access
> data
> > read
> > from these files or it returns the wrong intensity values. However I am
> able
> > to read
> > these files using MATLAB and other programs. Below is the dicom reading
> part
> > of my ITK code which is based on
> >
> ...
> >
> > The same code works well for other uncompressed dicom files in the same
> > folder.
> > I found similar questions have been asked in the mailing list, for
> example,
> >   http://www.cmake.org/pipermail/insight-users/2007-April/021955.html
>
> That's not a question, that's an example on how to *write* compressed
> DICOM file.
>
> > However, in my case, adding
> >     dicomIO->UseCompressionOn();
> >     dicomIO->SetCompressionType(itk::GDCMImageIO::JPEG2000); // I also
> tried
> > JPEG
> >  does not solve the problem.
> >
> >
> > I guess I must have missed some obvious solution and would appreciate any
> > clue that will help me out.
> > Many thanks in advance and wish you all have a great holiday!
>
> You may be suffering from the bug that I recently closed in gdcm
> 1.2.5, which is merged in ITK CVS. You have a couple of options:
>
> - Switch to ITK CVS
> - Use a system gdcm 2.x :
> http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=GDCM_Release_2.0
> and relink ITK  to this one instead.
> - Use a system gdcm 1.2.5, and relink ITK  to use this one instead.
>
> By 'system', I mean that you have to start cmake again, turn advanced
> option on and select ITK_USE_SYSTEM_GDCM:ON, you'll be guided from
> there.
>
> Ref:
> http://www.itk.org/pipermail/insight-users/2008-December/028289.html
>
> HTH
> --
> Mathieu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081224/c8537bdf/attachment.htm>


More information about the Insight-users mailing list