Loading...
Searching...
No Matches
DJLSCodecParameter Class Reference

codec parameter for JPEG-LS codecs More...

Inheritance diagram for DJLSCodecParameter:

## Public Types

enum | interleaveMode { interleaveDefault , interleaveSample , interleaveLine }
| Constants describing the interleave mode which the encoder will use. More...

## Public Member Functions

DJLSCodecParameter (OFBool preferCookedEncoding, Uint16 jpls_t1=0, Uint16 jpls_t2=0, Uint16 jpls_t3=0, Uint16 jpls_reset=0, 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, OFBool useFFbitstreamPadding=OFTrue)

| constructor, for use with encoders.
| DJLSCodecParameter (JLS_UIDCreation uidCreation=EJLSUC_default, JLS_PlanarConfiguration planarConfiguration=EJLSPC_restore, OFBool ignoreOffsetTable=OFFalse, OFBool forceSingleFragmentPerFrame=OFFalse)
| constructor, for use with decoders.
| DJLSCodecParameter (const DJLSCodecParameter &arg)
| copy constructor
virtual | ~DJLSCodecParameter ()
| destructor
virtual DcmCodecParameter * | clone () const
| this methods creates a copy of type DcmCodecParameter * it must be overwritten in every subclass.
virtual const char * | className () const
| returns the class name as string.
OFBool | getConvertToSC () const
| returns secondary capture conversion flag
OFBool | getCreateOffsetTable () const
| returns create offset table flag
JLS_UIDCreation | getUIDCreation () const
| returns mode for SOP Instance UID creation
JLS_PlanarConfiguration | getPlanarConfiguration () const
| returns mode for handling planar configuration
OFBool | cookedEncodingPreferred () const
| returns flag indicating whether or not the "cooked" lossless encoder should be preferred over the "raw" one
Uint32 | getFragmentSize () const
| returns maximum fragment size (in kbytes) for compression, 0 for unlimited.
Uint16 | getT1 () const
| returns JPEG-LS parameter T1
Uint16 | getT2 () const
| returns JPEG-LS parameter T2
Uint16 | getT3 () const
| returns JPEG-LS parameter T3
Uint16 | getReset () const
| returns JPEG-LS parameter RESET
OFBool | ignoreOffsetTable () const
| returns true if the offset table should be ignored when decompressing multiframe images
interleaveMode | getJplsInterleaveMode () const
| returns the interleave mode which the encoder should use
OFBool | getForceSingleFragmentPerFrame () const
| returns flag indicating whether one fragment per frame should be enforced while decoding
OFBool | getUseFFbitstreamPadding () const
| returns flag indicating whether odd-length bitstreams should be padded as FF FF D9
Public Member Functions inherited from DcmCodecParameter
| DcmCodecParameter ()
| default constructor
| DcmCodecParameter (const DcmCodecParameter &)
| copy constructor
virtual | ~DcmCodecParameter ()
| destructor

## Private Member Functions

DJLSCodecParameter & | operator= (const DJLSCodecParameter &)
| private undefined copy assignment operator

## Private Attributes

OFBool | preferCookedEncoding_
| flag indicating if the "cooked" lossless encoder should be preferred over the "raw" one
Uint16 | jpls_t1_
| JPEG-LS parameter "Threshold 1" (used for quantization), 0 if unused.
Uint16 | jpls_t2_
| JPEG-LS parameter "Threshold 2", 0 if unused.
Uint16 | jpls_t3_
| JPEG-LS parameter "Threshold 3", 0 if unused.
Uint16 | jpls_reset_
| JPEG-LS parameter "RESET", i.e., value at which the counters A, B, and N are halved. 0 if unused.
Uint32 | fragmentSize_
| maximum fragment size (in kbytes) for compression, 0 for unlimited.
OFBool | createOffsetTable_
| create offset table during image compression
JLS_UIDCreation | uidCreation_
| mode for SOP Instance UID creation (used both for encoding and decoding)
OFBool | convertToSC_
| flag indicating whether image should be converted to Secondary Capture upon compression
interleaveMode | jplsInterleaveMode_
| Flag describing the interleave mode which the encoder will use.
OFBool | useFFbitstreamPadding_
| When true, a JPEG-LS bitstream of odd length is padded by extending the FF D9 "end of image" marker to FF FF D9, as required by DICOM.
JLS_PlanarConfiguration | planarConfiguration_
| flag describing how planar configuration of decompressed color images should be handled
OFBool | ignoreOffsetTable_
| flag indicating if temporary files should be kept, false if they should be deleted after use
OFBool | forceSingleFragmentPerFrame_
| while decompressing a multiframe image, assume one fragment per frame even if the JPEG data for some frame is incomplete

