MATLAB Answers

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

70 views (last 30 days)
Sparkle89
Sparkle89 on 30 Mar 2019
Commented: Image Analyst on 30 Mar 2019
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?

  0 Comments

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 30 Mar 2019
Hopefully there is something in your dicom header that gives the spatial calibration in real world units per pixel.

  4 Comments

Show 1 older comment
Walter Roberson
Walter Roberson on 30 Mar 2019
PixelSpacing is what you want for 2D. It measures pixel center distance so you can get outer distance by multiplying the number of pixels by the spacing.
The situation in 3d is more complicated.
Sparkle89
Sparkle89 on 30 Mar 2019
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 on 30 Mar 2019
No, more like
area_in_mm = area * PixelSpacing.xvalue * PixelSpacing.yvalue;

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by