[Dcmlib] [Gdcm2] Problem on DICOM images written by ITK GDCM

jiafucang jiafucang at asisz.com
Wed Nov 22 09:51:23 CET 2006


Hi, Jean, Mathieu,

I downloaded GDCM CVS from www.creatis.insa-lyon.fr and compiled it
and use ReWrite to convert my original DICOM generated from ITK and
it can be read by XMedcon and MIPAV. Thank you!

I use ITK CVS , which use GDCM 1.2.2 found in its header, I have not 
revised the code, so GDCM 1.2.2 seems to have problems when generate
DICOM data? I am not sure it is due to programming or other reason.

As to the generated DICOM field, I have not use
seriesWriter->SetImageIO( gdcm );
but use
seriesWriter->SetMetaDataDictionaryArray( 
                        reader->GetMetaDataDictionaryArray() );
So the revision does not function.


When I try to build ITK with GDCM built separately, which failed because
of AddSeriesRestriction function in gdcmSerieHelper,
In file included from /cygdrive/j/vtk5.0/fMRIRGB2DICOM/fMRI2DICOM.cpp:7:
/cygdrive/j/vtk5.0/Insight/Code/IO/itkGDCMSeriesFileNames.h: In member function
   `void itk::GDCMSeriesFileNames::AddSeriesRestriction(const std::string&)':
/cygdrive/j/vtk5.0/Insight/Code/IO/itkGDCMSeriesFileNames.h:157: error: no
   matching function for call to `gdcm::SerieHelper::AddRestriction(const
   std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
/cygdrive/e/toolkit/gdcm/src/gdcmSerieHelper.h:119: error: candidates are: void
   gdcm::SerieHelper::AddRestriction(const gdcm::TagKey&)
/cygdrive/e/toolkit/gdcm/src/gdcmSerieHelper.h:120: error:                 void
   gdcm::SerieHelper::AddRestriction(const gdcm::TagKey&, const std::string&,
   int)
/cygdrive/e/toolkit/gdcm/src/gdcmSerieHelper.h:122: error:                 void
   gdcm::SerieHelper::AddRestriction(short unsigned int, short unsigned int,
   const std::string&, int)

So if the GDCM version is made compatible with ITK CVS, then the DICOM
writting can be made correctly.

Finally I diff the bad and good DICOM tag info,
1c1
< (0002|0000) Group Length = 230
---
> (0002|0000) Group Length = 228
4,7c4,7
< (0002|0003) Media Storage SOP Instance UID = 1.2.826.0.1.3680043.2.1143.50923884990.2006112011043311984
< (0002|0010) Transfer Syntax UID = 1.2.840.10008.1.2.1
< (0002|0012) Implementation Class UID = 1.2.826.0.1.3680043.2.1143.50923884990.2006112011043311986
< (0002|0013) Implementation Version Name = ITK/GDCM 1.2.2
---
> (0002|0003) Media Storage SOP Instance UID = 1.2.826.0.1.3680043.2.1143.50923884990.20061122145456843.00
> (0002|0010) Transfer Syntax UID = 1.2.840.10008.1.2
> (0002|0012) Implementation Class UID = 1.2.826.0.1.3680043.2.1143.50923884990.20061122145456843.69
> (0002|0013) Implementation Version Name = GDCM 1.3.1
10,11c10,11
< (0008|0012) Instance Creation Date = 20061120
< (0008|0013) Instance Creation Time = 110433
---
> (0008|0012) Instance Creation Date = 20061122
> (0008|0013) Instance Creation Time = 145456
13c13
< (0008|0018) SOP Instance UID = 1.2.826.0.1.3680043.2.1125.1.50923884990.2006112011043311913
---
> (0008|0018) SOP Instance UID = 1.2.826.0.1.3680043.2.1143.50923884990.20061122145456843.00
103d102
< (7fe0|0000) Group Length = 196620

Maybe (0002|0000) and (7fe0|0000) difference is important to compatibility?

Thank you very much!
Fucang




发件人: Jean-Pierre Roux
发送时间: 2006-11-21 18:57:43
收件人: jiafucang at asisz.com; Mathieu Malaterre; jpr
抄送: 
主题: Re: [Gdcm2] Problem on DICOM images written by ITK GDCM

Hi, Fucang.

On your original image (0070.dcm), xmedcon warned about  "Tag with uneven
length" (there are a lot ...), and errored with "No Image found".
I don't understand this message, since Group 7FE0 exists ...

Probabely there's a bug in the gdcm version used by your ITK ?
(Why do you post on gdcm2 list? I though ITK used gdcm1.2 ? Did they change?)

I read your image, and I rewrote it with a C++ gdcm1.3.1 based program  
(supposed to produce bug-free images)
Now, it's xmedcon readable (see attached image).

Another thing I don't understand, is the values of some Dicom fields of
your image, that don't correspond to the ones you set in your c++ program
(Patient name, orientation, etc)

-- > Mathieu.

Do ITK still uses gdcm1.2.2, or did you make any change?

Jean-Pierre Roux,
from gdcm team.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/dcmlib/attachments/20061122/c42ef5ad/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- next part --------------
_______________________________________________
Gdcm-developers mailing list
Gdcm-developers at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gdcm-developers


More information about the Dcmlib mailing list