Pixel to mm conversion using Image pixel spacing value
조회 수: 6 (최근 30일)
이전 댓글 표시
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
채택된 답변
Rik
2018년 5월 31일
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
Rik
2018년 5월 31일
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!