how to get x,y,z coordinates of 3d dicom image.I have 3d dicom image from which i can get x and y coordinates but z coordinate i cant get it provides me slice no.how to get that z coordinate

1 view (last 30 days)
how to get x,y,z coordinates of a point on 3d dicom image.I have 3d dicom image from which i can get x and y coordinates but z coordinate i cant get. it provides me slice no.how to get that z coordinate

Answers (2)

Image Analyst
Image Analyst on 13 Jul 2017
Multiply the slice number, which you say you know, by the slice separation, which should be in the dicom header.

drummer
drummer on 28 Jan 2020
info = dicominfo('yourImage.dcm');
slice_number = info.InstanceNumber; % Gives you the slice number
slice_thickness = info.SliceThickness; % Gives you the slice thickness
z = slice_number*slice_thickness; % number of steps you made times your voxel metric gives you the z coordinate.
It's pretty much what Image Analyst said. But you should take care on your reference.
Some cases, slice 1 is the last and slice n is the first. Check it before handling as aforementioned.
If n is the first:
z = last_slice_number*slice_thickness - slice_number*slice_thickness.
Sometimes it happens with multimodalities images.
Cheers

Categories

Find more on DICOM Format in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!