dicomwrite: writing private dicom tags

5 ビュー (過去 30 日間)
Scott Robertson
Scott Robertson 2012 年 5 月 7 日
コメント済み: Walter Roberson 2025 年 3 月 7 日
I am trying to write custom DICOM tags to some images I have generated in matlab. I added the tags to the dicom dictionary, "set" the dicom dictionary, then wrote the dicom image using dicomwrite with 'WritePrivate' set to true. Unfortunately, the dicom file that is written does not have the field set. What am I missing?
  1 件のコメント
Matt J
Matt J 2022 年 6 月 3 日
Same question here.

サインインしてコメントする。

回答 (1 件)

Gautam
Gautam 2025 年 3 月 7 日
Although a custom dictionary is being utilized, it is not being passed into the "dicomwrite" function. Consequently, the function defaults to using the "dicom-dict.mat" file, which is the cause of this issue. To resolve this, you can specify the custom dictionary when calling "dicomwrite" by including the "Dictionary" name-value pair argument in the function call:
dicomwrite(img, out_file, write_meta_struct, CreateMode="Copy", WritePrivate=true, Dictionary=custom_dict);
  1 件のコメント
Walter Roberson
Walter Roberson 2025 年 3 月 7 日
Note that using Name=value syntax was not valid in 2012 when this question was first asked.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDICOM Format についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by