Closed IvanKosik closed 3 years ago
These files are missing required meta-header information described in DICOM Part 10 Table 7.1-1.
The vtk-dicom parser checks for tag (0002,0000) after the DICM magic number, but in these files, tag (0002,0000) is missing:
==== T1w/Image-1.dcm ====
(0002,0010) UI "TransferSyntaxUID" : [1.2.840.10008.1.2] {Implicit VR Little Endian} (18 bytes)
Compare this to a file that contains all the required group 0002 tags:
==== CT/IM-0001-0001.dcm ====
(0002,0000) UL "FileMetaInformationGroupLength" : [192] (4 bytes)
(0002,0001) OB "FileMetaInformationVersion" : [...] (2 bytes)
(0002,0002) UI "MediaStorageSOPClassUID" : [1.2.840.10008.5.1.4.1.1.2] {CT Image Storage} (26 bytes)
(0002,0003) UI "MediaStorageSOPInstanceUID" : [1.8.14.2.11.5.1.4.64300.30000016062300133422200000850] (56 bytes)
(0002,0010) UI "TransferSyntaxUID" : [1.2.840.10008.1.2.1] {Explicit VR Little Endian} (20 bytes)
(0002,0012) UI "ImplementationClassUID" : [1.8.14.2.11.5.99.8] (20 bytes)
It's unfortunate that they released DICOM files that don't conform to the standard, possibly they were overzealous when doing the anonymization. You can fix them by loading them and then saving them from any DICOM software. Or you can use gdcmconv to regenerate them:
gdcmconv --raw Image-1.dcm Image-1.dcm
The place where vtk-dicom checks for tag (0002,0000) is vtkDICOMUtilities::IsDICOMFile(), around line 401:
Thanks a lot for the detailed answer. I have used gdcmconv to regenerate these files and was able to read them correctly using vtkDICOMDirectory. I think this issue can be closed.
I'm trying to open DICOM data from the competition https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/data That data do not have DICOMDIR file. It's just folders with *.dcm-files. To open our other DICOMs (even without DICOMDIR files) we have used such code and all works good:
But DICOMs from this competition (e.g. in folder test\00001\T1w) print: NumberOfPatients: 0 NumberOfStudies: 0 NumberOfSeries: 0
But e.g. Mango application (http://ric.uthscsa.edu/mango/mango.html) can open them correctly.
Attached one folder from that competition with DICOM images: T1w.zip
I'm using VTK-9.0.3 with vtk-dicom of last release version 0.8.12 (cmaked and builded with VTK). GIT_TAG 324057367c4c1390ed51f0a9bc2000c254d4e811 vtk-dicom release 0.8.12 plus bug fixes
P.S. Thanks for the great library!