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 #ifndef DJCPARAM_H
00030 #define DJCPARAM_H
00031
00032 #include "dcmtk/config/osconfig.h"
00033 #include "dcmtk/dcmdata/dccodec.h"
00034 #include "dcmtk/dcmjpeg/djutils.h"
00035
00038 class DJCodecParameter: public DcmCodecParameter
00039 {
00040 public:
00041
00075 DJCodecParameter(
00076 E_CompressionColorSpaceConversion pCompressionCSConversion,
00077 E_DecompressionColorSpaceConversion pDecompressionCSConversion,
00078 E_UIDCreation pCreateSOPInstanceUID,
00079 E_PlanarConfiguration pPlanarConfiguration,
00080 OFBool predictor6WorkaroundEnable = OFFalse,
00081 OFBool pOptimizeHuffman = OFFalse,
00082 int pSmoothingFactor = 0,
00083 int pForcedBitDepth = 0,
00084 Uint32 pFragmentSize = 0,
00085 OFBool pCreateOffsetTable = OFTrue,
00086 E_SubSampling pSampleFactors = ESS_444,
00087 OFBool pWriteYBR422 = OFFalse,
00088 OFBool pConvertToSC = OFFalse,
00089 unsigned long pWindowType = 0,
00090 unsigned long pWindowParameter = 0,
00091 double pVoiCenter = 0.0,
00092 double pVoiWidth = 0.0,
00093 unsigned long pRoiLeft = 0,
00094 unsigned long pRoiTop = 0,
00095 unsigned long pRoiWidth = 0,
00096 unsigned long pRoiHeight = 0,
00097 OFBool pUsePixelValues = OFTrue,
00098 OFBool pUseModalityRescale = OFFalse,
00099 OFBool pAcceptWrongPaletteTags = OFFalse,
00100 OFBool pAcrNemaCompatibility = OFFalse,
00101 OFBool pTrueLosslessMode = OFTrue);
00102
00104 DJCodecParameter(const DJCodecParameter& arg);
00105
00107 virtual ~DJCodecParameter();
00108
00113 virtual DcmCodecParameter *clone() const;
00114
00118 virtual const char *className() const;
00119
00123 OFBool getOptimizeHuffmanCoding() const
00124 {
00125 return optimizeHuffman;
00126 }
00127
00131 int getSmoothingFactor() const
00132 {
00133 return smoothingFactor;
00134 }
00135
00139 int getForcedBitDepth() const
00140 {
00141 return forcedBitDepth;
00142 }
00143
00147 Uint32 getFragmentSize() const
00148 {
00149 return fragmentSize;
00150 }
00151
00155 OFBool getCreateOffsetTable() const
00156 {
00157 return createOffsetTable;
00158 }
00159
00163 E_SubSampling getSampleFactors() const
00164 {
00165 return sampleFactors;
00166 }
00167
00172 OFBool getWriteYBR422() const
00173 {
00174 return writeYBR422;
00175 }
00176
00180 OFBool getConvertToSC() const
00181 {
00182 return convertToSC;
00183 }
00184
00188 E_UIDCreation getUIDCreation() const
00189 {
00190 return uidCreation;
00191 }
00192
00196 unsigned long getWindowType() const
00197 {
00198 return windowType;
00199 }
00200
00204 unsigned long getWindowParameter() const
00205 {
00206 return windowParameter;
00207 }
00208
00213 void getVOIWindow(double& center, double& width) const
00214 {
00215 center = voiCenter;
00216 width = voiWidth;
00217 }
00218
00225 void getROI(
00226 unsigned long& left_pos,
00227 unsigned long& top_pos,
00228 unsigned long& width,
00229 unsigned long& height) const
00230 {
00231 left_pos = roiLeft;
00232 top_pos = roiTop;
00233 width = roiWidth;
00234 height = roiHeight;
00235 }
00236
00240 E_PlanarConfiguration getPlanarConfiguration() const
00241 {
00242 return planarConfiguration;
00243 }
00244
00248 E_CompressionColorSpaceConversion getCompressionColorSpaceConversion() const
00249 {
00250 return compressionCSConversion;
00251 }
00252
00256 E_DecompressionColorSpaceConversion getDecompressionColorSpaceConversion() const
00257 {
00258 return decompressionCSConversion;
00259 }
00260
00264 OFBool getUsePixelValues() const
00265 {
00266 return usePixelValues;
00267 }
00268
00272 OFBool getUseModalityRescale() const
00273 {
00274 return useModalityRescale;
00275 }
00276
00280 OFBool getAcceptWrongPaletteTags() const
00281 {
00282 return acceptWrongPaletteTags;
00283 }
00284
00290 OFBool getAcrNemaCompatibility() const
00291 {
00292 return acrNemaCompatibility;
00293 }
00294
00298 OFBool getTrueLosslessMode() const
00299 {
00300 return trueLosslessMode;
00301 }
00302
00306 OFBool predictor6WorkaroundEnabled() const
00307 {
00308 return predictor6WorkaroundEnabled_;
00309 }
00310
00311 private:
00312
00314 DJCodecParameter& operator=(const DJCodecParameter&);
00315
00317 E_CompressionColorSpaceConversion compressionCSConversion;
00318
00320 E_DecompressionColorSpaceConversion decompressionCSConversion;
00321
00323 E_PlanarConfiguration planarConfiguration;
00324
00326 OFBool optimizeHuffman;
00327
00329 int smoothingFactor;
00330
00332 int forcedBitDepth;
00333
00335 Uint32 fragmentSize;
00336
00338 OFBool createOffsetTable;
00339
00341 E_SubSampling sampleFactors;
00342
00346 OFBool writeYBR422;
00347
00349 OFBool convertToSC;
00350
00352 E_UIDCreation uidCreation;
00353
00366 unsigned long windowType;
00367
00369 unsigned long windowParameter;
00370
00372 double voiCenter;
00373
00375 double voiWidth;
00376
00378 unsigned long roiLeft;
00379
00381 unsigned long roiTop;
00382
00384 unsigned long roiWidth;
00385
00387 unsigned long roiHeight;
00388
00390 OFBool usePixelValues;
00391
00393 OFBool useModalityRescale;
00394
00396 OFBool acceptWrongPaletteTags;
00397
00399 OFBool acrNemaCompatibility;
00400
00402 OFBool trueLosslessMode;
00403
00405 OFBool predictor6WorkaroundEnabled_;
00406
00407 };
00408
00409
00410 #endif
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
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459