[Insight-developers] Some more gdcm issues

Mathieu Malaterre mathieu.malaterre at kitware.com
Fri Feb 17 08:47:34 EST 2006


Bill,

	Ok gdcm dashboards seems ok, so I will merge the updated gdcm 1.2 into 
ITK. It fixes #1 for sure.
	I will need to investigate more on #2 and #3
	And #4 is the bottleneck of gdcm 1.x, this is a very bad design that 
was taken in early development of gdcm. The dictionary can only support 
one VR per DICOM tag. I have started rewriting a gdcm2 which -among 
other things- cope with that. So there is no fix you can do, except 
changing the default to SS instead of US.

	Is it possible you send me your patch, so that I can apply it after the 
merge ? Or do you want to do it yourself ?

Mathieu


Lorensen, William E (GE, Research) wrote:
> Mathieu,
> 
> I found a couple of more problems.
> 
> We have a dicom checker here (unfortunately, it can't be distrbuted). It find a few errors in a dicom that I am generating. The probram I am writting creates new images from input dicom images.
> 
> Here are the errors I get:
> 
> (0x0002,0x0001)  OB  2 [0x1\0x0] # File Meta Information Version
> !! ERROR : value # 1 of element (0x0002,0x0001) is not allowed:
> !!          '0x1'
> !! ERROR : value # 2 of element (0x0002,0x0001) is not allowed:
> !!          '0x0'
> I fixed this by editing gdcmUtil.cxx and changing uint16_t Util::FMIV = 0x0001 to 0x0100
> 
> ------------------------------------------------
> 
> (0x0002,0x0002)  UI  26       [1.2.840.10008.5.1.4.1.1.7]                                 # Media Storage SOP Class UID
> !!                            ERROR : Media Storage SOP Class UID (0x0002, 0x0002) and
> !!                                    SOP Class UID (0x0008, 0x0016) have different values
> 
> I fixed this by removing the 0002|0003 setting in gdcmFileHelper::CheckMandatoryElements. In my application I set them to the same value.
> 
> ------------------------------------------------------------------------------------------
> 
> (0x0002,0x0003)  UI  58       [1.2.826.0.1.3680043.2.1143.36311119732.2006021709565630978]# Media Storage SOP Instance UID
> !!                            ERROR : Media Storage SOP Insatnce UID (0x0002, 0x0003) and
> !!                                    SOP Instance UID (0x0008, 0x0018) have different
> !!                                    values
> 
> We explictiy set these to be the same in itkGDCMImageIO.cxx. gdcmFileHelper is modifiying them. I fixed this by changing the Check mandatory elements method to remove the 0008|0018 setting.
> 
> ----------------------------------------------------------
> 
> (0x0028,0x0120)  US  2        [63536]                                                     # Pixel Padding Value
> !!                            ERROR : Wrong VR. Element (0x0028,0x0120) has a VR : US.
> !!                                    Official VR = SS
> 
> This one I'm stuck on. the gdcm dictionary says the VR for this tag is US. In mu input file it is SS. The standard says it can be either. I assume it should be the same type as the pixel data.
> 
> ------------------------
> 
> Bill
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
> 



More information about the Insight-developers mailing list