This module contains classes that convert between uncompressed and JPEG compressed representations (transfer syntaxes) of a DICOM image object. Both lossless and lossy JPEG processes are supported. This module implements a family of codecs that are derived from class DcmCodec and can be registered in the codec list maintained in module dcmdata.
The following example shows how to compress a DICOM image file with lossless JPEG:
{
{
}
}
static void registerCodecs(E_CompressionColorSpaceConversion pCompressionCSConversion=ECC_lossyYCbCr, E_UIDCreation pCreateSOPInstanceUID=EUC_default, OFBool pOptimizeHuffman=OFFalse, int pSmoothingFactor=0, int pForcedBitDepth=0, Uint32 pFragmentSize=0, OFBool pCreateOffsetTable=OFTrue, E_SubSampling pSampleFactors=ESS_422, OFBool pWriteYBR422=OFTrue, OFBool pConvertToSC=OFFalse, unsigned long pWindowType=0, unsigned long pWindowParameter=0, double pVoiCenter=0.0, double pVoiWidth=0.0, unsigned long pRoiLeft=0, unsigned long pRoiTop=0, unsigned long pRoiWidth=0, unsigned long pRoiHeight=0, OFBool pUsePixelValues=OFTrue, OFBool pUseModalityRescale=OFFalse, OFBool pAcceptWrongPaletteTags=OFFalse, OFBool pAcrNemaCompatibility=OFFalse, OFBool pRealLossless=OFTrue)
registers encoders for all supported JPEG processes.
static void cleanup()
deregisters encoders.
representation parameter for lossless JPEG
Definition: djrplol.h:32
a class handling the DICOM dataset format (files without meta header)
Definition: dcdatset.h:42
OFCondition chooseRepresentation(const E_TransferSyntax repType, const DcmRepresentationParameter *repParam)
select a specific representation (compressed or uncompressed) of the dataset and create the represent...
virtual OFBool canWriteXfer(const E_TransferSyntax newXfer, const E_TransferSyntax oldXfer=EXS_Unknown)
check if this DICOM object can be encoded in the given transfer syntax.
a class representing a list of DICOM elements in which each element has a different tag and elements ...
Definition: dcitem.h:48
OFBool good() const
check if the status is OK.
Definition: ofcond.h:293
@ EXS_JPEGProcess14SV1
JPEG Lossless, Selection Value 1.
Definition: dcxfer.h:83
The following example shows how to decompress a JPEG-compressed DICOM image file: