How to Measure distance between 2 points from JPEG Ultrasound images converted from DICOM?

97 views
Skip to first unread message

Elisa Italy

unread,
Mar 13, 2017, 10:38:08 AM3/13/17
to Fellow Oak DICOM
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!!!

Chris Horn

unread,
Mar 16, 2017, 2:21:38 AM3/16/17
to Fellow Oak DICOM
yep get SequenceOfUltrasoundRegions DicomSequence
get the PhysicalDeltaX and PhysicalDeltaY values
confirm that PhysicalUnitsXDirection = 3 and PhysicalUnitsYDirection = 3 (this is cm * cm) so dont foget to convert to mm

the PhysicalUnit values are :
NoneOrNotApplicable,
Percent,
Db,
Cm,
Seconds,
Hertz,
DbPerSecond,
CmPerSecond,
SquareCm,
SquareCmPerSecond,
CubicCm,
CubicCmPerSecond,
Degrees

Elisa Italy

unread,
Mar 16, 2017, 11:14:13 AM3/16/17
to Fellow Oak DICOM
Thank you very much :-)
Reply all
Reply to author
Forward
0 new messages