Add an ROI sequence to the ROI data extracted from the structure set and ROI contour modules of the DICOM metadata.
Read DICOM metadata from a DICOM-RT structure set file.
Extract ROI data from the structure set and ROI contour modules of the DICOM metadata. The output is a dicomContours
object that stores the extracted ROI data.
Display the ROIs
property of the dicomContours
object.
ans=2×5 table
Number Name ContourData GeometricType Color
______ _________________ ___________ _____________ ____________
1 {'Body_Contour' } {90x1 cell} {90x1 cell} {3x1 double}
2 {'Tumor_Contour'} {21x1 cell} {21x1 cell} {3x1 double}
Load another set of ROI contour data into the workspace. The contour data contains the 3-D coordinates of the contours in the ROI.
To create an ROI sequence that contain the new ROI contour data, specify these attributes of the ROI sequence:
Assign a unique ROI number for the ROI sequence. The ROI name can be any user-defined name. Because all points in the new ROI contour data are coplanar, and the last point is connected to the first point, specify the geometric type as "Closed_planar"
.
Specify the color of the ROI. If you do not specify a color, the default value for color in the ROIs
property is set to []
.
Add the new ROI sequence to the ROIs
property of dicomContours
object. The output is also a dicomContours
object containing the new ROI sequence as well as the original sequences.
contourOut =
dicomContours with properties:
ROIs: [3x5 table]
Display the details of the new dicomContours
object by viewing its ROIs
property. You can use the convertToInfo
function to export the modified ROI data as DICOM metadata.
ans=3×5 table
Number Name ContourData GeometricType Color
______ _________________ ___________ _____________ ____________
1 {'Body_Contour' } {90x1 cell} {90x1 cell} {3x1 double}
2 {'Tumor_Contour'} {21x1 cell} {21x1 cell} {3x1 double}
3 {'Organ' } {21x1 cell} {21x1 cell} {3x1 double}