DICOM private fields not written correctly with custom dicomdict
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I've created a dicom dict text file that contains (among other things) a floating point private tag (9003,1038).
>> current_dicom_dict = dicomdict('get_current')
current_dicom_dict =
'/Users/brian/apps/copilot/share/dicom-dict-cp.txt'
>> !cat /Users/brian/apps/copilot/share/dicom-dict-cp.txt | tail -n 1
(9003,1038) FL DaysSincePriorStudy 1
The value of this tag is correctly set in the metadata struct:
>> metadata_out.Private_9003_1038
ans =
single
24.3231
I write the file with DICOMWRITE and read the file metadata back in with DICOMINFO:
dicomwrite(dat, 'test.dcm', metadata_out, 'CreateMode', 'copy', 'WritePrivate', 1);
metadata_in = dicominfo('test.dcm');
The metadata that I read back in failed to parse the private field correctly:
>> metadata_in.Private_9003_1038
ans =
4×1 uint8 column vector
176
149
194
65
Why is my private field not parsed correctly by DICOMINFO?
0 commentaires
Réponses (1)
Jayanti
le 21 Août 2025 à 9:23
Modifié(e) : Jayanti
le 21 Août 2025 à 9:25
Hi Brian,
It looks like the issue might be due to the fact that "dicominfo" is not using your custom DICOM dictionary when reading the file back.
So before calling "dicominfo", set your custom dictionary like below:
dicomdict('set', current_dicom_dict);
For more details please refer to the below offical documentation link on "dicomdict":
0 commentaires
Voir également
Catégories
En savoir plus sur Read and Write Image Data from Files dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!