Mercurial > hg > orthanc
diff Core/DicomFormat/DicomInstanceHasher.cpp @ 315:fc856d175d18
modifications
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 21 Dec 2012 17:18:04 +0100 |
parents | 78e28d0098d9 |
children | bdd72233b105 |
line wrap: on
line diff
--- a/Core/DicomFormat/DicomInstanceHasher.cpp Fri Dec 21 13:53:24 2012 +0100 +++ b/Core/DicomFormat/DicomInstanceHasher.cpp Fri Dec 21 17:18:04 2012 +0100 @@ -36,12 +36,15 @@ namespace Orthanc { - DicomInstanceHasher::DicomInstanceHasher(const DicomMap& instance) + void DicomInstanceHasher::Setup(const std::string& patientId, + const std::string& studyUid, + const std::string& seriesUid, + const std::string& instanceUid) { - patientId_ = instance.GetValue(DICOM_TAG_PATIENT_ID).AsString(); - studyUid_ = instance.GetValue(DICOM_TAG_STUDY_INSTANCE_UID).AsString(); - seriesUid_ = instance.GetValue(DICOM_TAG_SERIES_INSTANCE_UID).AsString(); - instanceUid_ = instance.GetValue(DICOM_TAG_SOP_INSTANCE_UID).AsString(); + patientId_ = patientId; + studyUid_ = studyUid; + seriesUid_ = seriesUid; + instanceUid_ = instanceUid; if (patientId_.size() == 0 || studyUid_.size() == 0 || @@ -52,6 +55,14 @@ } } + DicomInstanceHasher::DicomInstanceHasher(const DicomMap& instance) + { + Setup(instance.GetValue(DICOM_TAG_PATIENT_ID).AsString(), + instance.GetValue(DICOM_TAG_STUDY_INSTANCE_UID).AsString(), + instance.GetValue(DICOM_TAG_SERIES_INSTANCE_UID).AsString(), + instance.GetValue(DICOM_TAG_SOP_INSTANCE_UID).AsString()); + } + const std::string& DicomInstanceHasher::HashPatient() { if (patientHash_.size() == 0)