DICOM private fields not written correctly with custom dicomdict
8 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Jayanti
2025 年 8 月 21 日
編集済み: Jayanti
2025 年 8 月 21 日
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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!