## Detailed Description

codec parameter for JPEG-LS codecs

## Member Enumeration Documentation

## interleaveMode

enum DJLSCodecParameter::interleaveMode

Constants describing the interleave mode which the encoder will use.

Enumerator
interleaveDefault | Use same interleave mode as the DICOM header says in planarConfiguration, if possible. The cooked encoder will force interleaveLine.
interleaveSample | Sample-interleaved (color-by-pixel).
interleaveLine | Line-interleaved (color-by-line).

## Constructor & Destructor Documentation

## DJLSCodecParameter() [1/2]

DJLSCodecParameter::DJLSCodecParameter | ( | OFBool | preferCookedEncoding,
|  | Uint16 | jpls_t1 = 0,
|  | Uint16 | jpls_t2 = 0,
|  | Uint16 | jpls_t3 = 0,
|  | Uint16 | jpls_reset = 0,
|  | 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,
|  | OFBool | useFFbitstreamPadding = OFTrue )

constructor, for use with encoders.

Parameters

  preferCookedEncoding | true if the "cooked" lossless encoder should be preferred over the "raw" one (which should be the default)
  jpls_t1 | JPEG-LS parameter "Threshold 1" (used for quantization)
  jpls_t2 | JPEG-LS parameter "Threshold 2"
  jpls_t3 | JPEG-LS parameter "Threshold 3"
  jpls_reset | JPEG-LS parameter "RESET", i.e., value at which the counters A, B, and N are halved.
  fragmentSize | maximum fragment size (in kbytes) for compression, 0 for unlimited.
  createOffsetTable | create offset table during image compression
  uidCreation | mode for SOP Instance UID creation
  convertToSC | flag indicating whether image should be converted to Secondary Capture upon compression
  planarConfiguration | flag describing how planar configuration of decompressed color images should be handled
  ignoreOffsetTable | flag indicating whether to ignore the offset table when decompressing multiframe images
  jplsInterleaveMode | flag describing which interleave the JPEG-LS datastream should use
  useFFbitstreamPadding | flag indicating whether the JPEG-LS bitstream should be FF padded as required by DICOM.

References EJLSPC_restore, EJLSUC_default, ignoreOffsetTable(), and interleaveLine.

Referenced by DJLSCodecParameter(), and operator=().

## DJLSCodecParameter() [2/2]

DJLSCodecParameter::DJLSCodecParameter | ( | JLS_UIDCreation | uidCreation = EJLSUC_default,
|  | JLS_PlanarConfiguration | planarConfiguration = EJLSPC_restore,
|  | OFBool | ignoreOffsetTable = OFFalse,
|  | OFBool | forceSingleFragmentPerFrame = OFFalse )

constructor, for use with decoders.

Initializes all encoder options to defaults.

Parameters

  uidCreation | mode for SOP Instance UID creation (used both for encoding and decoding)
  planarConfiguration | flag describing how planar configuration of decompressed color images should be handled
  ignoreOffsetTable | flag indicating whether to ignore the offset table when decompressing multiframe images
  forceSingleFragmentPerFrame | while decompressing a multiframe image, assume one fragment per frame even if the JPEG data for some frame is incomplete

References EJLSPC_restore, EJLSUC_default, and ignoreOffsetTable().

## Member Function Documentation

## className()

virtual const char * DJLSCodecParameter::className | ( |  | ) | const

virtual

returns the class name as string.

can be used as poor man's RTTI replacement.

Implements DcmCodecParameter.

## clone()

virtual DcmCodecParameter * DJLSCodecParameter::clone | ( |  | ) | const

virtual

this methods creates a copy of type DcmCodecParameter * it must be overwritten in every subclass.

Returns
  copy of this object

Implements DcmCodecParameter.

References DcmCodecParameter::DcmCodecParameter().

