[Insight-users] GDCM : so many differences

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Jul 17 10:37:48 EDT 2006


Salut Marc,

Marc Op De Beeck wrote:
> Hi,
> 
> I've, there are problems with the gdcm library : I did compare dicom 
> header (with dicominfo from matlab) of the same dicom image before and 
> after beeing read and written by GDCM.
> all the private fields have disappeared, the bit coding too (from 12 on 
> 16 to 16 on 16),etc ...

There are multiple things here:
* Loading values from the private dictionary is IMHO very dangerous. 
Indeed vendors store information in a different way than the public 
dictionary. So most of the time the information is duplicated, therefore 
what happen if you change an atttribute of the image but we rewrite the 
private field unchanged. I do not know how PACS system will handle this 
case: should it pick the public one or the equivalent private one ?
To simplify the problem, we simply do not load unknown(*) fields.

* For 12bits data. ITK templates the Pixel type over a regular c++ type: 
char, uchar, short, ushort... Therefore one cannot represent 12bits data 
in ITK. The easy work around is simply to use the next pixel size up 
(16bits).

In any case, I don't see exactly where is the problem. Is your goal 
simply to produce DICOM images from a template source. If so I'd suggest 
accessing the gdcm code itself rather than through the ITK-gdcm API.

> I wanted to send you the samples, but they are too big for the bot, it 
> refuses. Let me know, please, if you need more.

If you need to send me DICOM dataset you can use this link:
http://www.kitware.com/KitwareScripts/uploadfile.cgi


HTH
Mathieu
(*) You can load private field in ITK if and only if you describe them 
in gdcm internal dictionary. In this case they will be recognized and 
loaded.


More information about the Insight-users mailing list