Pixel to mm conversion using Image pixel spacing value

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

 채택된 답변

Rik
Rik 2018년 5월 31일

1 개 추천

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

Devan Krishnamurthy
Devan Krishnamurthy 2018년 5월 31일
편집: Devan Krishnamurthy 2018년 5월 31일
Thank you. I really appreciate your help. I did have a look at the document. This is what I am trying to solve. I have two shapes in an Image. The center coordinates of them are (256, 190) and (257, 192). Eventually I have to find the distance between the two points. With the image spacing (0.78, 0.78) I can easily calculate the distance as X=(x1-x2)*0.78 and Y=(y1-y2)*0.78 to get the result in mm. But what if I have image spacing (0.78, 0.58), in this case is it X=(x1-x2)*0.78 and Y=(y1-y2)*0.58?. How should I use it for conversion in the coordinates?.
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.
I appreciate it. Makes sense. I think I got what I need. Thanks for the clarification.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Convert Image Type에 대해 자세히 알아보기

태그

질문:

2018년 5월 31일

댓글:

2018년 5월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by