editGroupName

Change group name

Description

example

editGroupName(ldc,oldname,newname) changes the group name from oldname to newname. This function changes the group name in all the label definitions that have the oldname.

Examples

collapse all

Create a labelDefinitionCreator.

ldc = labelDefinitionCreator();

Add labels named Car and Truck in a group named Vehicle.

addLabel(ldc,'Car',labelType.Rectangle,'Group','Vehicle');
addLabel(ldc,'Truck',labelType.Rectangle,'Group','Vehicle');

Change the Vehicle group name FourWheeler.

editGroupName(ldc,'Vehicle','FourWheeler');

Inspect the labels.

ldc
ldc = 
labelDefinitionCreator contains the following labels:

	Car with 0 sublabels and 0 attributes and belongs to FourWheeler group.	(info)
	Truck with 0 sublabels and 0 attributes and belongs to FourWheeler group.	(info)

For more details about attributes and sublabels, use the info method.

Input Arguments

collapse all

Label definition creator, specified as a labelDefinitionCreator object.

Old group name, specified as a character vector or string scalar that uniquely identifies group name you want to modify.

New group name, specified as a character vector or string scalar that uniquely identifies the new group name.

Introduced in R2019a