DCMTK
Version 3.6.7
OFFIS DICOM Toolkit
|
encoder class for RLE. More...
Public Member Functions | |
DcmRLECodecEncoder () | |
default constructor | |
virtual | ~DcmRLECodecEncoder () |
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 OFCondition | determineDecompressedColorModel (const DcmRepresentationParameter *fromParam, DcmPixelSequence *fromPixSeq, const DcmCodecParameter *cp, DcmItem *dataset, OFString &decompressedColorModel) const |
determine color model of the decompressed image More... | |
![]() | |
DcmCodec () | |
default constructor | |
virtual | ~DcmCodec () |
destructor | |
Private Member Functions | |
DcmRLECodecEncoder (const DcmRLECodecEncoder &) | |
private undefined copy constructor | |
DcmRLECodecEncoder & | operator= (const DcmRLECodecEncoder &) |
private undefined copy assignment operator | |
Static Private Member Functions | |
static OFCondition | updateDerivationDescription (DcmItem *dataset, double ratio) |
create Derivation Description. More... | |
Additional Inherited Members | |
![]() | |
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) |
set first value of Image Type to DERIVED. 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 ¤tItem) |
determine the index number (starting with zero) of the compressed pixel data fragment corresponding to the given frame (also starting with zero) More... | |
encoder class for RLE.
This class only supports compression, it neither implements decoding nor transcoding.
|
virtual |
checks if this codec is able to convert from the given current transfer syntax to the given new transfer syntax
oldRepType | current transfer syntax |
newRepType | desired new transfer syntax |
Implements DcmCodec.
|
virtual |
decompresses the given pixel sequence and stores the result in the given uncompressedPixelData element.
fromRepParam | current representation parameter of compressed data, may be NULL |
pixSeq | compressed pixel sequence |
uncompressedPixelData | uncompressed pixel data stored in this element |
cp | codec parameters for this codec |
objStack | stack pointing to the location of the pixel data element in the current dataset. |
removeOldRep | boolean flag that should be set to false before this method call and will be set to true if the codec modifies the DICOM dataset such that the pixel data of the original representation may not be usable anymore. |
Implements DcmCodec.
|
virtual |
decompresses a single frame from the given pixel sequence and stores the result in the given buffer.
fromParam | representation parameter of current compressed representation, may be NULL. |
fromPixSeq | compressed pixel sequence |
cp | codec parameters for this codec |
dataset | pointer to dataset in which pixel data element is contained |
frameNo | number of frame, starting with 0 for the first frame |
startFragment | index of the compressed fragment that contains all or the first part of the compressed bitstream for the given frameNo. Upon successful return this parameter is updated to contain the index of the first compressed fragment of the next frame. When unknown, zero should be passed. In this case the decompression algorithm will try to determine the index by itself, which will always work if frames are decompressed in increasing order from first to last, but may fail if frames are decompressed in random order, multiple fragments per frame and multiple frames are present in the dataset, and the offset table is empty. |
buffer | pointer to buffer where frame is to be stored |
bufSize | size of buffer in bytes |
decompressedColorModel | upon successful return, the color model of the decompressed image (which may be different from the one used in the compressed images) is returned in this parameter. |
Implements DcmCodec.
|
virtual |
determine color model of the decompressed image
fromParam | representation parameter of current compressed representation, may be NULL |
fromPixSeq | compressed pixel sequence |
cp | codec parameters for this codec |
dataset | pointer to dataset in which pixel data element is contained |
dataset | pointer to DICOM dataset in which this pixel data object is located. Used to access photometric interpretation. |
decompressedColorModel | upon successful return, the color model of the decompressed image (which may be different from the one used in the compressed images) is returned in this parameter |
Implements DcmCodec.
|
virtual |
transcodes (re-compresses) the given compressed DICOM image and stores the result in the given toPixSeq element.
fromRepType | current transfer syntax of the compressed image |
fromRepParam | current representation parameter of compressed data, may be NULL |
fromPixSeq | compressed pixel sequence |
toRepParam | representation parameter describing the desired new compressed representation (e.g. JPEG quality) |
toPixSeq | compressed pixel sequence (pointer to new DcmPixelSequence object allocated on heap) returned in this parameter upon success. |
cp | codec parameters for this codec |
objStack | stack pointing to the location of the pixel data element in the current dataset. |
removeOldRep | boolean flag that should be set to false before this method call and will be set to true if the codec modifies the DICOM dataset such that the pixel data of the original representation may not be usable anymore. |
Implements DcmCodec.
|
virtual |
compresses the given uncompressed DICOM image and stores the result in the given pixSeq element.
pixelData | pointer to the uncompressed image data in OW format and local byte order |
length | of the pixel data field in bytes |
toRepParam | representation parameter describing the desired compressed representation (e.g. JPEG quality) |
pixSeq | compressed pixel sequence (pointer to new DcmPixelSequence object allocated on heap) returned in this parameter upon success. |
cp | codec parameters for this codec |
objStack | stack pointing to the location of the pixel data element in the current dataset. |
removeOldRep | boolean flag that should be set to false before this method call and will be set to true if the codec modifies the DICOM dataset such that the pixel data of the original representation may not be usable anymore. |
Implements DcmCodec.
|
staticprivate |
create Derivation Description.
dataset | dataset to be modified |
ratio | image compression ratio. This is the real effective ratio between compressed and uncompressed image, i. e. 2.5 means a 2.5:1 compression. |