Mercurial > hg > orthanc
comparison Core/DicomParsing/DicomModification.h @ 2535:d3476d90dcb7
DicomModification::SetDicomIdentifierGenerator()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 17 Apr 2018 13:03:34 +0200 |
parents | 2e6b7862ccf2 |
children | 2f3007bf0708 |
comparison
equal
deleted
inserted
replaced
2534:373d75b90d3b | 2535:d3476d90dcb7 |
---|---|
51 { | 51 { |
52 TagOperation_Keep, | 52 TagOperation_Keep, |
53 TagOperation_Remove | 53 TagOperation_Remove |
54 }; | 54 }; |
55 | 55 |
56 class IDicomIdentifierGenerator : public boost::noncopyable | |
57 { | |
58 public: | |
59 virtual ~IDicomIdentifierGenerator() | |
60 { | |
61 } | |
62 | |
63 virtual bool Apply(std::string& target, | |
64 const std::string& sourceIdentifier, | |
65 ResourceType level, | |
66 const DicomMap& sourceDicom) = 0; | |
67 }; | |
68 | |
56 private: | 69 private: |
57 class RelationshipsVisitor; | 70 class RelationshipsVisitor; |
58 | 71 |
59 typedef std::set<DicomTag> SetOfTags; | 72 typedef std::set<DicomTag> SetOfTags; |
60 typedef std::map<DicomTag, Json::Value*> Replacements; | 73 typedef std::map<DicomTag, Json::Value*> Replacements; |
69 SetOfTags privateTagsToKeep_; | 82 SetOfTags privateTagsToKeep_; |
70 bool allowManualIdentifiers_; | 83 bool allowManualIdentifiers_; |
71 bool keepStudyInstanceUid_; | 84 bool keepStudyInstanceUid_; |
72 bool keepSeriesInstanceUid_; | 85 bool keepSeriesInstanceUid_; |
73 bool updateReferencedRelationships_; | 86 bool updateReferencedRelationships_; |
87 DicomMap currentSource_; | |
88 | |
89 IDicomIdentifierGenerator* identifierGenerator_; | |
74 | 90 |
75 std::string MapDicomIdentifier(const std::string& original, | 91 std::string MapDicomIdentifier(const std::string& original, |
76 ResourceType level); | 92 ResourceType level); |
77 | 93 |
78 void MapDicomTags(ParsedDicomFile& dicom, | 94 void MapDicomTags(ParsedDicomFile& dicom, |
149 | 165 |
150 void ParseModifyRequest(const Json::Value& request); | 166 void ParseModifyRequest(const Json::Value& request); |
151 | 167 |
152 void ParseAnonymizationRequest(bool& patientNameReplaced, | 168 void ParseAnonymizationRequest(bool& patientNameReplaced, |
153 const Json::Value& request); | 169 const Json::Value& request); |
170 | |
171 void SetDicomIdentifierGenerator(IDicomIdentifierGenerator& generator) | |
172 { | |
173 identifierGenerator_ = &generator; | |
174 } | |
154 }; | 175 }; |
155 } | 176 } |