17 #include <FMEThirdPartyWarningsDisable.h>
21 #include <FMEThirdPartyWarningsRestore.h>
30 namespace ML_NAMESPACE {
32 class DicomMessageCollector;
99 ML_NAMESPACE::DicomMessageCollector &dcmMsgCollector);
110 inline std::vector< MLDICOMCachedIODCMTreeLoaderPlugin *>&
getTreeLoaderPlugins() {
return _treeLoaderPlugins; }
116 inline std::vector< MLDICOMCachedIODCMTreeWriterPlugin* >&
getTreeWriterPlugins() {
return _treeWriterPlugins; }
Project global and OS specific declarations.
#define MLDICOMCachedIO_EXPORT
If included by external modules, exported symbols are declared as import symbols.
Base class for plugins which support loading of DICOM trees (this class already implements basic file...
Base class for plugins which support writing of DICOM trees (this class already implements basic file...
Class describing one entry in the MLDICOMCachedIOTreeCache of cached DICOM trees.
Class containing the DCMTree look up map and the list of most recently used DICOM files as names.
std::map< ml::DICOMCachedIOFileHandle, MLDICOMCachedIOTreeCacheSingleMFMapEntry > _singleFrameCache
The map of SingleMultiFrame Frames extracted from multi-frame files.
MLint flush(const MLint maxBytes, const bool flushAll=false)
Flushes entries which have no other references than those ones from the cache until the given maxByte...
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().
const std::vector< MLDICOMCachedIODCMTreeLoaderPlugin * > & getConstTreeLoaderPlugins() const
Return constant vector of DICOM tree loader plugins.
const std::vector< MLDICOMCachedIODCMTreeWriterPlugin * > & getConstTreeWriterPlugins() const
Return constant vector of DICOM tree writer plugins.
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.
MLint _numFlushedBytes
Counter for number of flushed bytes since most recent resetNumFlushedBytes().
MLErrorCode addDCMTree(const ml::DICOMCachedIOFileHandle &fileHandle, DCMTree::TreePtr &treePtr)
See DICOMCachedIOTreeCache::addDCMTree().
MLint flush()
Same as flush(getMaxNumBytes(), false).
MLDICOMCachedIOTreeCacheMap()
Constructor; it is initialized with 250 MB of cache for DICOM tree tag data.
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)
Removes cached multi-frame data and/or tree related to fileHandle.
MLErrorCode _addDCMTree(const ml::DICOMCachedIOFileHandle &fileHandle, DCMTree::TreePtr &treePtr)
Internal method that adds the given DICOM tree to the cache map with the specified fileHandle as key.
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.
ml::IntField & getMaxNumMegaBytesFld()
Returns field that specifies the maximum number of mega bytes for tag data.
std::list< ml::DICOMCachedIOFileHandle > _recentlyCached
Stores the file names of DCMTrees added to cache in the order of caching.
std::vector< MLDICOMCachedIODCMTreeLoaderPlugin * > & getTreeLoaderPlugins()
Return modifiable vector of DICOM tree loader plugins.
std::vector< MLDICOMCachedIODCMTreeWriterPlugin * > & getTreeWriterPlugins()
Return modifiable vector of DICOM tree writer plugins.
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.
Class describing one SingleMultiFrameFrame entry in the map of locked single frames in the MLDICOMCac...
Field to encapsulate an integer value.
MLint32 MLErrorCode
Type of an ML Error code.
Header of FileHandle class which should be used in DICOM importing modules to resolve the filename fo...
Header file of class describing one entry in the MLDICOMCachedIOTreeCache of cached DICOM trees.
Header file of class MLDICOMCachedIOTreeCacheSingleMFMapEntry which describes one SingleMultiFrameFra...
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
boost::shared_ptr< const Tree > Const_TreePtr
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.
DICOMCachedIOFileHandleBase< char > DICOMCachedIOFileHandle
"Forward" to DICOMCachedIOFileHandle.