DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Public Member Functions | Private Member Functions | List of all members
DJEncoderSpectralSelection Class Reference

Encoder class for JPEG Spectral Selection (lossy, 8/12-bit) More...

Inheritance diagram for DJEncoderSpectralSelection:

## Public Member Functions
| DJEncoderSpectralSelection ()
| default constructor
virtual | ~DJEncoderSpectralSelection ()
| destructor
virtual E_TransferSyntax | supportedTransferSyntax () const
| returns the transfer syntax that this particular codec is able to encode and decode. More...
Public Member Functions inherited from DJCodecEncoder
| DJCodecEncoder ()
| default constructor
virtual | ~DJCodecEncoder ()
| destructor
virtual OFCondition | decode (const DcmRepresentationParameter *fromRepParam, DcmPixelSequence *pixSeq, DcmPolymorphOBOW &uncompressedPixelData, const DcmCodecParameter *cp, const DcmStack &objStack, OFBool &removeOldRep) const
| decompresses the given pixel sequence and stores the result in the given uncompressedPixelData element. More...
virtual OFCondition | decodeFrame (const DcmRepresentationParameter *fromParam, DcmPixelSequence *fromPixSeq, const DcmCodecParameter *cp, DcmItem *dataset, Uint32 frameNo, Uint32 &startFragment, void *buffer, Uint32 bufSize, OFString &decompressedColorModel) const
| decompresses a single frame from the given pixel sequence and stores the result in the given buffer. More...
virtual OFCondition | encode (const Uint16 *pixelData, const Uint32 length, const DcmRepresentationParameter *toRepParam, DcmPixelSequence *&pixSeq, const DcmCodecParameter *cp, DcmStack &objStack, OFBool &removeOldRep) const
| compresses the given uncompressed DICOM image and stores the result in the given pixSeq element. More...
virtual OFCondition | encode (const E_TransferSyntax fromRepType, const DcmRepresentationParameter *fromRepParam, DcmPixelSequence *fromPixSeq, const DcmRepresentationParameter *toRepParam, DcmPixelSequence *&toPixSeq, const DcmCodecParameter *cp, DcmStack &objStack, OFBool &removeOldRep) const
| transcodes (re-compresses) the given compressed DICOM image and stores the result in the given toPixSeq element. More...
virtual OFBool | canChangeCoding (const E_TransferSyntax oldRepType, const E_TransferSyntax newRepType) const
| checks if this codec is able to convert from the given current transfer syntax to the given new transfer syntax More...
virtual Uint16 | decodedBitsAllocated (Uint16 bitsAllocated, Uint16 bitsStored) const
| determines the effective value of BitsAllocated that a dataset will have after decompression of an image with the given values for bitsAllocated and bitsStored. More...
virtual OFCondition | determineDecompressedColorModel (const DcmRepresentationParameter *fromParam, DcmPixelSequence *fromPixSeq, const DcmCodecParameter *cp, DcmItem *dataset, OFString &decompressedColorModel) const
| determine color model of the decompressed image More...
Public Member Functions inherited from DcmCodec
| DcmCodec ()
| default constructor
virtual | ~DcmCodec ()
| destructor

## Private Member Functions
virtual OFBool | isLosslessProcess () const
| returns true if the transfer syntax supported by this codec is lossless. More...
virtual void | createDerivationDescription (const DcmRepresentationParameter *toRepParam, const DJCodecParameter *cp, Uint8 bitsPerSample, double ratio, OFString &derivationDescription) const
| creates 'derivation description' string after encoding. More...
virtual DJEncoder * | createEncoderInstance (const DcmRepresentationParameter *toRepParam, const DJCodecParameter *cp, Uint8 bitsPerSample) const
| creates an instance of the compression library to be used for encoding/decoding. More...

