@@ -15,7 +15,6 @@ LabelInfo::LabelInfo() {
1515 this ->id_categorie = 0 ;
1616 this ->color = QColor (0 , 0 , 0 );
1717 item = NULL ;
18- shortcut = nullptr ;
1918}
2019
2120LabelInfo::LabelInfo (QString name, QString categorie, int id, int id_categorie, QColor color) {
@@ -25,7 +24,6 @@ LabelInfo::LabelInfo(QString name, QString categorie, int id, int id_categorie,
2524 this ->id_categorie = id_categorie;
2625 this ->color = color;
2726 item = NULL ;
28- shortcut = nullptr ;
2927}
3028
3129void LabelInfo::read (const QJsonObject &json) {
@@ -52,7 +50,6 @@ void LabelInfo::write(QJsonObject &json) const {
5250 json[" color" ] = jarray;
5351}
5452
55-
5653void Name2Labels::read (const QJsonObject &json) {
5754 QJsonObject array = json[" labels" ].toObject ();
5855 for (QJsonObject::iterator it = array.begin (); it != array.end (); it++) {
@@ -62,6 +59,7 @@ void Name2Labels::read(const QJsonObject &json) {
6259 (*this )[label.name ] = label;
6360 }
6461}
62+
6563void Name2Labels::write (QJsonObject &json) const {
6664 QMapIterator<QString, LabelInfo> it (*this );
6765 QJsonObject object;
@@ -86,7 +84,7 @@ Id2Labels getId2Label(const Name2Labels& labels) {
8684 return id_labels;
8785}
8886
89- Name2Labels defaulfLabels () {
87+ Name2Labels defaultLabels () {
9088 Name2Labels labels;
9189 // inspired by https://raw.githubusercontent.com/mcordts/cityscapesScripts/master/cityscapesscripts/helpers/labels.py
9290 labels[" unlabeled" ] = LabelInfo (" unlabeled" , " void" , 00 , 0 , QColor ( 0 , 0 , 0 ));
@@ -137,7 +135,7 @@ Name2Labels defaulfLabels() {
137135 // labels[it.key()].color = cmap[i++];
138136 // }
139137 // labels["unlabeled"].color = QColor(0, 0, 0);
140-
138+
141139 return labels;
142140
143- }
141+ }
0 commit comments