Pixel to mm conversion using Image pixel spacing value
5 views (last 30 days)
Show older comments
Devan Krishnamurthy
on 31 May 2018
Commented: Devan Krishnamurthy
on 31 May 2018
Hello all, I would like to know how to convert pixel coordinates (x, y) in pixels to millimeter. The DICOM that I read has the info as pixel spacing (0.78, 078) so should I just multiply my pixel values with 0.78 or is it a factor?. I believe the first value is row and second value is column. Pixel spacing is calculated by row/column. So should I multiply with the factor or just with 0.78?.
Also, what if it is (0.78, 0.5) or (0.5, 0.78), is it possible to have different values for pixel spacing or they always same. Kindly clarify.
Thanks, Devan
0 Comments
Accepted Answer
Rik
on 31 May 2018
As described by the NEMA page for this specific DICOM tag, it can indeed contain two different values. As it is the physical distance in mm between pixel centers, you can think of it as a conversion factor with mm/pixel as its unit. Multiplying a distance measured in pixels will result in a distance in mm.
3 Comments
Rik
on 31 May 2018
To be honest, I have never seen non-square pixels in DICOM images, so I don't know for sure. The standard states that the field should contain "adjacent row spacing (delimiter) adjacent column spacing". So in your (0.78,0.58) example, 0.78 would be the distance between rows, so in general that would be the y value. You should be really careful, because Matlab uses the Roman Catholic convention: (row,col), which means the y is the first dimension. I would vote for a pragmatic solution: return an error if the two element are unequal, or find an example where this appears to be the case.
More Answers (0)
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!