comparison Core/DicomParsing/IDicomTranscoder.cpp @ 3912:7610af1532c3 transcoding

prototyping automated transcoding of incoming DICOM files
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 08 May 2020 13:43:50 +0200
parents f0dd5ded8927
children aae045f802f4
comparison
equal deleted inserted replaced
3911:0ef7f4528be2 3912:7610af1532c3
84 { 84 {
85 return *external_; 85 return *external_;
86 } 86 }
87 else 87 else
88 { 88 {
89 throw OrthancException(ErrorCode_InternalError); 89 // Probably results from a call to "ReleaseDicom()"
90 throw OrthancException(ErrorCode_BadSequenceOfCalls);
90 } 91 }
91 } 92 }
93
94
95 DcmFileFormat* IDicomTranscoder::TranscodedDicom::ReleaseDicom()
96 {
97 if (internal_.get() != NULL)
98 {
99 return internal_.release();
100 }
101 else if (external_ != NULL)
102 {
103 return new DcmFileFormat(*external_); // Clone
104 }
105 else
106 {
107 // Probably results from a call to "ReleaseDicom()"
108 throw OrthancException(ErrorCode_BadSequenceOfCalls);
109 }
110 }
92 } 111 }