MeVisLab Toolbox Reference
|
Enumerations | |
enum | { NumLosslessTransferSyntaxes = 8 } |
Number of supported lossless compression transfer syntax modes. More... | |
Functions | |
MLDICOMCachedIO_EXPORT void | pushMessageCollecting () |
Takes current message handles of DCMTree library and uses redirectStream() to push current handler and message states on a stack and sets up own handlers to collect all messages from that handler and from std::cerr stream; needs to be restored with popMessageCollecting();. | |
MLDICOMCachedIO_EXPORT void | popMessageCollecting (DicomMessageCollector &dcmMsgCollector, const std::string &callersMessage, size_t outStrMaxSize=std::string::npos, bool addClampInfo=true) |
Restores states which must have been saved before with pushMessageCollecting() and sends collected (and possibly processed) messages to dcmMsgCollector for further processing. | |
MLDICOMCachedIO_EXPORT void | redirectStream (std::ostream &outputStream, std::streambuf *&tempBuf, std::stringbuf *&stringBuffer) |
Redirect outputs to outputStream into the temporary buffer tmpBuf. | |
MLDICOMCachedIO_EXPORT std::string | unRedirectStream (std::ostream &outputStream, std::streambuf *&tmpBuf, std::stringbuf *&stringBuffer, size_t outStrMaxSize=std::string::npos, bool addClampInfo=true) |
Undo the redirected output of outputStream into the temporary buffer tmpBuf. | |
MLDICOMCachedIO_EXPORT void | makeWarningsWarningsAndErrorsErrors (std::string &messageString) |
Some messages for example from DCMTree(_OFFIS) are not marked with "error" or "warnings" and cannot be filtered correctly therefore in DicomMessageFilters. | |
MLDICOMCachedIO_EXPORT DCMTree::TreePtr | getDirectDCMTree (const std::string &fName, DicomMessageCollector &dcmMsgCollector, bool loadPixelData=false) |
Tries to open a file directly by reading it with the DCMTree interfaces and returns a non constant TreePtr pointer on success or a nullptr TreePtr on failure. | |
MLDICOMCachedIO_EXPORT DCMTree::TransferSyntax | getLosslessStorageTransferSyntax (DCMTree::Const_TreePtr dcmTree) |
If dcmTree has a TransferSyntaxUID tag matching one form LosslessTransferSyntaxUIDs then the corresponding DCMTree::TransferSyntax is returned, otherwise DCMTree::EXPLICIT_LITTLE_ENDIAN is returned. | |
MLDICOMCachedIO_EXPORT DCMTree::Const_TagPtr | getPrivateTag (const std::string &privateCreatorString, unsigned short groupId, DCMTree::RawTagId lowerEightBitOfElementId, DCMTree::Const_TreePtr dcmTree) |
If a private creator tag with value privateCreatorString in a private slot with groupId and a tag with element id lowerEightBitOfElementId is found then the private tag is returned; in all other cases nullptr is returned. | |
MLDICOMCachedIO_EXPORT bool | isPhilips3D (DCMTree::Const_TreePtr dcmTree, MLint *spatialExtent=nullptr) |
Looks for Philips3D format and if there is an extra spatial extent then it is returned in spatialExtent (if non-nullptr) and true is returned, in all other cases false is returned and spatialExtent is unchanged. | |
MLDICOMCachedIO_EXPORT unsigned int | getNumberOfFrames (DCMTree::Const_TreePtr dcmTree, unsigned int *fromTagOnly=nullptr) |
Returns the number of real frames in the data set from Number of Frames tag if possible including a possible private extensions such as Philips 3D; if the number of frames cannot be determined for any reason then 0 is returned; if fromTagOnly is not nullptr then the value of the Number Of Frames tag is returned or 0 if not possible. | |
MLDICOMCachedIO_EXPORT DCMTree::PixelData | getPixelDataPtrFromTree (DCMTree::Const_TreePtr treePtr, size_t *valSizeInBytes, DicomMessageCollector &dcmMsgCollector) |
Returns the pointer to the pixel data tag value. | |
MLDICOMCachedIO_EXPORT void | removeAssociatedCacheEntries (const DICOMCachedIOFileHandle &fileHandle) |
Flush all cached entries related to the given file handle. | |
MLDICOMCachedIO_EXPORT void | clearDICOMCaches () |
Clears all cached DICOM date including tags, trees, pixel frames and decomposed multi-frame trees. | |
Variables | |
MLDICOMCachedIO_EXPORT const char *const | LosslessTransferSyntaxUIDs [NumLosslessTransferSyntaxes] |
Supported lossless compression transfer syntax UIDs. | |
MLDICOMCachedIO_EXPORT const char *const | LosslessTransferSyntaxNames [NumLosslessTransferSyntaxes] |
Supported lossless compression transfer syntax names. | |
MLDICOMCachedIO_EXPORT DCMTree::TransferSyntax | LosslessTransferSyntaxCodes [NumLosslessTransferSyntaxes] |
DCMTree::TransferSyntax enums for supported lossless compression transfer syntax. | |
Number of supported lossless compression transfer syntax modes.
Enumerator | |
---|---|
NumLosslessTransferSyntaxes |
Definition at line 115 of file mlDICOMCachedIOTools.h.
MLDICOMCachedIO_EXPORT void ml::DICOMCachedIOTools::clearDICOMCaches | ( | ) |
Clears all cached DICOM date including tags, trees, pixel frames and decomposed multi-frame trees.
References clearDICOMCaches().
Referenced by clearDICOMCaches().
MLDICOMCachedIO_EXPORT DCMTree::TreePtr ml::DICOMCachedIOTools::getDirectDCMTree | ( | const std::string & | fName, |
DicomMessageCollector & | dcmMsgCollector, | ||
bool | loadPixelData = false ) |
Tries to open a file directly by reading it with the DCMTree interfaces and returns a non constant TreePtr pointer on success or a nullptr TreePtr on failure.
In contrast to the DICOMCachedIOTreeCache interfaces this tree is not cached. issues is set to the amount of fatal and non fatal issues. Note that there also may be non fatal messages in issues while a non nullptr tree is returned. This function is not thread-safe and not reentrant.
fName | File name from which the DCMTree is to be read. |
dcmMsgCollector | Collects error, info and issue messages (typically related to a handle). |
loadPixelData | If false (the default) then do not load pixel data, (usually for performance reasons), otherwise load it. |
References getDirectDCMTree().
Referenced by getDirectDCMTree().
MLDICOMCachedIO_EXPORT DCMTree::TransferSyntax ml::DICOMCachedIOTools::getLosslessStorageTransferSyntax | ( | DCMTree::Const_TreePtr | dcmTree | ) |
If dcmTree has a TransferSyntaxUID tag matching one form LosslessTransferSyntaxUIDs then the corresponding DCMTree::TransferSyntax is returned, otherwise DCMTree::EXPLICIT_LITTLE_ENDIAN is returned.
References getLosslessStorageTransferSyntax().
Referenced by getLosslessStorageTransferSyntax().
MLDICOMCachedIO_EXPORT unsigned int ml::DICOMCachedIOTools::getNumberOfFrames | ( | DCMTree::Const_TreePtr | dcmTree, |
unsigned int * | fromTagOnly = nullptr ) |
Returns the number of real frames in the data set from Number of Frames tag if possible including a possible private extensions such as Philips 3D; if the number of frames cannot be determined for any reason then 0 is returned; if fromTagOnly is not nullptr then the value of the Number Of Frames tag is returned or 0 if not possible.
References getNumberOfFrames().
Referenced by getNumberOfFrames().
MLDICOMCachedIO_EXPORT DCMTree::PixelData ml::DICOMCachedIOTools::getPixelDataPtrFromTree | ( | DCMTree::Const_TreePtr | treePtr, |
size_t * | valSizeInBytes, | ||
DicomMessageCollector & | dcmMsgCollector ) |
Returns the pointer to the pixel data tag value.
If data is not found then nullptr is returned. This function does not handle multi-frame pixel tags, nullptr is returned in that case, however, the expected size of pixel data is returned anyway if valSizeInBytes if provided non-nullptr. Only top level tags with ids DCMTree_PixelData, DCMTree_FloatPixelData, and DCMTree_DoubleFloatPixelData are checked.
treePtr | The DicomTree from whose pixelDataTag the pixelData shall be read. |
valSizeInBytes | If valSizeInBytes is non nullptr then *valSizeInBytes is set to the size of the pixel data chunk in bytes, otherwise it is ignored. |
dcmMsgCollector | Collects error, info and issue messages (typically related to a handle). |
References getPixelDataPtrFromTree().
Referenced by getPixelDataPtrFromTree().
MLDICOMCachedIO_EXPORT DCMTree::Const_TagPtr ml::DICOMCachedIOTools::getPrivateTag | ( | const std::string & | privateCreatorString, |
unsigned short | groupId, | ||
DCMTree::RawTagId | lowerEightBitOfElementId, | ||
DCMTree::Const_TreePtr | dcmTree ) |
If a private creator tag with value privateCreatorString in a private slot with groupId and a tag with element id lowerEightBitOfElementId is found then the private tag is returned; in all other cases nullptr is returned.
References getPrivateTag().
Referenced by getPrivateTag().
MLDICOMCachedIO_EXPORT bool ml::DICOMCachedIOTools::isPhilips3D | ( | DCMTree::Const_TreePtr | dcmTree, |
MLint * | spatialExtent = nullptr ) |
Looks for Philips3D format and if there is an extra spatial extent then it is returned in spatialExtent (if non-nullptr) and true is returned, in all other cases false is returned and spatialExtent is unchanged.
References isPhilips3D().
Referenced by isPhilips3D().
MLDICOMCachedIO_EXPORT void ml::DICOMCachedIOTools::makeWarningsWarningsAndErrorsErrors | ( | std::string & | messageString | ) |
Some messages for example from DCMTree(_OFFIS) are not marked with "error" or "warnings" and cannot be filtered correctly therefore in DicomMessageFilters.
Those ones we know we mark appropriately here by inserting "warning" or "error" at the correct places.
References makeWarningsWarningsAndErrorsErrors().
Referenced by makeWarningsWarningsAndErrorsErrors().
MLDICOMCachedIO_EXPORT void ml::DICOMCachedIOTools::popMessageCollecting | ( | DicomMessageCollector & | dcmMsgCollector, |
const std::string & | callersMessage, | ||
size_t | outStrMaxSize = std::string::npos, | ||
bool | addClampInfo = true ) |
Restores states which must have been saved before with pushMessageCollecting() and sends collected (and possibly processed) messages to dcmMsgCollector for further processing.
callersIssueDescription may contain additional information about the caller, its position etc for enhance message understanding.
dcmMsgCollector | The message collector into which the received messages are forwarded. |
callersMessage | The message added before the messages forwarded to the dcmMsgCollector. |
outStrMaxSize | Passed unchanged to the internally used unRedirectStream. |
addClampInfo | Passed unchanged to the internally used unRedirectStream. |
References popMessageCollecting().
Referenced by popMessageCollecting().
MLDICOMCachedIO_EXPORT void ml::DICOMCachedIOTools::pushMessageCollecting | ( | ) |
Takes current message handles of DCMTree library and uses redirectStream() to push current handler and message states on a stack and sets up own handlers to collect all messages from that handler and from std::cerr stream; needs to be restored with popMessageCollecting();.
References pushMessageCollecting().
Referenced by pushMessageCollecting().
MLDICOMCachedIO_EXPORT void ml::DICOMCachedIOTools::redirectStream | ( | std::ostream & | outputStream, |
std::streambuf *& | tempBuf, | ||
std::stringbuf *& | stringBuffer ) |
Redirect outputs to outputStream into the temporary buffer tmpBuf.
outputStream | The stream which to be redirected until unRedirectStream is called. |
tempBuf | The buffer used to store the streambuf used outputStream, must be passed unchanged to unredirectStream later. Previous content will be overwritten. |
stringBuffer | The buffer used to collect the stream outputs between the call to redirectStream and unRedirectStream, must be passed unchanged to unredirectStream later. Previous content will be overwritten. |
References redirectStream().
Referenced by redirectStream().
MLDICOMCachedIO_EXPORT void ml::DICOMCachedIOTools::removeAssociatedCacheEntries | ( | const DICOMCachedIOFileHandle & | fileHandle | ) |
Flush all cached entries related to the given file handle.
References removeAssociatedCacheEntries().
Referenced by removeAssociatedCacheEntries().
MLDICOMCachedIO_EXPORT std::string ml::DICOMCachedIOTools::unRedirectStream | ( | std::ostream & | outputStream, |
std::streambuf *& | tmpBuf, | ||
std::stringbuf *& | stringBuffer, | ||
size_t | outStrMaxSize = std::string::npos, | ||
bool | addClampInfo = true ) |
Undo the redirected output of outputStream into the temporary buffer tmpBuf.
outputStream | The stream which was redirected with redirectStream. |
tmpBuf | The buffer used to store the previous streambuf used by outputStream, must be one passed to redirectStream. |
stringBuffer | The buffer used to collect the stream outputs between the call to redirectStream and unRedirectStream. |
outStrMaxSize | The size to which the collected information will be clamped. |
addClampInfo | If the collected stream information was clamped then an information message will be added to inform the user about the clamping. |
References unRedirectStream().
Referenced by unRedirectStream().
|
extern |
DCMTree::TransferSyntax enums for supported lossless compression transfer syntax.
|
extern |
Supported lossless compression transfer syntax names.
|
extern |
Supported lossless compression transfer syntax UIDs.