Mercurial > hg > orthanc
comparison OrthancServer/DicomProtocol/DicomFindAnswers.cpp @ 1797:23722a191e4e worklists
worklists are working
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 20 Nov 2015 11:37:58 +0100 |
parents | bdcc1dba4a53 |
children | 559956d5ceb2 |
comparison
equal
deleted
inserted
replaced
1796:5e08a5fe6b27 | 1797:23722a191e4e |
---|---|
46 class DicomFindAnswers::Answer | 46 class DicomFindAnswers::Answer |
47 { | 47 { |
48 private: | 48 private: |
49 ParsedDicomFile* dicom_; | 49 ParsedDicomFile* dicom_; |
50 DicomMap* map_; | 50 DicomMap* map_; |
51 | 51 |
52 void CleanupDicom() | |
53 { | |
54 if (dicom_ != NULL) | |
55 { | |
56 dicom_->Remove(DICOM_TAG_MEDIA_STORAGE_SOP_INSTANCE_UID); | |
57 dicom_->Remove(DICOM_TAG_SOP_INSTANCE_UID); | |
58 } | |
59 } | |
60 | |
52 public: | 61 public: |
53 Answer(ParsedDicomFile& dicom) : | 62 Answer(ParsedDicomFile& dicom) : |
54 dicom_(dicom.Clone()), | 63 dicom_(dicom.Clone()), |
55 map_(NULL) | 64 map_(NULL) |
56 { | 65 { |
66 CleanupDicom(); | |
57 } | 67 } |
58 | 68 |
59 Answer(const char* dicom, | 69 Answer(const char* dicom, |
60 size_t size) : | 70 size_t size) : |
61 dicom_(new ParsedDicomFile(dicom, size)), | 71 dicom_(new ParsedDicomFile(dicom, size)), |
62 map_(NULL) | 72 map_(NULL) |
63 { | 73 { |
74 CleanupDicom(); | |
64 } | 75 } |
65 | 76 |
66 Answer(const DicomMap& map) : | 77 Answer(const DicomMap& map) : |
67 dicom_(NULL), | 78 dicom_(NULL), |
68 map_(map.Clone()) | 79 map_(map.Clone()) |