00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef DJCPARAM_H
00035 #define DJCPARAM_H
00036
00037 #include "dcmtk/config/osconfig.h"
00038 #include "dcmtk/dcmdata/dccodec.h"
00039 #include "dcmtk/dcmjpeg/djutils.h"
00040
00043 class DJCodecParameter: public DcmCodecParameter
00044 {
00045 public:
00046
00079 DJCodecParameter(
00080 E_CompressionColorSpaceConversion pCompressionCSConversion,
00081 E_DecompressionColorSpaceConversion pDecompressionCSConversion,
00082 E_UIDCreation pCreateSOPInstanceUID,
00083 E_PlanarConfiguration pPlanarConfiguration,
00084 OFBool pVerbose = OFFalse,
00085 OFBool pOptimizeHuffman = OFFalse,
00086 int pSmoothingFactor = 0,
00087 int pForcedBitDepth = 0,
00088 Uint32 pFragmentSize = 0,
00089 OFBool pCreateOffsetTable = OFTrue,
00090 E_SubSampling pSampleFactors = ESS_444,
00091 OFBool pWriteYBR422 = OFFalse,
00092 OFBool pConvertToSC = OFFalse,
00093 unsigned long pWindowType = 0,
00094 unsigned long pWindowParameter = 0,
00095 double pVoiCenter = 0.0,
00096 double pVoiWidth = 0.0,
00097 unsigned long pRoiLeft = 0,
00098 unsigned long pRoiTop = 0,
00099 unsigned long pRoiWidth = 0,
00100 unsigned long pRoiHeight = 0,
00101 OFBool pUsePixelValues = OFTrue,
00102 OFBool pUseModalityRescale = OFFalse,
00103 OFBool pAcceptWrongPaletteTags = OFFalse,
00104 OFBool pAcrNemaCompatibility = OFFalse,
00105 OFBool pTrueLosslessMode = OFTrue);
00106
00108 DJCodecParameter(const DJCodecParameter& arg);
00109
00111 virtual ~DJCodecParameter();
00112
00117 virtual DcmCodecParameter *clone() const;
00118
00122 virtual const char *className() const;
00123
00127 OFBool getOptimizeHuffmanCoding() const
00128 {
00129 return optimizeHuffman;
00130 }
00131
00135 int getSmoothingFactor() const
00136 {
00137 return smoothingFactor;
00138 }
00139
00143 int getForcedBitDepth() const
00144 {
00145 return forcedBitDepth;
00146 }
00147
00151 Uint32 getFragmentSize() const
00152 {
00153 return fragmentSize;
00154 }
00155
00159 OFBool getCreateOffsetTable() const
00160 {
00161 return createOffsetTable;
00162 }
00163
00167 E_SubSampling getSampleFactors() const
00168 {
00169 return sampleFactors;
00170 }
00171
00176 OFBool getWriteYBR422() const
00177 {
00178 return writeYBR422;
00179 }
00180
00184 OFBool getConvertToSC() const
00185 {
00186 return convertToSC;
00187 }
00188
00192 E_UIDCreation getUIDCreation() const
00193 {
00194 return uidCreation;
00195 }
00196
00200 unsigned long getWindowType() const
00201 {
00202 return windowType;
00203 }
00204
00208 unsigned long getWindowParameter() const
00209 {
00210 return windowParameter;
00211 }
00212
00217 void getVOIWindow(double& center, double& width) const
00218 {
00219 center = voiCenter;
00220 width = voiWidth;
00221 }
00222
00229 void getROI(
00230 unsigned long& left_pos,
00231 unsigned long& top_pos,
00232 unsigned long& width,
00233 unsigned long& height) const
00234 {
00235 left_pos = roiLeft;
00236 top_pos = roiTop;
00237 width = roiWidth;
00238 height = roiHeight;
00239 }
00240
00244 E_PlanarConfiguration getPlanarConfiguration() const
00245 {
00246 return planarConfiguration;
00247 }
00248
00252 E_CompressionColorSpaceConversion getCompressionColorSpaceConversion() const
00253 {
00254 return compressionCSConversion;
00255 }
00256
00260 E_DecompressionColorSpaceConversion getDecompressionColorSpaceConversion() const
00261 {
00262 return decompressionCSConversion;
00263 }
00264
00268 OFBool getUsePixelValues() const
00269 {
00270 return usePixelValues;
00271 }
00272
00276 OFBool getUseModalityRescale() const
00277 {
00278 return useModalityRescale;
00279 }
00280
00284 OFBool getAcceptWrongPaletteTags() const
00285 {
00286 return acceptWrongPaletteTags;
00287 }
00288
00294 OFBool getAcrNemaCompatibility() const
00295 {
00296 return acrNemaCompatibility;
00297 }
00298
00302 OFBool getTrueLosslessMode() const
00303 {
00304 return trueLosslessMode;
00305 }
00306
00310 OFBool isVerbose() const
00311 {
00312 return verboseMode;
00313 }
00314
00315 private:
00316
00318 DJCodecParameter& operator=(const DJCodecParameter&);
00319
00321 E_CompressionColorSpaceConversion compressionCSConversion;
00322
00324 E_DecompressionColorSpaceConversion decompressionCSConversion;
00325
00327 E_PlanarConfiguration planarConfiguration;
00328
00330 OFBool optimizeHuffman;
00331
00333 int smoothingFactor;
00334
00336 int forcedBitDepth;
00337
00339 Uint32 fragmentSize;
00340
00342 OFBool createOffsetTable;
00343
00345 E_SubSampling sampleFactors;
00346
00350 OFBool writeYBR422;
00351
00353 OFBool convertToSC;
00354
00356 E_UIDCreation uidCreation;
00357
00359 unsigned long windowType;
00360
00362 unsigned long windowParameter;
00363
00365 double voiCenter;
00366
00368 double voiWidth;
00369
00371 unsigned long roiLeft;
00372
00374 unsigned long roiTop;
00375
00377 unsigned long roiWidth;
00378
00380 unsigned long roiHeight;
00381
00383 OFBool usePixelValues;
00384
00386 OFBool useModalityRescale;
00387
00389 OFBool acceptWrongPaletteTags;
00390
00392 OFBool acrNemaCompatibility;
00393
00395 OFBool trueLosslessMode;
00396
00398 OFBool verboseMode;
00399 };
00400
00401
00402 #endif
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435