MeVisLab Toolbox Reference
ml::PMTFToshibaPrivateDICOMTagDecoders Class Reference

An experimental DICOM tag decoder class for private Toshiba PMTF tags. More...

#include <mlPMTFToshibaPrivateDICOMTagDecoders.h>

Inheritance diagram for ml::PMTFToshibaPrivateDICOMTagDecoders:
ml::GenericPrivateDICOMTagDecoder

Public Member Functions

 PMTFToshibaPrivateDICOMTagDecoders ()
 Constructor doing nothing.
 ~PMTFToshibaPrivateDICOMTagDecoders () override
PrivateDICOMTagDecoderPluginBase::DecodeStates decodePrivateTag (const std::string &privateCreator, DCMTree::Const_TagPtr tagPtr, PrivateDICOMTagValueFields &resultFields) override
template<typename T>
void flipBuffer (T *arr, size_t n) const
 Helper routine reverting order of n elements starting at arr.

Protected Member Functions

void _decodeTagArea (const std::string &prefix, const unsigned char *&tagDataOrig, MLuint32 &tagDataSize, PrivateDICOMTagValueFields &resultFields) const
void _analyzeAndDump (const unsigned char *tagData, MLuint32 tagDataSize, PrivateDICOMTagValueFields &resultFields, bool isLastSection) const
bool _extractDump (const DCMTree::Value &tagVal, PrivateDICOMTagValueFields &resultFields) const
Protected Member Functions inherited from ml::GenericPrivateDICOMTagDecoder
bool _getTagNameAndVrFromId (unsigned int groupId, unsigned int elementId, std::string &retName, std::string &retVr) const
const unsigned char * _findStr (const unsigned char *buffer, const std::string &str, size_t bufferSize) const
PrivateDICOMTagDecoderPluginBase::DecodeStates _decodeSequenceTagData (const std::string &prefix, const unsigned char *&tagData, MLuint32 &tagDataSize, bool implicit, PrivateDICOMTagValueFields &resultFields, bool translateStdIdToName) const
 GenericPrivateDICOMTagDecoder ()=default
 Constructor doing nothing.
 GenericPrivateDICOMTagDecoder (const GenericPrivateDICOMTagDecoder &)=default
 Default copy constructor.
GenericPrivateDICOMTagDecoderoperator= (const GenericPrivateDICOMTagDecoder &)=default
 Default assignment operator.
 ~GenericPrivateDICOMTagDecoder () override
 Destructor.
PrivateDICOMTagDecoderPluginBase::DecodeStates decodePrivateTag (const std::string &privateCreator, DCMTree::Const_TagPtr tagPtr, PrivateDICOMTagValueFields &resultFields) override
PrivateDICOMTagDecoderPluginBase::DecodeStates extractTag (const std::string &prefix, const unsigned char *&tagData, MLuint32 &tagDataSize, bool decodeImplicitSeqVR, PrivateDICOMTagValueFields &resultFields, bool translateStdIdToName) const

Additional Inherited Members

Static Protected Member Functions inherited from ml::GenericPrivateDICOMTagDecoder
static std::string _dumpRange (const unsigned char *start, size_t num=16, bool showStartAddress=true, bool showHexDump=true, bool showASCII=true, size_t maxRowSize=16, char defaultNonReadableChar='.')
static void dumpHexArea (const std::string &prefix, const unsigned char *tagData, size_t tagDataSize, PrivateDICOMTagValueFields &resultFields, size_t rowSize=16, size_t maxBytesToDump=ML_SIZE_T_MAX)
static bool isValidVRString (const std::string &vrStr)
 Returns true if the passed VR string is a valid known one, otherwise false.

Detailed Description

An experimental DICOM tag decoder class for private Toshiba PMTF tags.

Definition at line 20 of file mlPMTFToshibaPrivateDICOMTagDecoders.h.

Constructor & Destructor Documentation

◆ PMTFToshibaPrivateDICOMTagDecoders()

ml::PMTFToshibaPrivateDICOMTagDecoders::PMTFToshibaPrivateDICOMTagDecoders ( )

