changing dicom-dict.txt has no effect

조회 수: 8 (최근 30일)
Cameron Starling
Cameron Starling 2022년 1월 11일
댓글: Simon Chan 2022년 1월 11일
Hi,
I have MR images with a large amount of dicom private tags. I have copied and edited the dicom-dict.txt file to include as the final line
(2005,10A9) UT DistortionCorrection 1
and saved this as dicom-dict-copy.txt, which I had to manually import into the toolbox folder given the permissions on my pc.
I set dicom-dict-copy.txt as the new dictionary using dicomdict('set',filepath)
this is confirmed with dicomdict('get') = 'C:\Program Files\MATLAB\R2021b\toolbox\images\iptformats\dicom-dict-copy.txt'
However, the tag I have set is not recognised when i call inf.DistortionCorrection (inf = dicominfo(image)). Does anyone know why this does not work?

채택된 답변

Simon Chan
Simon Chan 2022년 1월 11일
You may refer to the following and try to create a new DICOM tag and write it to a new DICOM image.
After that, the DICOM header in the new image should contains your required information.
filename = 'Original.dcm';
I = dicomread(filename);
header = dicominfo(filename);
header.(dicomlookup('2005', '10A9'))='1';
newname = 'New.dcm';
dicomwrite(I,newname,header,'CreateMode','copy','WritePrivate',true);
new_header = dicominfo(newname);
  댓글 수: 4
Cameron Starling
Cameron Starling 2022년 1월 11일
Brilliant, thanks very much. I am now able to access the information I'm after. I will need to revisit the topic of editing the dicom dictionary though. I'm sure this will be handy in the future.
Simon Chan
Simon Chan 2022년 1월 11일
Great! Please accept the answer if you feel it useful.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Read and Write Image Data from Files에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by