OFFIS DCMTK  Version 3.6.0
djcparam.h
1 /*
2  *
3  * Copyright (C) 1997-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmjpeg
15  *
16  * Author: Norbert Olges, Marco Eichelberg
17  *
18  * Purpose: codec parameter class for dcmjpeg codecs
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:17:17 $
22  * CVS/RCS Revision: $Revision: 1.12 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 #ifndef DJCPARAM_H
30 #define DJCPARAM_H
31 
32 #include "dcmtk/config/osconfig.h"
33 #include "dcmtk/dcmdata/dccodec.h" /* for DcmCodecParameter */
34 #include "dcmtk/dcmjpeg/djutils.h" /* for enums */
35 
39 {
40 public:
41 
76  E_CompressionColorSpaceConversion pCompressionCSConversion,
77  E_DecompressionColorSpaceConversion pDecompressionCSConversion,
78  E_UIDCreation pCreateSOPInstanceUID,
79  E_PlanarConfiguration pPlanarConfiguration,
80  OFBool predictor6WorkaroundEnable = OFFalse,
81  OFBool pOptimizeHuffman = OFFalse,
82  int pSmoothingFactor = 0,
83  int pForcedBitDepth = 0,
84  Uint32 pFragmentSize = 0,
85  OFBool pCreateOffsetTable = OFTrue,
86  E_SubSampling pSampleFactors = ESS_444,
87  OFBool pWriteYBR422 = OFFalse,
88  OFBool pConvertToSC = OFFalse,
89  unsigned long pWindowType = 0,
90  unsigned long pWindowParameter = 0,
91  double pVoiCenter = 0.0,
92  double pVoiWidth = 0.0,
93  unsigned long pRoiLeft = 0,
94  unsigned long pRoiTop = 0,
95  unsigned long pRoiWidth = 0,
96  unsigned long pRoiHeight = 0,
97  OFBool pUsePixelValues = OFTrue,
98  OFBool pUseModalityRescale = OFFalse,
99  OFBool pAcceptWrongPaletteTags = OFFalse,
100  OFBool pAcrNemaCompatibility = OFFalse,
101  OFBool pTrueLosslessMode = OFTrue);
102 
105 
107  virtual ~DJCodecParameter();
108 
113  virtual DcmCodecParameter *clone() const;
114 
118  virtual const char *className() const;
119 
124  {
125  return optimizeHuffman;
126  }
127 
131  int getSmoothingFactor() const
132  {
133  return smoothingFactor;
134  }
135 
139  int getForcedBitDepth() const
140  {
141  return forcedBitDepth;
142  }
143 
147  Uint32 getFragmentSize() const
148  {
149  return fragmentSize;
150  }
151 
155  OFBool getCreateOffsetTable() const
156  {
157  return createOffsetTable;
158  }
159 
163  E_SubSampling getSampleFactors() const
164  {
165  return sampleFactors;
166  }
167 
172  OFBool getWriteYBR422() const
173  {
174  return writeYBR422;
175  }
176 
180  OFBool getConvertToSC() const
181  {
182  return convertToSC;
183  }
184 
188  E_UIDCreation getUIDCreation() const
189  {
190  return uidCreation;
191  }
192 
196  unsigned long getWindowType() const
197  {
198  return windowType;
199  }
200 
204  unsigned long getWindowParameter() const
205  {
206  return windowParameter;
207  }
208 
213  void getVOIWindow(double& center, double& width) const
214  {
215  center = voiCenter;
216  width = voiWidth;
217  }
218 
225  void getROI(
226  unsigned long& left_pos,
227  unsigned long& top_pos,
228  unsigned long& width,
229  unsigned long& height) const
230  {
231  left_pos = roiLeft;
232  top_pos = roiTop;
233  width = roiWidth;
234  height = roiHeight;
235  }
236 
240  E_PlanarConfiguration getPlanarConfiguration() const
241  {
242  return planarConfiguration;
243  }
244 
248  E_CompressionColorSpaceConversion getCompressionColorSpaceConversion() const
249  {
251  }
252 
256  E_DecompressionColorSpaceConversion getDecompressionColorSpaceConversion() const
257  {
259  }
260 
264  OFBool getUsePixelValues() const
265  {
266  return usePixelValues;
267  }
268 
272  OFBool getUseModalityRescale() const
273  {
274  return useModalityRescale;
275  }
276 
281  {
282  return acceptWrongPaletteTags;
283  }
284 
290  OFBool getAcrNemaCompatibility() const
291  {
292  return acrNemaCompatibility;
293  }
294 
298  OFBool getTrueLosslessMode() const
299  {
300  return trueLosslessMode;
301  }
302 
307  {
309  }
310 
311 private:
312 
315 
317  E_CompressionColorSpaceConversion compressionCSConversion;
318 
320  E_DecompressionColorSpaceConversion decompressionCSConversion;
321 
323  E_PlanarConfiguration planarConfiguration;
324 
327 
330 
333 
335  Uint32 fragmentSize;
336 
339 
341  E_SubSampling sampleFactors;
342 
346  OFBool writeYBR422;
347 
349  OFBool convertToSC;
350 
352  E_UIDCreation uidCreation;
353 
366  unsigned long windowType;
367 
369  unsigned long windowParameter;
370 
372  double voiCenter;
373 
375  double voiWidth;
376 
378  unsigned long roiLeft;
379 
381  unsigned long roiTop;
382 
384  unsigned long roiWidth;
385 
387  unsigned long roiHeight;
388 
391 
394 
397 
400 
403 
406 
407 };
408 
409 
410 #endif
411 
412 /*
413  * CVS/RCS Log
414  * $Log: djcparam.h,v $
415  * Revision 1.12 2010-10-14 13:17:17 joergr
416  * Updated copyright header. Added reference to COPYRIGHT file.
417  *
418  * Revision 1.11 2010-06-01 16:17:49 onken
419  * Added some comments and line breaks (improved code readability).
420  *
421  * Revision 1.10 2010-03-24 15:01:34 joergr
422  * Fixed minor formatting issues in API documentation.
423  *
424  * Revision 1.9 2009-10-07 12:44:33 uli
425  * Switched to logging mechanism provided by the "new" oflog module.
426  *
427  * Revision 1.8 2006-03-29 15:58:52 meichel
428  * Added support for decompressing images with 16 bits/pixel compressed with
429  * a faulty lossless JPEG encoder that produces integer overflows in predictor 6.
430  *
431  * Revision 1.7 2005/12/08 16:59:13 meichel
432  * Changed include path schema for all DCMTK header files
433  *
434  * Revision 1.6 2005/11/29 15:57:05 onken
435  * Added commandline options --accept-acr-nema and --accept-palettes
436  * (same as in dcm2pnm) to dcmcjpeg and extended dcmjpeg to support
437  * these options. Thanks to Gilles Mevel for suggestion.
438  *
439  * Revision 1.4 2005/11/29 08:50:34 onken
440  * Added support for "true" lossless compression in dcmjpeg, that doesn't
441  * use dcmimage classes, but compresses raw pixel data (8 and 16 bit) to
442  * avoid losses in quality caused by color space conversions or modality
443  * transformations etc.
444  * Corresponding commandline option in dcmcjpeg (new default)
445  *
446  * Revision 1.3 2002/12/09 13:51:26 joergr
447  * Renamed parameter/local variable to avoid name clashes with global
448  * declaration left and/or right (used for as iostream manipulators).
449  *
450  * Revision 1.2 2001/11/19 15:13:26 meichel
451  * Introduced verbose mode in module dcmjpeg. If enabled, warning
452  * messages from the IJG library are printed on ofConsole, otherwise
453  * the library remains quiet.
454  *
455  * Revision 1.1 2001/11/13 15:56:17 meichel
456  * Initial release of module dcmjpeg
457  *
458  *
459  */


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2