How to plot a 3D DICOM image in millimetre (mm) knowing the voxel size?

11 views (last 30 days)
How can I change the axis to physical units when I plot a 3D dicom image? for example, the DICOM image has dimensions of 200x200x100 where 100 is the number of 2D slices size 200x200. I already know that the voxel size is 3.6458mm x 3.6458mm x 3.27mm.
I am using the following code to plot e.g. a segmented part of the DICOM image, but the axis are 200x200x100. How should I change the axis to mm having the voxel size?
figure;
w = smooth3(Segmented_area,'gaussian', [11 11 11]);
isosurface(w,.1);
view(3)
axis equal
"Segmented_area" is a 3D binary matrix. I would like to plot both DICOM image and segmented area in mm.

Accepted Answer

Walter Roberson
Walter Roberson on 27 Jun 2016
You can pass X, Y, and Z coordinates to isosurface() . You would probably construct those as
[X, Y, Z] = meshgrid( (0 : size(Segmented_area,1)-1) * 3.6458, (0 : size(Segmented_area,2)-1) * 3.6458, (0 : size(Segmented_area,3)-1) * 3.27 );
  11 Comments
Walter Roberson
Walter Roberson on 1 Feb 2019
I do not appear to be eligible to get the MCNP source code, and the user manual itself is considered to be Export Controlled.
When you read in a 3D array from DICOM, the result is already voxels.
Perhaps you are trying to segment a transcranial DICOM image? Transcranial would tend to be MRI modality, but your reference to MCNP suggests to me that you might be working with either CT or with radiation therapy ?

Sign in to comment.

More Answers (1)

abdey munaf
abdey munaf on 3 Dec 2018
thanks in advance to all of you. can you tell me how you come to know ''the voxel size is 3.6458mm x 3.6458mm x 3.27mm .'' ?

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!