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=4×5 table
    Number       Name        ContourData    GeometricType       Color    
    ______    ___________    ___________    _____________    ____________
      1       {'TV'     }    {13×1 cell}     {13×1 cell}     {3×1 double}
      2       {'Cochlea'}    { 5×1 cell}     { 5×1 cell}     {3×1 double}
      3       {'Vol2016'}    {12×1 cell}     {12×1 cell}     {3×1 double}
      4       {'*Skull' }    {79×1 cell}     {79×1 cell}     {3×1 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: [5×5 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=5×5 table
    Number       Name        ContourData    GeometricType       Color    
    ______    ___________    ___________    _____________    ____________
      1       {'TV'     }    {13×1 cell}     {13×1 cell}     {3×1 double}
      2       {'Cochlea'}    { 5×1 cell}     { 5×1 cell}     {3×1 double}
      3       {'Vol2016'}    {12×1 cell}     {12×1 cell}     {3×1 double}
      4       {'*Skull' }    {79×1 cell}     {79×1 cell}     {3×1 double}
      5       {'Organ'  }    {21×1 cell}     {21×1 cell}     {3×1 double}