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: dcmjpls
15  *
16  * Author: Martin Willkomm, Uli Schlachter
17  *
18  * Purpose: codec parameter class JPEG-LS codecs
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:17:19 $
22  * CVS/RCS Revision: $Revision: 1.7 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 #ifndef DCMJPLS_DJCPARAM_H
30 #define DCMJPLS_DJCPARAM_H
31 
32 #include "dcmtk/config/osconfig.h"
33 #include "dcmtk/dcmdata/dccodec.h" /* for DcmCodecParameter */
34 #include "dcmtk/dcmjpls/djlsutil.h" /* for enums */
35 
39 {
40 public:
41 
45  {
55  };
56 
74  OFBool jpls_optionsEnabled,
75  Uint16 jpls_t1 = 3, // these are the defaults for 8bpp in lossless mode
76  Uint16 jpls_t2 = 7,
77  Uint16 jpls_t3 = 21,
78  Uint16 jpls_reset = 64,
79  Uint16 jpls_limit = 0,
80  OFBool preferCookedEncoding = OFTrue,
81  Uint32 fragmentSize = 0,
82  OFBool createOffsetTable = OFTrue,
83  JLS_UIDCreation uidCreation = EJLSUC_default,
84  OFBool convertToSC = OFFalse,
85  JLS_PlanarConfiguration planarConfiguration = EJLSPC_restore,
86  OFBool ignoreOffsetTable = OFFalse,
87  interleaveMode jplsInterleaveMode = interleaveLine);
88 
95  JLS_UIDCreation uidCreation = EJLSUC_default,
96  JLS_PlanarConfiguration planarConfiguration = EJLSPC_restore,
97  OFBool ignoreOffsetTable = OFFalse);
98 
101 
103  virtual ~DJLSCodecParameter();
104 
109  virtual DcmCodecParameter *clone() const;
110 
114  virtual const char *className() const;
115 
119  OFBool getConvertToSC() const
120  {
121  return convertToSC_;
122  }
123 
127  OFBool getCreateOffsetTable() const
128  {
129  return createOffsetTable_;
130  }
131 
135  JLS_UIDCreation getUIDCreation() const
136  {
137  return uidCreation_;
138  }
139 
143  JLS_PlanarConfiguration getPlanarConfiguration() const
144  {
145  return planarConfiguration_;
146  }
147 
152  OFBool cookedEncodingPreferred() const
153  {
154  return preferCookedEncoding_;
155  }
156 
160  Uint32 getFragmentSize() const
161  {
162  return fragmentSize_;
163  }
164 
168  Uint16 getT1() const
169  {
170  return jpls_t1_;
171  }
172 
176  Uint16 getT2() const
177  {
178  return jpls_t2_;
179  }
180 
184  Uint16 getT3() const
185  {
186  return jpls_t3_;
187  }
188 
192  Uint16 getReset() const
193  {
194  return jpls_reset_;
195  }
196 
200  Uint16 getLimit() const
201  {
202  return jpls_t1_;
203  }
204 
208  OFBool getUseCustomOptions() const
209  {
210  return jpls_optionsEnabled_;
211  }
212 
216  OFBool ignoreOffsetTable() const
217  {
218  return ignoreOffsetTable_;
219  }
220 
225  {
226  return jplsInterleaveMode_;
227  }
228 
229 private:
230 
233 
234  // ****************************************************
235  // **** Parameters describing the encoding process ****
236 
239 
241  Uint16 jpls_t1_;
242 
244  Uint16 jpls_t2_;
245 
247  Uint16 jpls_t3_;
248 
250  Uint16 jpls_reset_;
251 
253  Uint16 jpls_limit_;
254 
257 
260 
263 
265  JLS_UIDCreation uidCreation_;
266 
268  OFBool convertToSC_;
269 
272 
273  // ****************************************************
274  // **** Parameters describing the decoding process ****
275 
277  JLS_PlanarConfiguration planarConfiguration_;
278 
281 
282 };
283 
284 
285 #endif
286 
287 /*
288  * CVS/RCS Log:
289  * $Log: djcparam.h,v $
290  * Revision 1.7 2010-10-14 13:17:19 joergr
291  * Updated copyright header. Added reference to COPYRIGHT file.
292  *
293  * Revision 1.6 2010-03-01 10:35:28 uli
294  * Renamed include guards to avoid name clash with e.g. dcmjpeg.
295  *
296  * Revision 1.5 2010-02-25 10:17:14 uli
297  * Fix doxygen comments in a couple of places.
298  *
299  * Revision 1.4 2009-10-07 13:16:47 uli
300  * Switched to logging mechanism provided by the "new" oflog module.
301  *
302  * Revision 1.3 2009-07-31 10:18:37 meichel
303  * Line interleaved JPEG-LS mode now default. This mode works correctly
304  * when decompressing images with the LOCO-I reference implementation.
305  *
306  * Revision 1.2 2009-07-31 09:14:53 meichel
307  * Added codec parameter and command line options that allow to control
308  * the interleave mode used in the JPEG-LS bitstream when compressing
309  * color images.
310  *
311  * Revision 1.1 2009-07-29 14:46:46 meichel
312  * Initial release of module dcmjpls, a JPEG-LS codec for DCMTK based on CharLS
313  *
314  * Revision 1.1 2007-06-15 14:35:45 meichel
315  * Renamed CMake project and include directory from dcmjpgls to dcmjpls
316  *
317  * Revision 1.4 2007/06/15 10:39:15 meichel
318  * Completed implementation of decoder, which now correctly processes all
319  * of the NEMA JPEG-LS sample images, including fragmented frames.
320  *
321  * Revision 1.3 2007/06/14 12:36:14 meichel
322  * Further code clean-up. Updated doxygen comments.
323  *
324  * Revision 1.2 2007/06/13 16:41:07 meichel
325  * Code clean-up and removal of dead code
326  *
327  *
328  */
Uint16 getT1() const
returns JPEG-LS parameter T1
Definition: djcparam.h:168
OFBool ignoreOffsetTable_
flag indicating if temporary files should be kept, false if they should be deleted after use ...
Definition: djcparam.h:280
DJLSCodecParameter & operator=(const DJLSCodecParameter &)
private undefined copy assignment operator
Uint32 fragmentSize_
maximum fragment size (in kbytes) for compression, 0 for unlimited.
Definition: djcparam.h:256
Uint16 getT2() const
returns JPEG-LS parameter T2
Definition: djcparam.h:176
JLS_UIDCreation getUIDCreation() const
returns mode for SOP Instance UID creation
Definition: djcparam.h:135
JLS_UIDCreation uidCreation_
mode for SOP Instance UID creation (used both for encoding and decoding)
Definition: djcparam.h:265
Line-interleaved (color-by-line)
Definition: djcparam.h:52
OFBool getUseCustomOptions() const
returns true if JPEG-LS parameters T1-T3, RESET and LIMIT are enabled, false otherwise ...
Definition: djcparam.h:208
OFBool jpls_optionsEnabled_
enable/disable use of all five JPEG-LS parameters
Definition: djcparam.h:238
interleaveMode
Constants describing the interleave mode which the encoder will use.
Definition: djcparam.h:44
JLS_PlanarConfiguration planarConfiguration_
flag describing how planar configuration of decompressed color images should be handled ...
Definition: djcparam.h:277
Uint32 getFragmentSize() const
returns maximum fragment size (in kbytes) for compression, 0 for unlimited.
Definition: djcparam.h:160
Uint16 jpls_t1_
JPEG-LS parameter "Threshold 1" (used for quantization)
Definition: djcparam.h:241
OFBool preferCookedEncoding_
Flag indicating if the "cooked" lossless encoder should be preferred over the "raw" one...
Definition: djcparam.h:262
Sample-interleaved (color-by-pixel)
Definition: djcparam.h:50
virtual ~DJLSCodecParameter()
destructor
interleaveMode jplsInterleaveMode_
Flag describing the interleave mode which the encoder will use.
Definition: djcparam.h:271
abstract base class for a codec parameter object that describes the settings (modes of operations) fo...
Definition: dccodec.h:49
Uint16 jpls_t2_
JPEG-LS parameter "Threshold 2".
Definition: djcparam.h:244
OFBool createOffsetTable_
create offset table during image compression
Definition: djcparam.h:259
virtual DcmCodecParameter * clone() const
this methods creates a copy of type DcmCodecParameter * it must be overweritten in every subclass...
DJLSCodecParameter(OFBool jpls_optionsEnabled, Uint16 jpls_t1=3, Uint16 jpls_t2=7, Uint16 jpls_t3=21, Uint16 jpls_reset=64, Uint16 jpls_limit=0, OFBool preferCookedEncoding=OFTrue, Uint32 fragmentSize=0, OFBool createOffsetTable=OFTrue, JLS_UIDCreation uidCreation=EJLSUC_default, OFBool convertToSC=OFFalse, JLS_PlanarConfiguration planarConfiguration=EJLSPC_restore, OFBool ignoreOffsetTable=OFFalse, interleaveMode jplsInterleaveMode=interleaveLine)
constructor, for use with encoders.
OFBool getCreateOffsetTable() const
returns create offset table flag
Definition: djcparam.h:127
Uint16 jpls_limit_
JPEG-LS parameter "LIMIT".
Definition: djcparam.h:253
OFBool ignoreOffsetTable() const
returns true if the offset table should be ignored when decompressing multiframe images ...
Definition: djcparam.h:216
codec parameter for JPEG-LS codecs
Definition: djcparam.h:38
Uint16 getT3() const
returns JPEG-LS parameter T3
Definition: djcparam.h:184
JLS_PlanarConfiguration getPlanarConfiguration() const
returns mode for handling planar configuration
Definition: djcparam.h:143
Uint16 getLimit() const
returns JPEG-LS parameter LIMIT
Definition: djcparam.h:200
Uint16 getReset() const
returns JPEG-LS parameter RESET
Definition: djcparam.h:192
OFBool convertToSC_
flag indicating whether image should be converted to Secondary Capture upon compression ...
Definition: djcparam.h:268
virtual const char * className() const
returns the class name as string.
interleaveMode getJplsInterleaveMode() const
returns the interleave mode which the encoder should use
Definition: djcparam.h:224
OFBool cookedEncodingPreferred() const
returns flag indicating whether or not the "cooked" lossless encoder should be preferred over the "ra...
Definition: djcparam.h:152
Uninterleaved (color-by-plane)
Definition: djcparam.h:54
Use same interleave mode as the DICOM header says in planarConfiguration, if possible.
Definition: djcparam.h:48
OFBool getConvertToSC() const
returns secondary capture conversion flag
Definition: djcparam.h:119
Uint16 jpls_reset_
JPEG-LS parameter "RESET", i.e., value at which the counters A, B, and N are halved.
Definition: djcparam.h:250
Uint16 jpls_t3_
JPEG-LS parameter "Threshold 3".
Definition: djcparam.h:247


Generated on Thu Aug 27 2015 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.9.1