comparison Core/DicomFormat/DicomMap.cpp @ 3551:173c7f363d8f

DicomMap::RemoveBinaryTags
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 26 Oct 2019 15:59:59 +0200
parents a57c8163d9ae
children 94f4a18a79cc
comparison
equal deleted inserted replaced
3550:0f5f9a5eed25 3551:173c7f363d8f
1292 return defaultValue; 1292 return defaultValue;
1293 } 1293 }
1294 } 1294 }
1295 1295
1296 1296
1297 void DicomMap::RemoveBinaryTags()
1298 {
1299 Map kept;
1300
1301 for (Map::iterator it = map_.begin(); it != map_.end(); ++it)
1302 {
1303 assert(it->second != NULL);
1304
1305 if (!it->second->IsBinary() &&
1306 !it->second->IsNull())
1307 {
1308 kept[it->first] = it->second;
1309 }
1310 else
1311 {
1312 delete it->second;
1313 }
1314 }
1315
1316 map_ = kept;
1317 }
1318
1319
1297 void DicomMap::Print(FILE* fp) const 1320 void DicomMap::Print(FILE* fp) const
1298 { 1321 {
1299 DicomArray a(*this); 1322 DicomArray a(*this);
1300 a.Print(fp); 1323 a.Print(fp);
1301 } 1324 }