简体   繁体   中英

How to convert length in pixel to mm/cm DICOM

I have calculated the distance between two points (x,y,z) from DICOM file to get the line length the result is in pixel how can i convert it to mm or cmm

if the image is isometric (ie the spacing of all of the axes are the same), then u should just multiply your result by the mm2voxel value, which is encoded in the DICOM image metadata.

if it is not isometric (ie each axis has a different spacing), you should first convert the distance on every axis from voxels to mm, then calculate the final distance.

to get the spacing (mm2voxel) info, it depends on how you read the image. for example, if you do it by the SimpleITK package, you can get it by:

import SimpleITK as sitk
p = '/path/to/image'
im = sitk.ReadImage(p)
sp = im.GetSpacing()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM