deleteContour

Delete ROI sequence from ROI data

Description

example

contourOut = deleteContour(contourIn,number) deletes one or more region of interest (ROI) sequence extracted from a DICOM-RT structure set file. Specify the sequence to delete by its ROI number number.

Use deleteContour function to delete ROI sequence from the ROIs property of the dicomContours object. Then, you can use the convertToInfo function to export the new ROI data to the structure set and ROI contour modules of DICOM metadata.

Examples

collapse all

Read DICOM metadata from DICOM-RT structure set files.

info = dicominfo('rtstruct.dcm');

Extract ROI data from the structure set and ROI contour modules of DICOM metadata. The output is a dicomContours object that stores the extracted ROI data.

contourIn = dicomContours(info);

Display the ROIs property of the dicomContours object.

contourIn.ROIs
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}

Delete ROI sequence specified by ROI number 2.

contourOut = deleteContour(contourIn,2)
contourOut = 
  dicomContours with properties:

    ROIs: [1x5 table]

Display the ROIs property of the output dicomContours object. You can use the convertToInfo function to export the modified ROI data to a DICOM-RT structure set file.

contourOut.ROIs
ans=1×5 table
    Number          Name          ContourData    GeometricType       Color    
    ______    ________________    ___________    _____________    ____________

      1       {'Body_Contour'}    {90x1 cell}     {90x1 cell}     {3x1 double}

Input Arguments

collapse all

Input ROI data, specified as a dicomContours object.

ROI number, specified as a scalar or vector. Specifying a vector of ROI numbers deletes multiple ROI sequences.

The ROI number is the identification number of the ROI in the ROIs property of the dicomContours object.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Output Arguments

collapse all

Output ROI data, returned as a dicomContours object.

Introduced in R2020a