comparison OrthancFramework/Sources/DicomParsing/DcmtkTranscoder.cpp @ 4200:7112a8af0b63

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Sep 2020 20:53:31 +0200
parents bf7b9edf6b81
children 785a2713323e
comparison
equal deleted inserted replaced
4199:fbc49a65340a 4200:7112a8af0b63
51 } 51 }
52 52
53 53
54 void DcmtkTranscoder::SetLossyQuality(unsigned int quality) 54 void DcmtkTranscoder::SetLossyQuality(unsigned int quality)
55 { 55 {
56 if (quality <= 0 || 56 if (quality == 0 ||
57 quality > 100) 57 quality > 100)
58 { 58 {
59 throw OrthancException( 59 throw OrthancException(
60 ErrorCode_ParameterOutOfRange, 60 ErrorCode_ParameterOutOfRange,
61 "The quality for lossy transcoding must be an integer between 1 and 100, received: " + 61 "The quality for lossy transcoding must be an integer between 1 and 100, received: " +
86 "Cannot determine the transfer syntax"); 86 "Cannot determine the transfer syntax");
87 } 87 }
88 88
89 uint16_t bitsStored; 89 uint16_t bitsStored;
90 bool hasBitsStored = GetBitsStored(bitsStored, *dicom.getDataset()); 90 bool hasBitsStored = GetBitsStored(bitsStored, *dicom.getDataset());
91
92 std::string sourceSopInstanceUid = IDicomTranscoder::GetSopInstanceUid(dicom);
93 91
94 if (allowedSyntaxes.find(syntax) != allowedSyntaxes.end()) 92 if (allowedSyntaxes.find(syntax) != allowedSyntaxes.end())
95 { 93 {
96 // No transcoding is needed 94 // No transcoding is needed
97 return true; 95 return true;