How to calculate actual size of an object in a dicom image?

39 ビュー (過去 30 日間)
Sparkle89
Sparkle89 2019 年 3 月 30 日
編集済み: nehad mohamed 2021 年 1 月 10 日
I have a dicom image of CT scan. Regionprops returns area in pixels. Is there any other way in Matlab to get the actual sizein cms/mms?

採用された回答

Image Analyst
Image Analyst 2019 年 3 月 30 日
Hopefully there is something in your dicom header that gives the spatial calibration in real world units per pixel.
  4 件のコメント
Sparkle89
Sparkle89 2019 年 3 月 30 日
Thank you Sir.
Pixelspacing returns spacing in mms.
Therefore is the following calculation of size obtained by multiplying area obtained from regioprops by [pixelspacing.x pixelspacing.y] correct?
%PixelSpacing value from dicom header
% area returned by regionprops
area_in_mm = area .* [PixelSpacing.xvalue PixelSpacing.yvalue];
Image Analyst
Image Analyst 2019 年 3 月 30 日
No, more like
area_in_mm = area * PixelSpacing.xvalue * PixelSpacing.yvalue;

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

その他の回答 (2 件)

nehad mohamed
nehad mohamed 2021 年 1 月 7 日
I want a tool like a ruler to measure distances in dicom images. In cm. using matlab
  9 件のコメント
Image Analyst
Image Analyst 2021 年 1 月 9 日
編集済み: Image Analyst 2021 年 1 月 9 日
nehad, it looks to me like you totally ignored my comment when I asked you to read this link:
Your last comment proves that. So after you read that, start your own discussion thread since this is not an official Answer to Sparkle89's question, and we don't want to be sending them emails with every post about this non-Answer.
Walter Roberson
Walter Roberson 2021 年 1 月 9 日
Take. A. Picture. Of. The. Error. Message. And. Attach. The. Picture. 🥺

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


nehad mohamed
nehad mohamed 2021 年 1 月 10 日
  2 件のコメント
nehad mohamed
nehad mohamed 2021 年 1 月 10 日
編集済み: nehad mohamed 2021 年 1 月 10 日
this my error and my code
iwant tools like ruler to measure distance and save this distance in excel sheet
Image Analyst
Image Analyst 2021 年 1 月 10 日
Again:
nehad, it looks to me like you totally ignored my comment when I asked you to read this link:
Your last comment proves that. So after you read that, start your own discussion thread since this is not an official Answer to Sparkle89's question, and we don't want to be sending them emails with every post about this non-Answer.
If you want, you can put a link to your new thread back here. That's all.

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

カテゴリ

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