Mercurial > hg > orthanc
comparison OrthancFramework/Sources/DicomFormat/DicomInstanceHasher.cpp @ 4985:c767035fff77
cppcheck
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 25 Apr 2022 19:17:28 +0200 |
parents | 43e613a7756b |
children | 0ea402b4d901 |
comparison
equal
deleted
inserted
replaced
4984:c8cdf5163cd2 | 4985:c767035fff77 |
---|---|
83 const std::string &DicomInstanceHasher::GetInstanceUid() const | 83 const std::string &DicomInstanceHasher::GetInstanceUid() const |
84 { | 84 { |
85 return instanceUid_; | 85 return instanceUid_; |
86 } | 86 } |
87 | 87 |
88 const std::string& DicomInstanceHasher::HashPatient() | 88 const std::string& DicomInstanceHasher::HashPatient() const |
89 { | 89 { |
90 if (patientHash_.size() == 0) | 90 if (patientHash_.size() == 0) |
91 { | 91 { |
92 Toolbox::ComputeSHA1(patientHash_, patientId_); | 92 Toolbox::ComputeSHA1(patientHash_, patientId_); |
93 } | 93 } |
94 | 94 |
95 return patientHash_; | 95 return patientHash_; |
96 } | 96 } |
97 | 97 |
98 const std::string& DicomInstanceHasher::HashStudy() | 98 const std::string& DicomInstanceHasher::HashStudy() const |
99 { | 99 { |
100 if (studyHash_.size() == 0) | 100 if (studyHash_.size() == 0) |
101 { | 101 { |
102 Toolbox::ComputeSHA1(studyHash_, patientId_ + "|" + studyUid_); | 102 Toolbox::ComputeSHA1(studyHash_, patientId_ + "|" + studyUid_); |
103 } | 103 } |
104 | 104 |
105 return studyHash_; | 105 return studyHash_; |
106 } | 106 } |
107 | 107 |
108 const std::string& DicomInstanceHasher::HashSeries() | 108 const std::string& DicomInstanceHasher::HashSeries() const |
109 { | 109 { |
110 if (seriesHash_.size() == 0) | 110 if (seriesHash_.size() == 0) |
111 { | 111 { |
112 Toolbox::ComputeSHA1(seriesHash_, patientId_ + "|" + studyUid_ + "|" + seriesUid_); | 112 Toolbox::ComputeSHA1(seriesHash_, patientId_ + "|" + studyUid_ + "|" + seriesUid_); |
113 } | 113 } |
114 | 114 |
115 return seriesHash_; | 115 return seriesHash_; |
116 } | 116 } |
117 | 117 |
118 const std::string& DicomInstanceHasher::HashInstance() | 118 const std::string& DicomInstanceHasher::HashInstance() const |
119 { | 119 { |
120 if (instanceHash_.size() == 0) | 120 if (instanceHash_.size() == 0) |
121 { | 121 { |
122 Toolbox::ComputeSHA1(instanceHash_, patientId_ + "|" + studyUid_ + "|" + seriesUid_ + "|" + instanceUid_); | 122 Toolbox::ComputeSHA1(instanceHash_, patientId_ + "|" + studyUid_ + "|" + seriesUid_ + "|" + instanceUid_); |
123 } | 123 } |