Constructor doing nothing.

Referenced by _extractDump().

◆ ~PMTFToshibaPrivateDICOMTagDecoders()

ml::PMTFToshibaPrivateDICOMTagDecoders::~PMTFToshibaPrivateDICOMTagDecoders ( )
override

Member Function Documentation

◆ _analyzeAndDump()

void ml::PMTFToshibaPrivateDICOMTagDecoders::_analyzeAndDump ( const unsigned char * tagData,
MLuint32 tagDataSize,
PrivateDICOMTagValueFields & resultFields,
bool isLastSection ) const
protected

Expects the data of a private Toshiba PMTF tag value and tries to decode it as far as possible as human readable information appended to resultFields.

Parameters
tagDataThe pointer to the tag value data to be decoded, may be nullptr.
tagDataSizeThe number of bytes in tagData to be dumped.
resultFieldsThe container to be extended by decoded tag information.
isLastSectionIf it is the last decoded section of the tag value then true must be passed, otherwise false. All successfully decoded tag information is appended as additional elements to resultFields. On failure or inappropriate input data resultFields is left unchanged.

◆ _decodeTagArea()

void ml::PMTFToshibaPrivateDICOMTagDecoders::_decodeTagArea ( const std::string & prefix,
const unsigned char *& tagDataOrig,
MLuint32 & tagDataSize,
PrivateDICOMTagValueFields & resultFields ) const
protected

Assume a range of DICOM tags in binary storage format used by Toshiba private tags and decode and add the tags inside of the area as human readable information to resultFields as far as possible. Note that this function expects the data in reverse order as it is stored in Toshiba private PMTF tags.

Parameters
prefixString added before each entry added to resultFields.
tagDataOrigThe pointer to the tag data to be decoded, may be nullptr.
tagDataSizeThe number of bytes in tagData to be dumped.
resultFieldsThe container to be extended with extracted header, section, and tag information. All successfully decoded tag information is appended as additional elements to resultFields. On failure or inappropriate input data resultFields is left unchanged.

◆ _extractDump()

bool ml::PMTFToshibaPrivateDICOMTagDecoders::_extractDump ( const DCMTree::Value & tagVal,
PrivateDICOMTagValueFields & resultFields ) const
protected

Expects the tag value of a private Toshiba PMTF tag and tries to decode it as far as possible as human readable information appended to resultFields.

Parameters
tagValThe value of the private Toshiba PMTF tag to be decoded.
resultFieldsThe container to be extended by decoded tag information.
Returns
All successfully decoded tag information is appended as additional elements to resultFields. On failure or inappropriate input data resultFields is left unchanged.

References PMTFToshibaPrivateDICOMTagDecoders().

◆ decodePrivateTag()

PrivateDICOMTagDecoderPluginBase::DecodeStates ml::PMTFToshibaPrivateDICOMTagDecoders::decodePrivateTag ( const std::string & privateCreator,
DCMTree::Const_TagPtr tagPtr,
PrivateDICOMTagValueFields & resultFields )
override

If a private Toshiba PMTF header tag is passed then this routine converts its data element(s) to fields in resultFields container. The privateCreator must be a "PMTF INFORMATION DATA" one.

Parameters
privateCreatorA string with the name of the private creator this tags belongs to.
tagPtrThe tag whose value shall be decoded.
resultFieldsThe field container to be filled with extracted information from tagPtr or returned empty if no data could be decoded.
Returns
PrivateDICOMTagDecoderPluginBase::NOT_DECODED if the tag could not be decoded, PrivateDICOMTagDecoderPluginBase::PARTIALLY_DECODED if some of the tag value components were decoded or PrivateDICOMTagDecoderPluginBase::FULLY_DECODED if entire tag value could be decoded.

◆ flipBuffer()

template<typename T>
void ml::PMTFToshibaPrivateDICOMTagDecoders::flipBuffer ( T * arr,
size_t n ) const
inline

Helper routine reverting order of n elements starting at arr.

Definition at line 45 of file mlPMTFToshibaPrivateDICOMTagDecoders.h.

References T.


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