## cookedEncodingPreferred()

OFBool DJLSCodecParameter::cookedEncodingPreferred | ( |  | ) | const

inline

returns flag indicating whether or not the "cooked" lossless encoder should be preferred over the "raw" one

Returns
  raw/cooked lossless encoding flag

References preferCookedEncoding_.

## getConvertToSC()

OFBool DJLSCodecParameter::getConvertToSC | ( |  | ) | const

inline

returns secondary capture conversion flag

Returns
  secondary capture conversion flag

References convertToSC_.

## getCreateOffsetTable()

OFBool DJLSCodecParameter::getCreateOffsetTable | ( |  | ) | const

inline

returns create offset table flag

Returns
  create offset table flag

References createOffsetTable_.

## getForceSingleFragmentPerFrame()

OFBool DJLSCodecParameter::getForceSingleFragmentPerFrame | ( |  | ) | const

inline

returns flag indicating whether one fragment per frame should be enforced while decoding

Returns
  flag indicating whether one fragment per frame should be enforced while decoding

References forceSingleFragmentPerFrame_.

## getFragmentSize()

Uint32 DJLSCodecParameter::getFragmentSize | ( |  | ) | const

inline

returns maximum fragment size (in kbytes) for compression, 0 for unlimited.

Returns
  maximum fragment size for compression

References fragmentSize_.

## getJplsInterleaveMode()

interleaveMode DJLSCodecParameter::getJplsInterleaveMode | ( |  | ) | const

inline

returns the interleave mode which the encoder should use

Returns
  the interleave mode which the encoder should use

References jplsInterleaveMode_.

## getPlanarConfiguration()

JLS_PlanarConfiguration DJLSCodecParameter::getPlanarConfiguration | ( |  | ) | const

inline

returns mode for handling planar configuration

Returns
  mode for handling planar configuration

References planarConfiguration_.

## getReset()

Uint16 DJLSCodecParameter::getReset | ( |  | ) | const

inline

returns JPEG-LS parameter RESET

Returns
  JPEG-LS parameter RESET

References jpls_reset_.

## getT1()

Uint16 DJLSCodecParameter::getT1 | ( |  | ) | const

inline

returns JPEG-LS parameter T1

Returns
  JPEG-LS parameter T1

References jpls_t1_.

## getT2()

Uint16 DJLSCodecParameter::getT2 | ( |  | ) | const

inline

returns JPEG-LS parameter T2

Returns
  JPEG-LS parameter T2

References jpls_t2_.

## getT3()

Uint16 DJLSCodecParameter::getT3 | ( |  | ) | const

inline

returns JPEG-LS parameter T3

Returns
  JPEG-LS parameter T3

References jpls_t3_.

## getUIDCreation()

JLS_UIDCreation DJLSCodecParameter::getUIDCreation | ( |  | ) | const

inline

returns mode for SOP Instance UID creation

Returns
  mode for SOP Instance UID creation

References uidCreation_.

## getUseFFbitstreamPadding()

OFBool DJLSCodecParameter::getUseFFbitstreamPadding | ( |  | ) | const

inline

returns flag indicating whether odd-length bitstreams should be padded as FF FF D9

Returns
  flag indicating whether odd-length bitstreams should be padded as FF FF D9

References useFFbitstreamPadding_.

## ignoreOffsetTable()

OFBool DJLSCodecParameter::ignoreOffsetTable | ( |  | ) | const

inline

returns true if the offset table should be ignored when decompressing multiframe images

Returns
  true if the offset table should be ignored when decompressing multiframe images

References ignoreOffsetTable_.

Referenced by DJLSCodecParameter(), and DJLSCodecParameter().

## Member Data Documentation

## useFFbitstreamPadding_

OFBool DJLSCodecParameter::useFFbitstreamPadding_

private

When true, a JPEG-LS bitstream of odd length is padded by extending the FF D9 "end of image" marker to FF FF D9, as required by DICOM.

When false, the bitstream is written as FF D9 00, which is not standard compliant, but required for interoperability with the HP LOCO reference implementation, which does not support FF padded markers.

Referenced by getUseFFbitstreamPadding().

The documentation for this class was generated from the following file:

- dcmjpls/include/dcmtk/dcmjpls/djcparam.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.15.0