32 #include "dcmtk/config/osconfig.h"
33 #include "dcmtk/ofstd/oftypes.h"
34 #include "dcmtk/dcmdata/dccodec.h"
35 #include "dcmtk/dcmjpeg/djutils.h"
36 #include "dcmtk/ofstd/ofstring.h"
111 Uint32& startFragment,
114 OFString& decompressedColorModel)
const;
131 const Uint16 * pixelData,
153 const E_TransferSyntax fromRepType,
169 const E_TransferSyntax oldRepType,
170 const E_TransferSyntax newRepType)
const;
190 OFString &decompressedColorModel)
const;
211 OFBool isYBR)
const = 0;
224 const Uint32 fragmentLength);
269 const char *sopClassUID,
270 EP_Interpretation photometricInterpretation);
a class representing a list of DICOM elements in which each element has a different tag and elements ...
abstract base class for compression classes.
static Uint8 scanJpegDataForBitDepth(const Uint8 *data, const Uint32 fragmentLength)
scans the given block of JPEG data for a Start of Frame marker and returns the number of bits per pix...
virtual OFCondition decode(const DcmRepresentationParameter *fromRepParam, DcmPixelSequence *pixSeq, DcmPolymorphOBOW &uncompressedPixelData, const DcmCodecParameter *cp, const DcmStack &objStack) const
decompresses the given pixel sequence and stores the result in the given uncompressedPixelData elemen...
abstract codec class for JPEG decoders.
abstract base class for codec representation parameter sets.
static OFBool requiresPlanarConfiguration(const char *sopClassUID, EP_Interpretation photometricInterpretation)
examines if a given image requires color-by-plane planar configuration depending on SOP Class UID (DI...
this class implements a sequence of pixel items, i.e.
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 trans...
static OFCondition createPlanarConfigurationWord(Uint16 *imageFrame, Uint16 columns, Uint16 rows)
converts an RGB or YBR frame with 16 bits/sample from color-by-pixel to color-by-plane planar configu...
static OFCondition createPlanarConfigurationByte(Uint8 *imageFrame, Uint16 columns, Uint16 rows)
converts an RGB or YBR frame with 8 bits/sample from color-by-pixel to color-by-plane planar configur...
virtual OFCondition encode(const Uint16 *pixelData, const Uint32 length, const DcmRepresentationParameter *toRepParam, DcmPixelSequence *&pixSeq, const DcmCodecParameter *cp, DcmStack &objStack) const
compresses the given uncompressed DICOM image and stores the result in the given pixSeq element...
abstract base class for a codec parameter object that describes the settings (modes of operations) fo...
this class manages a stack of pointers to DcmObject instances.
virtual ~DJCodecDecoder()
destructor
static Uint16 readUint16(const Uint8 *data)
reads two bytes from the given array of little endian 16-bit values and returns the value as Uint16 i...
virtual DJDecoder * createDecoderInstance(const DcmRepresentationParameter *toRepParam, const DJCodecParameter *cp, Uint8 bitsPerSample, OFBool isYBR) const =0
creates an instance of the compression library to be used for decoding.
virtual E_TransferSyntax supportedTransferSyntax() const =0
returns the transfer syntax that this particular codec is able to decode.
a class handling the DICOM dataset format (files without meta header)
DJCodecDecoder()
default constructor
abstract base class for a codec object that can be registered in dcmdata and performs transfer syntax...
a simple string class that implements a subset of std::string.
a class representing DICOM elements (such as uncompressed pixel data) that can be interpreted either ...
codec parameter for IJG codecs
abstract base class for decompression classes.
virtual OFCondition determineDecompressedColorModel(const DcmRepresentationParameter *fromParam, DcmPixelSequence *fromPixSeq, const DcmCodecParameter *cp, DcmItem *dataset, OFString &decompressedColorModel) const
determine color model of the decompressed image
General purpose class for condition codes.
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...