comparison OrthancFramework/Sources/DicomParsing/DicomWebJsonVisitor.cpp @ 4737:979ae3ea3381

DANGEROUS commit: Anonymization is now also applied to nested sequences
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 06 Jul 2021 08:12:26 +0200
parents b51c08bd5c38
children 7053502fbf97
comparison
equal deleted inserted replaced
4736:bf852fd773b7 4737:979ae3ea3381
380 return Action_None; 380 return Action_None;
381 } 381 }
382 382
383 383
384 ITagVisitor::Action 384 ITagVisitor::Action
385 DicomWebJsonVisitor::VisitEmptySequence(const std::vector<DicomTag>& parentTags, 385 DicomWebJsonVisitor::VisitSequence(const std::vector<DicomTag>& parentTags,
386 const std::vector<size_t>& parentIndexes, 386 const std::vector<size_t>& parentIndexes,
387 const DicomTag& tag) 387 const DicomTag& tag,
388 { 388 size_t countItems)
389 if (tag.GetElement() != 0x0000) 389 {
390 if (countItems == 0 &&
391 tag.GetElement() != 0x0000)
390 { 392 {
391 Json::Value& node = CreateNode(parentTags, parentIndexes, tag); 393 Json::Value& node = CreateNode(parentTags, parentIndexes, tag);
392 node[KEY_VR] = EnumerationToString(ValueRepresentation_Sequence); 394 node[KEY_VR] = EnumerationToString(ValueRepresentation_Sequence);
393 } 395 }
394 396