comparison OrthancServer/ServerContext.cpp @ 3910:1f71c2f20e16 transcoding

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 08 May 2020 12:03:26 +0200
parents f0dd5ded8927
children 0ef7f4528be2
comparison
equal deleted inserted replaced
3909:6762a97deabc 3910:1f71c2f20e16
1155 } 1155 }
1156 1156
1157 1157
1158 bool ServerContext::Transcode(std::string& target /* out */, 1158 bool ServerContext::Transcode(std::string& target /* out */,
1159 DicomTransferSyntax& sourceSyntax /* out */, 1159 DicomTransferSyntax& sourceSyntax /* out */,
1160 DicomTransferSyntax& targetSyntax /* out */,
1161 bool& hasSopInstanceUidChanged /* out */, 1160 bool& hasSopInstanceUidChanged /* out */,
1162 ParsedDicomFile& dicom, // Possibly modified 1161 ParsedDicomFile& dicom, // Possibly modified
1163 const std::set<DicomTransferSyntax>& allowedSyntaxes, 1162 DicomTransferSyntax targetSyntax,
1164 bool allowNewSopInstanceUid) 1163 bool allowNewSopInstanceUid)
1165 { 1164 {
1166 IDicomTranscoder* transcoder = dcmtkTranscoder_.get(); 1165 IDicomTranscoder* transcoder = dcmtkTranscoder_.get();
1167 1166
1168 #if ORTHANC_ENABLE_PLUGINS == 1 1167 #if ORTHANC_ENABLE_PLUGINS == 1
1174 1173
1175 if (transcoder == NULL) 1174 if (transcoder == NULL)
1176 { 1175 {
1177 throw OrthancException(ErrorCode_InternalError); 1176 throw OrthancException(ErrorCode_InternalError);
1178 } 1177 }
1179 1178 else
1180 return transcoder->TranscodeParsedToBuffer( 1179 {
1181 target, sourceSyntax, targetSyntax, hasSopInstanceUidChanged, 1180 return transcoder->TranscodeParsedToBuffer(
1182 dicom.GetDcmtkObject(), allowedSyntaxes, allowNewSopInstanceUid); 1181 target, sourceSyntax, hasSopInstanceUidChanged,
1182 dicom.GetDcmtkObject(), targetSyntax, allowNewSopInstanceUid);
1183 }
1183 } 1184 }
1184 } 1185 }