comparison framework/SVFileReader.cpp @ 653:365c61ac7680 single-point

Use updated ImageModel
author Chris Cannam
date Fri, 22 Mar 2019 17:49:23 +0000
parents 8fb56fb5bdd3
children ffd213b292f9
comparison
equal deleted inserted replaced
652:8fb56fb5bdd3 653:365c61ac7680
1149 1149
1150 if (pm) { 1150 if (pm) {
1151 // SVCERR << "Current dataset is a path model" << endl; 1151 // SVCERR << "Current dataset is a path model" << endl;
1152 int mapframe = attributes.value("mapframe").trimmed().toInt(&ok); 1152 int mapframe = attributes.value("mapframe").trimmed().toInt(&ok);
1153 // SVDEBUG << "SVFileReader::addPointToDataset: PathModel: frame = " << frame << ", mapframe = " << mapframe << ", ok = " << ok << endl; 1153 // SVDEBUG << "SVFileReader::addPointToDataset: PathModel: frame = " << frame << ", mapframe = " << mapframe << ", ok = " << ok << endl;
1154 pm->addPoint(PathModel::Point(frame, mapframe)); 1154 pm->add(PathPoint(frame, mapframe));
1155 return ok; 1155 return ok;
1156 } 1156 }
1157 1157
1158 ImageModel *im = dynamic_cast<ImageModel *>(m_currentDataset); 1158 ImageModel *im = dynamic_cast<ImageModel *>(m_currentDataset);
1159 1159
1160 if (im) { 1160 if (im) {
1161 // SVCERR << "Current dataset is an image model" << endl; 1161 // SVCERR << "Current dataset is an image model" << endl;
1162 QString image = attributes.value("image"); 1162 QString image = attributes.value("image");
1163 QString label = attributes.value("label"); 1163 QString label = attributes.value("label");
1164 // SVDEBUG << "SVFileReader::addPointToDataset: ImageModel: frame = " << frame << ", image = " << image << ", label = " << label << ", ok = " << ok << endl; 1164 // SVDEBUG << "SVFileReader::addPointToDataset: ImageModel: frame = " << frame << ", image = " << image << ", label = " << label << ", ok = " << ok << endl;
1165 im->addPoint(ImageModel::Point(frame, image, label)); 1165 im->add(Event(frame).withURI(image).withLabel(label));
1166 return ok; 1166 return ok;
1167 } 1167 }
1168 1168
1169 SVCERR << "WARNING: SV-XML: Point element found in non-point dataset" << endl; 1169 SVCERR << "WARNING: SV-XML: Point element found in non-point dataset" << endl;
1170 1170