%% Remove Sublabel from Label in Label Definition Creator Object for Multisignal Workflow
% Create an empty labelDefinitionCreatorMultisignal object.

ldc = labelDefinitionCreatorMultisignal;

% Add a label with the name 'TrafficLight'. Specify the type of label as 'Rectangle' and add a description. Adding a 'Rectangle' also adds a 'Cuboid' entry to the label definitions table.

addLabel(ldc,'TrafficLight',labelType.Rectangle,'Description','Bounding boxes for traffic light')

% Add sublabels called 'RedLight', 'GreenLight' and 'YellowLight' to the label 'TrafficLight'. Specify the type of the sublabels as 'Rectangle'.

addSublabel(ldc,'TrafficLight','RedLight','Rectangle')
addSublabel(ldc,'TrafficLight','GreenLight','rect')
addSublabel(ldc,'TrafficLight','YellowLight',labelType.Rectangle)

% Display information about the label 'TrafficLight' using the object function info, to confirm that the sublabels have been added to the label definitions.

info(ldc,'TrafficLight')

% Remove the sublabel 'YellowLight' from the label 'TrafficLight'.

removeSublabel(ldc,'TrafficLight','YellowLight')

% Display information about the label 'TrafficLight' using the object function info, to confirm that the sublabel 'YellowLight' has been removed from the label definitions.

info(ldc,'TrafficLight')

% Copyright 2019 The MathWorks, Inc.