## Additional Inherited Members
Static Public Member Functions inherited from DcmCodec
static OFCondition | insertStringIfMissing (DcmItem *dataset, const DcmTagKey &tag, const char *val)
| helper function that inserts a string attribute with a given value into a dataset if missing in the dataset. More...
static OFCondition | convertToSecondaryCapture (DcmItem *dataset)
| helper function that converts a dataset containing a DICOM image into a valid (standard extended) Secondary Capture object by inserting all attributes that are type 1/2 in Secondary Capture and missing in the source dataset. More...
static OFCondition | newInstance (DcmItem *dataset, const char *purposeOfReferenceCodingScheme=NULL, const char *purposeOfReferenceCodeValue=NULL, const char *purposeOfReferenceCodeMeaning=NULL)
| create new SOP Instance UID and Source Image Sequence referencing the old SOP instance (if present) More...
static OFCondition | updateImageType (DcmItem *dataset)
| update value of the Image Type element (if needed). More...
static OFCondition | insertCodeSequence (DcmItem *dataset, const DcmTagKey &tagKey, const char *codingSchemeDesignator, const char *codeValue, const char *codeMeaning)
| insert code sequence into the given dataset More...
static OFCondition | determineStartFragment (Uint32 frameNo, Sint32 numberOfFrames, DcmPixelSequence *fromPixSeq, Uint32 &currentItem)
| determine the index number (starting with zero) of the compressed pixel data fragment corresponding to the given frame (also starting with zero) More...
Static Protected Member Functions inherited from DJCodecEncoder
static void | appendCompressionRatio (OFString &arg, double ratio)
| format compression ratio as string and append to given string object. More...
static OFCondition | togglePlanarConfiguration8 (Uint8 *pixelData, const size_t numValues, const Uint16 samplesPerPixel, const Uint16 oldPlanarConfig)
| toggles Planar Configuration of 8-bit pixel data from "by pixel" to "by plane" and vice versa. More...
static OFCondition | togglePlanarConfiguration16 (Uint16 *pixelData, const size_t numValues, const Uint16 samplesPerPixel, const Uint16 oldPlanarConfig)
| toggles Planar Configuration of 16-bit pixel data from "by pixel" to "by plane" and vice versa. More...

## Detailed Description

Encoder class for JPEG Spectral Selection (lossy, 8/12-bit)

## Member Function Documentation

## ◆ createDerivationDescription()

virtual void DJEncoderSpectralSelection::createDerivationDescription | ( | const DcmRepresentationParameter * | toRepParam,
|  | const DJCodecParameter * | cp,
|  | Uint8 | bitsPerSample,
|  | double | ratio,
|  | OFString & | derivationDescription
| ) |  | const
| private virtual

creates 'derivation description' string after encoding.

Parameters

  toRepParam | representation parameter passed to encode()
  cp | codec parameter passed to encode()
  bitsPerSample | bits per sample of the original image data prior to compression
  ratio | image compression ratio. This is not the "quality factor" but the real effective ratio between compressed and uncompressed image, i. e. 30 means a 30:1 lossy compression.
  derivationDescription | derivation description returned in this parameter which is initially empty

Implements DJCodecEncoder.

## ◆ createEncoderInstance()

virtual DJEncoder* DJEncoderSpectralSelection::createEncoderInstance | ( | const DcmRepresentationParameter * | toRepParam,
|  | const DJCodecParameter * | cp,
|  | Uint8 | bitsPerSample
| ) |  | const
| private virtual

creates an instance of the compression library to be used for encoding/decoding.

Parameters

  toRepParam | representation parameter passed to encode()
  cp | codec parameter passed to encode()
  bitsPerSample | bits per sample for the image data

Returns
  pointer to newly allocated codec object

Implements DJCodecEncoder.

## ◆ isLosslessProcess()

virtual OFBool DJEncoderSpectralSelection::isLosslessProcess | ( |  | ) | const
| private virtual

returns true if the transfer syntax supported by this codec is lossless.

Returns
  lossless flag

Implements DJCodecEncoder.

## ◆ supportedTransferSyntax()

virtual E_TransferSyntax DJEncoderSpectralSelection::supportedTransferSyntax | ( |  | ) | const
| virtual

returns the transfer syntax that this particular codec is able to encode and decode.

Returns
  supported transfer syntax

Implements DJCodecEncoder.

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

- dcmjpeg/include/dcmtk/dcmjpeg/djencsps.h

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1