removeAttribute
Remove attribute from label or sublabel in label definition creator object for multisignal workflow
Description
removeAttribute(
removes the specified attribute from the indicated label or sublabel in the ldc
,labelName
,attributeName
)labelDefinitionCreatorMultisignal
object ldc
.
Examples
Create an empty labelDefinitionCreatorMultisignal
object.
ldc = labelDefinitionCreatorMultisignal;
Add a label with the name 'TrafficLight'
. Specify the type of label as 'Rectangle'
. Adding a 'Rectangle'
also adds a 'Cuboid'
entry to the label definitions table.
addLabel(ldc,'TrafficLight','Rectangle')
Add attribute 'Active'
to the label. Specify the attribute type as 'Logical'
with the value true
.
addAttribute(ldc,'TrafficLight','Active','Logical',true)
Display information about the attributes under the label 'TrafficLight'
using the object function info
.
info(ldc,'TrafficLight')
Name: "TrafficLight" SignalType: Image LabelType: Rectangle Group: "None" LabelColor: {''} Attributes: "Active" Sublabels: [] Description: ' ' Name: "TrafficLight" SignalType: PointCloud LabelType: Cuboid Group: "None" LabelColor: {''} Attributes: "Active" Sublabels: [] Description: ' '
Remove the attribute 'Active'
from the label 'TrafficLight'
.
removeAttribute(ldc,'TrafficLight','Active')
Add a sublabel called 'RedLight'
to the label 'TrafficLight'
. Specify the type of the sublabel as 'Rectangle'
.
addSublabel(ldc,'TrafficLight','RedLight','Rectangle')
Add an attribute 'isOn'
to the sublabel 'RedLight'
. Specify the type for the attribute 'isOn'
as 'Logical'
with the value false
.
addAttribute(ldc,'TrafficLight/RedLight','isOn','Logical',false)
Display information about the attributes under the sublabel 'RedLight'
in the label 'TrafficLight'
using the object function info
.
info(ldc,'TrafficLight/RedLight')
Name: "RedLight" Type: Rectangle LabelColor: '' Attributes: "isOn" Sublabels: [] Description: ' '
Remove the attribute 'isOn'
from the sublabel 'RedLight'
.
removeAttribute(ldc,'TrafficLight/RedLight','isOn')
Display information about the label 'TrafficLight'
using the object function info
, to confirm that the attribute 'Active'
has been removed from the label definitions.
info(ldc,'TrafficLight')
Name: "TrafficLight" SignalType: Image LabelType: Rectangle Group: "None" LabelColor: {''} Attributes: [] Sublabels: "RedLight" Description: ' ' Name: "TrafficLight" SignalType: PointCloud LabelType: Cuboid Group: "None" LabelColor: {''} Attributes: [] Sublabels: "RedLight" Description: ' '
Display information about the sublabel 'RedLight'
in the label 'TrafficLight'
using the object function info
, to confirm that the attribute 'isOn'
has been removed from the label definitions.
info(ldc,'TrafficLight/RedLight')
Name: "RedLight" Type: Rectangle LabelColor: '' Attributes: [] Sublabels: [] Description: ' '
Input Arguments
Label definition creator for the multisignal workflow, specified as a labelDefinitionCreatorMultisignal
object.
Label or sublabel name, specified as a character vector or string scalar that uniquely identifies the label or sublabel from which the attribute is to be removed.
To specify a label, use the form 'labelName'.
Example: removeAttribute(ldc,'TrafficLight','Active')
To specify a sublabel, use the form 'labelName/sublabelName'. In this case, the attribute associates with the sublabel.
Example: removeAttribute(ldc,'TrafficLight/RedLight','isOn')
Attribute name, specified as a character vector or string scalar that identifies the
attribute to be removed from the label or sublabel indicated by
labelName
.
Version History
Introduced in R2020a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)