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

 Respuesta aceptada

Rik
Rik el 31 de Mayo de 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 comentarios

Devan Krishnamurthy
Devan Krishnamurthy el 31 de Mayo de 2018
Editada: Devan Krishnamurthy el 31 de Mayo de 2018
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?.
Rik
Rik el 31 de Mayo de 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.
I appreciate it. Makes sense. I think I got what I need. Thanks for the clarification.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Convert Image Type en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 31 de Mayo de 2018

Comentada:

el 31 de Mayo de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by