comparison OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp @ 4770:248408d2b336

hiding FromDcmtkBridge::Apply() on IDicomPathVisitor
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 25 Aug 2021 15:42:34 +0200
parents 979ae3ea3381
children 9f207131c7f4
comparison
equal deleted inserted replaced
4769:9da6ca57a977 4770:248408d2b336
2976 2976
2977 DicomMap::LogMissingTagsForStore(patientId, studyInstanceUid, seriesInstanceUid, sopInstanceUid); 2977 DicomMap::LogMissingTagsForStore(patientId, studyInstanceUid, seriesInstanceUid, sopInstanceUid);
2978 } 2978 }
2979 2979
2980 2980
2981 static void ApplyInternal(FromDcmtkBridge::IDicomPathVisitor& visitor, 2981 void FromDcmtkBridge::IDicomPathVisitor::ApplyInternal(FromDcmtkBridge::IDicomPathVisitor& visitor,
2982 DcmItem& item, 2982 DcmItem& item,
2983 const DicomPath& pattern, 2983 const DicomPath& pattern,
2984 const DicomPath& actualPath) 2984 const DicomPath& actualPath)
2985 { 2985 {
2986 const size_t level = actualPath.GetPrefixLength(); 2986 const size_t level = actualPath.GetPrefixLength();
2987 2987
2988 if (level == pattern.GetPrefixLength()) 2988 if (level == pattern.GetPrefixLength())
2989 { 2989 {
3018 } 3018 }
3019 } 3019 }
3020 } 3020 }
3021 3021
3022 3022
3023 void FromDcmtkBridge::Apply(IDicomPathVisitor& visitor, 3023 void FromDcmtkBridge::IDicomPathVisitor::Apply(IDicomPathVisitor& visitor,
3024 DcmDataset& dataset, 3024 DcmDataset& dataset,
3025 const DicomPath& path) 3025 const DicomPath& path)
3026 { 3026 {
3027 DicomPath actualPath(path.GetFinalTag()); 3027 DicomPath actualPath(path.GetFinalTag());
3028 ApplyInternal(visitor, dataset, path, actualPath); 3028 ApplyInternal(visitor, dataset, path, actualPath);
3029 } 3029 }
3030 3030
3042 std::unique_ptr<DcmElement> removed(item.remove(key)); 3042 std::unique_ptr<DcmElement> removed(item.remove(key));
3043 } 3043 }
3044 }; 3044 };
3045 3045
3046 Visitor visitor; 3046 Visitor visitor;
3047 Apply(visitor, dataset, path); 3047 IDicomPathVisitor::Apply(visitor, dataset, path);
3048 } 3048 }
3049 3049
3050 3050
3051 void FromDcmtkBridge::ClearPath(DcmDataset& dataset, 3051 void FromDcmtkBridge::ClearPath(DcmDataset& dataset,
3052 const DicomPath& path, 3052 const DicomPath& path,
3082 } 3082 }
3083 } 3083 }
3084 }; 3084 };
3085 3085
3086 Visitor visitor(onlyIfExists); 3086 Visitor visitor(onlyIfExists);
3087 Apply(visitor, dataset, path); 3087 IDicomPathVisitor::Apply(visitor, dataset, path);
3088 } 3088 }
3089 3089
3090 3090
3091 void FromDcmtkBridge::ReplacePath(DcmDataset& dataset, 3091 void FromDcmtkBridge::ReplacePath(DcmDataset& dataset,
3092 const DicomPath& path, 3092 const DicomPath& path,
3157 "The final tag must be the same as the tag of the element during a replacement"); 3157 "The final tag must be the same as the tag of the element during a replacement");
3158 } 3158 }
3159 else 3159 else
3160 { 3160 {
3161 Visitor visitor(element, mode); 3161 Visitor visitor(element, mode);
3162 Apply(visitor, dataset, path); 3162 IDicomPathVisitor::Apply(visitor, dataset, path);
3163 } 3163 }
3164 } 3164 }
3165 } 3165 }
3166 3166
3167 3167