[Insight-developers] Some more gdcm issues

Lorensen, William E (GE, Research) lorensen at crd.ge.com
Fri Feb 17 12:28:04 EST 2006


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


More information about the Insight-developers mailing list