comparison OrthancFramework/Sources/DicomParsing/DicomModification.h @ 4678:2e850edf03d6

Full support for the anonymization of subsequences containing tags whose VR is UI
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 04 Jun 2021 17:38:43 +0200
parents 521e39b3f2c0
children 898e8ac8c453
comparison
equal deleted inserted replaced
4677:521e39b3f2c0 4678:2e850edf03d6
56 }; 56 };
57 57
58 private: 58 private:
59 class RelationshipsVisitor; 59 class RelationshipsVisitor;
60 60
61 class DicomTagRange
62 {
63 private:
64 uint16_t groupFrom_;
65 uint16_t groupTo_;
66 uint16_t elementFrom_;
67 uint16_t elementTo_;
68
69 public:
70 DicomTagRange(uint16_t groupFrom,
71 uint16_t groupTo,
72 uint16_t elementFrom,
73 uint16_t elementTo);
74
75 uint16_t GetGroupFrom() const
76 {
77 return groupFrom_;
78 }
79
80 uint16_t GetGroupTo() const
81 {
82 return groupTo_;
83 }
84
85 uint16_t GetElementFrom() const
86 {
87 return elementFrom_;
88 }
89
90 uint16_t GetElementTo() const
91 {
92 return elementTo_;
93 }
94
95 bool Contains(const DicomTag& tag) const;
96 };
97
61 typedef std::set<DicomTag> SetOfTags; 98 typedef std::set<DicomTag> SetOfTags;
62 typedef std::map<DicomTag, Json::Value*> Replacements; 99 typedef std::map<DicomTag, Json::Value*> Replacements;
63 typedef std::map< std::pair<ResourceType, std::string>, std::string> UidMap; 100 typedef std::map< std::pair<ResourceType, std::string>, std::string> UidMap;
101 typedef std::list<DicomTagRange> RemovedRanges;
64 102
65 SetOfTags removals_; 103 SetOfTags removals_;
66 SetOfTags clearings_; 104 SetOfTags clearings_;
67 Replacements replacements_; 105 Replacements replacements_;
106 SetOfTags uids_; // New in Orthanc 1.9.4
107 RemovedRanges removedRanges_; // New in Orthanc 1.9.4
68 bool removePrivateTags_; 108 bool removePrivateTags_;
69 ResourceType level_; 109 ResourceType level_;
70 UidMap uidMap_; 110 UidMap uidMap_;
71 SetOfTags privateTagsToKeep_; 111 SetOfTags privateTagsToKeep_;
72 bool allowManualIdentifiers_; 112 bool allowManualIdentifiers_;
97 bool CancelReplacement(const DicomTag& tag); 137 bool CancelReplacement(const DicomTag& tag);
98 138
99 void ReplaceInternal(const DicomTag& tag, 139 void ReplaceInternal(const DicomTag& tag,
100 const Json::Value& value); 140 const Json::Value& value);
101 141
142 void SetupUidsFromOrthanc_1_9_3();
143
102 void SetupAnonymization2008(); 144 void SetupAnonymization2008();
103 145
104 void SetupAnonymization2017c(); 146 void SetupAnonymization2017c();
105 147
106 void SetupAnonymization2021b(); 148 void SetupAnonymization2021b();