Making a cell array of DICOM headers.

3 ビュー (過去 30 日間)
joseph Mole
joseph Mole 2019 年 10 月 3 日
コメント済み: Rik 2019 年 10 月 8 日
Hi there,
I'm VERY new to Matlab and trying to make a cell array of DICOM headers.
Can someone please advise me on how to do this in the simplist way possible?
Many thanks in advance,
Joe
  3 件のコメント
CAM
CAM 2019 年 10 月 4 日
dicominfo provides all the fields in a structure. You can call the specific fields directly using the dot notation (info.fieldname). This is easier than looking up a field and value in a cell array.
Rik
Rik 2019 年 10 月 4 日
Comment posted as answer by joseph Mole:
Thanks both for your response.
I'm trying to use Matlab for dicom conversion and have been given the script shown in the image below. The guidance in the script says that in the function 'spm_dicom_convert(hdr,opts,root_dir,format,out_dir)' I need to replace 'hdr' with 'a cell array of DICOM headers from spm_dicom_headers'. I'm not sure how to do this. I'm sure this is very basic but can you walk me through what I need to do?
Thanks for your patience.
Screenshot.png

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

回答 (1 件)

Rik
Rik 2019 年 10 月 4 日
It seems that there is a function called spm_dicom_headers that will get the dicom header in the correct form. I would assume it is in the same zip file (or website) you got this function from.
  5 件のコメント
joseph Mole
joseph Mole 2019 年 10 月 8 日
Thanks Rik.
The variable 'P' that this creates appears to be correct. However, when I try to excute 'hdr = spm_dicom_headers(P)' I get the following error messages. At the bottom it says 'hdr = 0×0 empty cell array'.
I'm sorry if I've done something really silly. Do you have any suggestions?
screenshot3.png
Rik
Rik 2019 年 10 月 8 日
Those are not error messages, but warning messages. They tell you you're attempting to treat bmp files as if they are dicom files. If you don't have dicom files, why are you trying to use a dicom file reader?

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

カテゴリ

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