Hi Mathieu,<br><br> Thanks a lot for your quick response. I am using ITK CVS however it has not been updated for a while<br>(maybe more than 2 months). Seems I have to update it later since I am not able to connect to<br>
<a href="http://www.itk.org:2401">www.itk.org:2401</a> now (is the cvs server for ITK down now?). The link to the old post regarding the <br>dicom compression was wrong, it should be this post <br> <a href="http://www.itk.org/pipermail/insight-users/2007-January/020481.html">http://www.itk.org/pipermail/insight-users/2007-January/020481.html</a><br>
<br>I will also look at the gdcm info you point to me.<br> <br>Thanks again,<br>Bing<br><br><br><div class="gmail_quote">On Wed, Dec 24, 2008 at 7:01 PM, Mathieu Malaterre <span dir="ltr"><<a href="mailto:mathieu.malaterre@gmail.com">mathieu.malaterre@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Bing,<br>
<div class="Ih2E3d"><br>
On Thu, Dec 25, 2008 at 12:45 AM, Bing Jian <<a href="mailto:bing.jian@gmail.com">bing.jian@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I have some dicom files that are probably in compressed format as they<br>
> are<br>
> much smaller than other files of same slice size (512x512x1) in the same<br>
> folder<br>
> and there is a tag (0008,2111) called derivative description found in these<br>
> files with value<br>
> "Compress BN JPEG Lossless".<br>
<br>
</div>The safest way to check whether the image is compressed or not, is<br>
check the transfer syntax.<br>
See gdcminfo for example<br>
(<a href="http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=GDCM_Release_2.0" target="_blank">http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=GDCM_Release_2.0</a>)<br>
<div class="Ih2E3d"><br>
> The problem I encountered is that when reading<br>
> these files using itk::GDCMImageIO, I receive the following message:<br>
><br>
> "Must downscale data from 16 bits to 12"<br>
<br>
:(<br>
<br>
> To make things worse, sometimes my program aborts when trying to access data<br>
> read<br>
> from these files or it returns the wrong intensity values. However I am able<br>
> to read<br>
> these files using MATLAB and other programs. Below is the dicom reading part<br>
> of my ITK code which is based on<br>
><br>
</div><div class="Ih2E3d">...<br>
><br>
> The same code works well for other uncompressed dicom files in the same<br>
> folder.<br>
> I found similar questions have been asked in the mailing list, for example,<br>
> <a href="http://www.cmake.org/pipermail/insight-users/2007-April/021955.html" target="_blank">http://www.cmake.org/pipermail/insight-users/2007-April/021955.html</a><br>
<br>
</div>That's not a question, that's an example on how to *write* compressed<br>
DICOM file.<br>
<div class="Ih2E3d"><br>
> However, in my case, adding<br>
> dicomIO->UseCompressionOn();<br>
> dicomIO->SetCompressionType(itk::GDCMImageIO::JPEG2000); // I also tried<br>
> JPEG<br>
> does not solve the problem.<br>
><br>
><br>
> I guess I must have missed some obvious solution and would appreciate any<br>
> clue that will help me out.<br>
> Many thanks in advance and wish you all have a great holiday!<br>
<br>
</div>You may be suffering from the bug that I recently closed in gdcm<br>
1.2.5, which is merged in ITK CVS. You have a couple of options:<br>
<br>
- Switch to ITK CVS<br>
- Use a system gdcm 2.x :<br>
<a href="http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=GDCM_Release_2.0" target="_blank">http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=GDCM_Release_2.0</a><br>
and relink ITK to this one instead.<br>
- Use a system gdcm 1.2.5, and relink ITK to use this one instead.<br>
<br>
By 'system', I mean that you have to start cmake again, turn advanced<br>
option on and select ITK_USE_SYSTEM_GDCM:ON, you'll be guided from<br>
there.<br>
<br>
Ref:<br>
<a href="http://www.itk.org/pipermail/insight-users/2008-December/028289.html" target="_blank">http://www.itk.org/pipermail/insight-users/2008-December/028289.html</a><br>
<br>
HTH<br>
--<br>
<font color="#888888">Mathieu<br>
</font></blockquote></div><br>