Mercurial > hg > orthanc
comparison Core/DicomParsing/ParsedDicomFile.cpp @ 4007:884b55ce01f6
Private tags returned by C-FIND SCP
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 06 Jun 2020 14:50:21 +0200 |
parents | 3d2fc1b5cc8c |
children | 914b15dedae3 |
comparison
equal
deleted
inserted
replaced
4006:55710d73780f | 4007:884b55ce01f6 |
---|---|
999 } | 999 } |
1000 | 1000 |
1001 | 1001 |
1002 void ParsedDicomFile::CreateFromDicomMap(const DicomMap& source, | 1002 void ParsedDicomFile::CreateFromDicomMap(const DicomMap& source, |
1003 Encoding defaultEncoding, | 1003 Encoding defaultEncoding, |
1004 bool permissive) | 1004 bool permissive, |
1005 const std::string& privateCreator) | |
1005 { | 1006 { |
1006 pimpl_->file_.reset(new DcmFileFormat); | 1007 pimpl_->file_.reset(new DcmFileFormat); |
1007 pimpl_->frameIndex_.reset(NULL); | 1008 InvalidateCache(); |
1008 | 1009 |
1009 const DicomValue* tmp = source.TestAndGetValue(DICOM_TAG_SPECIFIC_CHARACTER_SET); | 1010 const DicomValue* tmp = source.TestAndGetValue(DICOM_TAG_SPECIFIC_CHARACTER_SET); |
1010 | 1011 |
1011 if (tmp == NULL) | 1012 if (tmp == NULL) |
1012 { | 1013 { |
1044 if (it->first != DICOM_TAG_SPECIFIC_CHARACTER_SET && | 1045 if (it->first != DICOM_TAG_SPECIFIC_CHARACTER_SET && |
1045 !it->second->IsNull()) | 1046 !it->second->IsNull()) |
1046 { | 1047 { |
1047 try | 1048 try |
1048 { | 1049 { |
1049 ReplacePlainString(it->first, it->second->GetContent()); | 1050 // Same as "ReplacePlainString()", but with support for private creator |
1051 const std::string& utf8Value = it->second->GetContent(); | |
1052 Replace(it->first, utf8Value, false, DicomReplaceMode_InsertIfAbsent, privateCreator); | |
1050 } | 1053 } |
1051 catch (OrthancException&) | 1054 catch (OrthancException&) |
1052 { | 1055 { |
1053 if (!permissive) | 1056 if (!permissive) |
1054 { | 1057 { |
1060 } | 1063 } |
1061 | 1064 |
1062 | 1065 |
1063 ParsedDicomFile::ParsedDicomFile(const DicomMap& map, | 1066 ParsedDicomFile::ParsedDicomFile(const DicomMap& map, |
1064 Encoding defaultEncoding, | 1067 Encoding defaultEncoding, |
1065 bool permissive) : | 1068 bool permissive, |
1069 const std::string& privateCreator) : | |
1066 pimpl_(new PImpl) | 1070 pimpl_(new PImpl) |
1067 { | 1071 { |
1068 CreateFromDicomMap(map, defaultEncoding, permissive); | 1072 CreateFromDicomMap(map, defaultEncoding, permissive, privateCreator); |
1069 } | 1073 } |
1070 | 1074 |
1071 | 1075 |
1072 ParsedDicomFile::ParsedDicomFile(const void* content, | 1076 ParsedDicomFile::ParsedDicomFile(const void* content, |
1073 size_t size) : pimpl_(new PImpl) | 1077 size_t size) : pimpl_(new PImpl) |