Create a 3-D mask based on dicom-rt contour data and apply it to medicalVolumes imported from CT images

9 views (last 30 days)
I am going to do a radionics study. I exported serial dicom CT image files and an RT-struct file of a case from Philips Pinnacle (a radiotherapy planning software). The contours drawn by a clinician were stored in the RT-struct file. I want to use some contour to create a 3D Mask and combine the voxel matrix imported from CT image files and the 3D mask to get ROI voxels. Here is my code:
dataFolder = fullfile("\CT image Folder\");
medVol38 = medicalVolume(dataFolder);
info = dicominfo("RTSTRUCT.dcm");
rtContours = dicomContours(info);
referenceInfo = medicalref3d(size(medVol.Voxels),medVol38.VolumeGeometry.Position,medVol38.VolumeGeometry.VoxelDistances);
rtMask = createMask(rtContours,21,referenceInfo);
Then i got a red text error messages:
Error using dicomContours/createMask "info" argument must be of type "imref3d", or must be a "struct" with same structure as "spatialInfo" output from "dicomreadVolume".
I don't know what to do. Can you give me some suggestions?
  3 Comments
aditi bagora
aditi bagora on 21 Sep 2023
Kindly check if the same variable "medVol38" is used.
If variable is not the issue, please share orientation property data of the medical volume "medVol38".

Sign in to comment.

Answers (1)

aditi bagora
aditi bagora on 26 Sep 2023
It seems that the mask has been successfully created, but the medical volume is oriented differently, resulting in a 90-degree counterclockwise shift.
This discrepancy could possibly be due to the DICOM CT image being captured in a different orientation than the expected axial (transverse) orientation.
You can check the "Orientation" property of the "medVol38" object. If the orientation is not transverse, it indicates a mismatch between the volume and contour data orientations.
To resolve this, you may need to adjust the orientation of the medical volume. Refer to the below link to change the orientation of the volume.
Hope the provided information helps in resolving the issue.

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!