How to extract a single field from DICOM Data

2 ビュー (過去 30 日間)
Ben Fidock
Ben Fidock 2018 年 10 月 6 日
For my work I have to use DICOMINFO. However from the long list that appears I only need to see one or two lines of this. Is there any way of requesting only this data or a second line of code that I could add after DICOMINFO to extract the information that I need?
  1 件のコメント
Rik
Rik 2018 年 10 月 7 日
Not as far as I know. I just read the file in binary and then extracted the value that I needed.

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

回答 (1 件)

ILÁN FRANCISCO CARRETERO JUCHNOWICZ
ILÁN FRANCISCO CARRETERO JUCHNOWICZ 2020 年 6 月 17 日
Hi,
I recently contacted MathWorks Support and they have advised me the following solution:
''there is an undocumented way you might be able to extract 'dicominfo' faster. Please see the following example.
>> obj = images.internal.dicom.DICOMFile('CT-MONO2-16-ankle.dcm');
>> info = obj.getAttributeByName('SeriesTime');
This method first creates an object to extract the attributesNames and then use 'getAttributeByName' to read the information of a particular attribute. "
I have tried the commands detailed above and it works really well and faster than the dicominfo function.
I hope it helps you!
  2 件のコメント
Rik
Rik 2020 年 6 月 17 日
The dicominfo function works well and can handle a lot of damaged or not fully DICOM-compliant files. If you don't need that robustness it is painfully slow.
If you need a much faster version, you can use this FEX submission. I haven't compared the speed of that function with the code you just posted.
ILÁN FRANCISCO CARRETERO JUCHNOWICZ
ILÁN FRANCISCO CARRETERO JUCHNOWICZ 2020 年 6 月 17 日
okey Rik, thanks for the information!

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

カテゴリ

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

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by