Mercurial > hg > orthanc
comparison OrthancServer/FromDcmtkBridge.cpp @ 315:fc856d175d18
modifications
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 21 Dec 2012 17:18:04 +0100 |
parents | 26efccdff583 |
children | b83d85a85d69 |
comparison
equal
deleted
inserted
replaced
314:4f17834a50b6 | 315:fc856d175d18 |
---|---|
688 | 688 |
689 return true; | 689 return true; |
690 } | 690 } |
691 | 691 |
692 | 692 |
693 | |
694 DicomInstanceHasher ParsedDicomFile::GetHasher() | |
695 { | |
696 std::string patientId, studyUid, seriesUid, instanceUid; | |
697 | |
698 if (!GetTagValue(patientId, DICOM_TAG_PATIENT_ID) || | |
699 !GetTagValue(studyUid, DICOM_TAG_STUDY_INSTANCE_UID) || | |
700 !GetTagValue(seriesUid, DICOM_TAG_SERIES_INSTANCE_UID) || | |
701 !GetTagValue(instanceUid, DICOM_TAG_SOP_INSTANCE_UID)) | |
702 { | |
703 throw OrthancException(ErrorCode_BadFileFormat); | |
704 } | |
705 | |
706 return DicomInstanceHasher(patientId, studyUid, seriesUid, instanceUid); | |
707 } | |
708 | |
709 | |
693 void FromDcmtkBridge::Convert(DicomMap& target, DcmDataset& dataset) | 710 void FromDcmtkBridge::Convert(DicomMap& target, DcmDataset& dataset) |
694 { | 711 { |
695 target.Clear(); | 712 target.Clear(); |
696 for (unsigned long i = 0; i < dataset.card(); i++) | 713 for (unsigned long i = 0; i < dataset.card(); i++) |
697 { | 714 { |