17#include <FMEThirdPartyWarningsDisable.h>
21#include <FMEThirdPartyWarningsRestore.h>
30namespace ML_NAMESPACE {
32 class DicomMessageCollector;
85 const ML_NAMESPACE::DICOMCachedIOFileHandle &origFileHandle,
99 ML_NAMESPACE::DicomMessageCollector &dcmMsgCollector);
103 const ML_NAMESPACE::DICOMCachedIOFileHandle &fileHandle);
134 std::map< ML_NAMESPACE::DICOMCachedIOFileHandle,
140 std::map< ML_NAMESPACE::DICOMCachedIOFileHandle,
Project global and OS specific declarations.
#define MLDICOMCachedIO_EXPORT
If included by external modules, exported symbols are declared as import symbols.
Class describing one entry in the MLDICOMCachedIOTreeCache of cached DICOM trees.
std::map< ml::DICOMCachedIOFileHandle, MLDICOMCachedIOTreeCacheSingleMFMapEntry > _singleFrameCache
MLint flush(const MLint maxBytes, const bool flushAll=false)
MLint getMaxNumMegaBytes() const
Return maximum number of bytes used for tag data.
MLint getNumFlushedBytes() const
Returns the number of flushed bytes since most recent recent resetNumFlushedBytes().
std::vector< MLDICOMCachedIODCMTreeLoaderPlugin * > _treeLoaderPlugins
Vector of loader plugins.
MLint _totalNumBytes
Total number of bytes in all DICOM trees.
std::map< ml::DICOMCachedIOFileHandle, MLDICOMCachedIOTreeCacheMapEntry > _cache
The tree map.
void resetNumFlushedBytes()
Sets counter of flushed bytes to 0.
~MLDICOMCachedIOTreeCacheMap()
Destructor; clears and deletes the MLDICOMCachedIODCMTreeLoaderPlugins and MLDICOMCachedIODCMTreeWrit...
void flushSingleFrameCache()
Clears all cached singleFrameTrees, because they are normally excluded from normal flushing.
MLint getTotalNumberOfBytes() const
Return currently number of cached tree data in bytes.
ml::IntField & getMaxNumMegaBytesFld()
Returns field that specifies the maximum number of mega bytes for tag data.
MLint _numFlushedBytes
Counter for number of flushed bytes since most recent resetNumFlushedBytes().
std::vector< MLDICOMCachedIODCMTreeLoaderPlugin * > & getTreeLoaderPlugins()
Return modifiable vector of DICOM tree loader plugins.
MLErrorCode addDCMTree(const ml::DICOMCachedIOFileHandle &fileHandle, DCMTree::TreePtr &treePtr)
See DICOMCachedIOTreeCache::addDCMTree().
MLint flush()
Same as flush(getMaxNumBytes(), false).
std::vector< MLDICOMCachedIODCMTreeWriterPlugin * > & getTreeWriterPlugins()
Return modifiable vector of DICOM tree writer plugins.
const std::vector< MLDICOMCachedIODCMTreeWriterPlugin * > & getConstTreeWriterPlugins() const
Return constant vector of DICOM tree writer plugins.
MLDICOMCachedIOTreeCacheMap()
Constructor; it is initialized with 250 MB of cache for DICOM tree tag data.
const std::vector< MLDICOMCachedIODCMTreeLoaderPlugin * > & getConstTreeLoaderPlugins() const
Return constant vector of DICOM tree loader plugins.
MLErrorCode saveDCMTree(DCMTree::Const_TreePtr dcmTree, const ml::DICOMCachedIOFileHandle &fileHandle)
See DICOMCachedIOTreeCache::saveDCMTree().
MLErrorCode loadDCMTree(const ml::DICOMCachedIOFileHandle &fileHandle, DCMTree::TreePtr &treePtr, ml::DicomMessageCollector &dcmMsgCollector)
See DICOMCachedIOTreeCache::loadDCMTree().
void storeSingleFrameTree(DCMTree::TreePtr singleFrameTree, const ml::DICOMCachedIOFileHandle &origFileHandle, size_t frameIndex)
See DICOMCachedIOTreeCache::storeSingleFrameTree().
void clear()
Clears the DICOM trees cache singleton and resets all counters.
void removeAssociatedEntries(const ml::DICOMCachedIOFileHandle &fileHandle)
MLErrorCode _addDCMTree(const ml::DICOMCachedIOFileHandle &fileHandle, DCMTree::TreePtr &treePtr)
MLint getMaxNumBytes() const
Return maximum number of bytes used for tag data.
ml::IntField * _limitInMegaBytesFld
IntField specifying the maximum number of value mega bytes allowed in all DICOM trees.
std::list< ml::DICOMCachedIOFileHandle > _recentlyCached
Stores the file names of DCMTrees added to cache in the order of caching.
MLErrorCode getCachedDCMTree(const ml::DICOMCachedIOFileHandle &fileHandle, DCMTree::TreePtr &treePtr)
See DICOMCachedIOTreeCache::getCachedDCMTree().
void setMaxNumMegaBytes(MLint maxNumMegaBytes)
Set maximum number of mega bytes used for tag data. Values < 0 are clamped to 0.
std::vector< MLDICOMCachedIODCMTreeWriterPlugin * > _treeWriterPlugins
Vector of writer plugins.
MLint32 MLErrorCode
Type of an ML Error code.
Header file of class describing one entry in the MLDICOMCachedIOTreeCache of cached DICOM trees.
boost::shared_ptr< const Tree > Const_TreePtr
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.