Hi Guys!
I would like your opinion about how to get a distance measured between two points in a ultrasound image converted from DICOM to JPEG.
I have no idea which algorithm is used to convert the DICOM :-(
Anyway let's assumed that our DICOM images has:
- number of rows: NR
- number of columns: NC
- Physical Delta X: PDx
- Physical Delta Y: PDy
The JPEG image has a new size:
- JPEG number of rows: JPEG_NR
- JPEG number of columns JPEG_NC
I compute two conversion factors to take in account the new dimension of the JPEG image and how the space occupied by each pixel change :
RX_FACTOR = PDx / JPEG_NR
RY_FACTOR = PDy / JPEG_NC
Finally I compute the distance between two point A(XA,YA) and B(XB,YB) in the JPEG image as:
d = sqrt((XA-XB)^2*RX_FACTOR^2+(YA-YB)^2*RY_FACTOR^2)
I've done some distance measurement and it's seems correct.
Do you think is it the right way to proceed?
Thanks!!!