comparison OrthancServer/FromDcmtkBridge.cpp @ 2074:4a151d26c98a

fix extraction of the symbolic name of the private tags
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 16 Aug 2016 11:28:31 +0200
parents 08ce34cfacad
children ec2ad6ac741e
comparison
equal deleted inserted replaced
2073:1d7a640c1dda 2074:4a151d26c98a
569 parent[formattedTag] = Json::nullValue; 569 parent[formattedTag] = Json::nullValue;
570 return parent[formattedTag]; 570 return parent[formattedTag];
571 } 571 }
572 572
573 // This code gives access to the name of the private tags 573 // This code gives access to the name of the private tags
574 DcmTag tagbis(element.getTag()); 574 const std::string tagName = FromDcmtkBridge::GetName(tag);
575 const std::string tagName(tagbis.getTagName());
576 575
577 switch (format) 576 switch (format)
578 { 577 {
579 case DicomToJsonFormat_Human: 578 case DicomToJsonFormat_Human:
580 parent[tagName] = Json::nullValue; 579 parent[tagName] = Json::nullValue;
587 586
588 if (element.isLeaf()) 587 if (element.isLeaf())
589 { 588 {
590 node["Name"] = tagName; 589 node["Name"] = tagName;
591 590
591 DcmTag tagbis(tag.GetGroup(), tag.GetElement());
592 if (tagbis.getPrivateCreator() != NULL) 592 if (tagbis.getPrivateCreator() != NULL)
593 { 593 {
594 node["PrivateCreator"] = tagbis.getPrivateCreator(); 594 node["PrivateCreator"] = tagbis.getPrivateCreator();
595 } 595 }
596 596