comparison Framework/DicomizerParameters.cpp @ 91:8fd5bf76bb8e

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 22 Dec 2016 20:18:34 +0100
parents 147bd6dc28db
children ff0ef01c332c
comparison
equal deleted inserted replaced
90:bdc5cb0db9bf 91:8fd5bf76bb8e
51 51
52 return nthreads; 52 return nthreads;
53 } 53 }
54 54
55 55
56 DicomizerParameters::DicomizerParameters() 56 DicomizerParameters::DicomizerParameters() :
57 { 57 safetyCheck_(false),
58 safetyCheck_ = false; 58 repaintBackground_(false),
59 repaintBackground_ = false; 59 targetCompression_(ImageCompression_Jpeg),
60 hasTargetTileSize_(false),
61 targetTileWidth_(512),
62 targetTileHeight_(512),
63 maxDicomFileSize_(10 * 1024 * 1024), // 10MB
64 reconstructPyramid_(false),
65 pyramidLevelsCount_(0),
66 pyramidLowerLevelsCount_(0),
67 smooth_(false),
68 jpegQuality_(90),
69 forceReencode_(false),
70 opticalPath_(OpticalPath_Brightfield)
71 {
60 backgroundColor_[0] = 255; 72 backgroundColor_[0] = 255;
61 backgroundColor_[1] = 255; 73 backgroundColor_[1] = 255;
62 backgroundColor_[2] = 255; 74 backgroundColor_[2] = 255;
63 targetCompression_ = ImageCompression_Jpeg;
64 hasTargetTileSize_ = false;
65 threadsCount_ = ChooseNumberOfThreads(); 75 threadsCount_ = ChooseNumberOfThreads();
66 maxDicomFileSize_ = 10 * 1024 * 1024; // 10MB
67 reconstructPyramid_ = false;
68 pyramidLevelsCount_ = 0;
69 pyramidLowerLevelsCount_ = 0;
70 smooth_ = false;
71 jpegQuality_ = 90;
72 forceReencode_ = false;
73 opticalPath_ = OpticalPath_Brightfield;
74 } 76 }
75 77
76 78
77 void DicomizerParameters::SetBackgroundColor(uint8_t red, 79 void DicomizerParameters::SetBackgroundColor(uint8_t red,
78 uint8_t green, 80 uint8_t green,
144 } 146 }
145 147
146 148
147 void DicomizerParameters::SetPyramidLevelsCount(unsigned int count) 149 void DicomizerParameters::SetPyramidLevelsCount(unsigned int count)
148 { 150 {
149 if (count <= 0) 151 if (count == 0)
150 { 152 {
151 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); 153 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
152 } 154 }
153 155
154 pyramidLevelsCount_ = count; 156 pyramidLevelsCount_ = count;
193 } 195 }
194 196
195 197
196 void DicomizerParameters::SetPyramidLowerLevelsCount(unsigned int count) 198 void DicomizerParameters::SetPyramidLowerLevelsCount(unsigned int count)
197 { 199 {
198 if (count <= 0) 200 if (count == 0)
199 { 201 {
200 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); 202 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
201 } 203 }
202 204
203 pyramidLowerLevelsCount_ = count; 205 pyramidLowerLevelsCount_ = count;