How can I get pixel spacing value from DICOM images?

20 ビュー (過去 30 日間)
Akib Ahmed
Akib Ahmed 2017 年 11 月 21 日
回答済み: mohd akmal masud 2018 年 3 月 15 日
An old code (written in 2010) of DICOM image viewer is in my hand and it achieves the image's pixel spacing value by the following code snippet (A bit edited from the original):
d = sortDirectory(folder); %Sort in ascending order of instance number
metadata = dicominfo(d(1).name);
[group1 element1] = dicomlookup('PixelSpacing');
resolution = metadata.(dicomlookup(group1, element1));
Turns out, DICOM metadata no longer carries the PixelSpacing attribute. So I cannot get it by calling "dicominfo" function. How can I get this info now?
Thanks in advance.

回答 (1 件)

mohd akmal masud
mohd akmal masud 2018 年 3 月 15 日
let say your image is "image.dcm"
info=dicominfo('image.dcm');
spacing=info.PixelSpacing;
spacing=

カテゴリ

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