32 #include "dcmtk/config/osconfig.h"
33 #include "dcmtk/ofstd/ofcond.h"
34 #include "dcmtk/dcmdata/dctypes.h"
35 #include "dcmtk/dcmdata/dcxfer.h"
36 #include "dcmtk/ofstd/oflist.h"
70 virtual const char *
className()
const = 0;
109 const DcmStack& objStack)
const = 0;
142 Uint32& startFragment,
145 OFString& decompressedColorModel)
const = 0;
162 const Uint16 * pixelData,
184 const E_TransferSyntax fromRepType,
200 const E_TransferSyntax oldRepType,
201 const E_TransferSyntax newRepType)
const = 0;
221 OFString &decompressedColorModel)
const = 0;
254 const char *purposeOfReferenceCodingScheme = NULL,
255 const char *purposeOfReferenceCodeValue = NULL,
256 const char *purposeOfReferenceCodeMeaning = NULL);
275 const char *codingSchemeDesignator,
276 const char *codeValue,
277 const char *codeMeaning);
289 Sint32 numberOfFrames,
291 Uint32& currentItem);
396 Uint32& startFragment,
418 const E_TransferSyntax fromRepType,
419 const Uint16 * pixelData,
421 const E_TransferSyntax toRepType,
444 const E_TransferSyntax fromRepType,
447 const E_TransferSyntax toRepType,
461 const E_TransferSyntax fromRepType,
462 const E_TransferSyntax toRepType);
519 friend class DcmCodecListDummyFriend;
static OFCondition insertCodeSequence(DcmItem *dataset, const DcmTagKey &tagKey, const char *codingSchemeDesignator, const char *codeValue, const char *codeMeaning)
insert code sequence into the given dataset
virtual ~DcmCodecList()
destructor
static OFCondition determineDecompressedColorModel(const DcmXfer &fromType, const DcmRepresentationParameter *fromParam, DcmPixelSequence *fromPixSeq, DcmItem *dataset, OFString &decompressedColorModel)
determine color model of the decompressed image
a class representing a list of DICOM elements in which each element has a different tag and elements ...
class maintaining a attribute tag (group and element number)
static OFCondition decodeFrame(const DcmXfer &fromType, const DcmRepresentationParameter *fromParam, DcmPixelSequence *fromPixSeq, DcmItem *dataset, Uint32 frameNo, Uint32 &startFragment, void *buffer, Uint32 bufSize, OFString &decompressedColorModel)
looks for a codec that is able to decode from the given transfer syntax and calls the decodeFrame() m...
DcmCodecParameter(const DcmCodecParameter &)
copy constructor
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 d...
const DcmRepresentationParameter * defaultRepParam
pointer to default representation parameter
static OFCondition registerCodec(const DcmCodec *aCodec, const DcmRepresentationParameter *aDefaultRepParam, const DcmCodecParameter *aCodecParameter)
registers a codec object in the global list of codecs consulted by dcmdata whenever conversion to/fro...
virtual ~DcmCodec()
destructor
static OFCondition updateCodecParameter(const DcmCodec *aCodec, const DcmCodecParameter *aCodecParameter)
updates the codec parameters object for a codec that has been registered before.
const DcmCodecParameter * codecParameter
pointer to codec parameter set
virtual OFBool canChangeCoding(const E_TransferSyntax oldRepType, const E_TransferSyntax newRepType) const =0
checks if this codec is able to convert from the given current transfer syntax to the given new trans...
abstract base class for codec representation parameter sets.
const DcmCodec * codec
pointer to codec object
virtual OFCondition encode(const Uint16 *pixelData, const Uint32 length, const DcmRepresentationParameter *toRepParam, DcmPixelSequence *&pixSeq, const DcmCodecParameter *cp, DcmStack &objStack) const =0
compresses the given uncompressed DICOM image and stores the result in the given pixSeq element...
static OFCondition deregisterCodec(const DcmCodec *aCodec)
deregisters a codec and it's parameter objects from the global list.
static OFList< DcmCodecList * > registeredCodecs
singleton list of registered codecs
virtual DcmCodecParameter * clone() const =0
this methods creates a copy of type DcmCodecParameter * it must be overweritten in every subclass...
virtual const char * className() const =0
returns the class name as string.
static OFCondition updateImageType(DcmItem *dataset)
set first value of Image Type to DERIVED.
this class implements a sequence of pixel items, i.e.
DcmCodecList(const DcmCodec *aCodec, const DcmRepresentationParameter *aDefaultRepParam, const DcmCodecParameter *aCodecParameter)
constructor
a class that allows for a lookup of Transfer Syntax properties and readable descriptions ...
static OFCondition convertToSecondaryCapture(DcmItem *dataset)
helper function that converts a dataset containing a DICOM image into a valid (standard extended) Sec...
static OFBool canChangeCoding(const E_TransferSyntax fromRepType, const E_TransferSyntax toRepType)
looks for a codec that claims to be able to convert between the given transfer syntaxes.
singleton that keeps list of registered codecs for dcmdata.
virtual ~DcmCodecParameter()
destructor
virtual OFCondition decodeFrame(const DcmRepresentationParameter *fromParam, DcmPixelSequence *fromPixSeq, const DcmCodecParameter *cp, DcmItem *dataset, Uint32 frameNo, Uint32 &startFragment, void *buffer, Uint32 bufSize, OFString &decompressedColorModel) const =0
decompresses a single frame from the given pixel sequence and stores the result in the given buffer...
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.
DcmCodecParameter()
default constructor
DcmCodecList & operator=(const DcmCodecList &)
private undefined copy assignment operator
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 t...
DcmCodec()
default constructor
static OFCondition encode(const E_TransferSyntax fromRepType, const Uint16 *pixelData, const Uint32 length, const E_TransferSyntax toRepType, const DcmRepresentationParameter *toRepParam, DcmPixelSequence *&pixSeq, DcmStack &pixelStack)
looks for a codec that is able to encode from the given transfer syntax and calls the encode() method...
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) ...
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 ...
static OFCondition decode(const DcmXfer &fromType, const DcmRepresentationParameter *fromParam, DcmPixelSequence *fromPixSeq, DcmPolymorphOBOW &uncompressedPixelData, DcmStack &pixelStack)
looks for a codec that is able to decode from the given transfer syntax and calls the decode() method...
virtual OFCondition decode(const DcmRepresentationParameter *fromRepParam, DcmPixelSequence *pixSeq, DcmPolymorphOBOW &uncompressedPixelData, const DcmCodecParameter *cp, const DcmStack &objStack) const =0
decompresses the given pixel sequence and stores the result in the given uncompressedPixelData elemen...
provides an operating system independent abstraction for read/write locks.
virtual OFCondition determineDecompressedColorModel(const DcmRepresentationParameter *fromParam, DcmPixelSequence *fromPixSeq, const DcmCodecParameter *cp, DcmItem *dataset, OFString &decompressedColorModel) const =0
determine color model of the decompressed image
General purpose class for condition codes.