18 #include <FMEThirdPartyWarningsDisable.h>
20 #include <FMEThirdPartyWarningsRestore.h>
32 template<
typename CT>
class DICOMCachedIOFileHandleBase;
38 class DicomMessageCollector;
93 MLint maxTagValueSizeToCache,
96 ML_NAMESPACE::DicomMessageCollector &dcmMsgCollector);
112 const std::set<MLuint32> &tagIds,
113 MLint maxTagValueSizeToCache,
114 bool *treeLoadFailed,
115 ML_NAMESPACE::DicomMessageCollector &dcmMsgCollector);
167 static MLuint _instanceCounter;
Project global and OS specific declarations.
#define MLDICOMCachedIO_EXPORT
If included by external modules, exported symbols are declared as import symbols.
Structure containing the DCMTag look up map and the list of most recently used DICOM files as names.
Class for cached DICOM tag loading from files for DICOM importing modules.
void resetNumFlushedBytes()
Sets counter of flushed bytes to 0.
DCMTree::Const_TagPtr loadDCMTag(const ml::ConstantString &fileHandle, DCMTree::RawTagId rawTagId, MLint maxTagValueSizeToCache, bool *treeLoadFailed, bool *cacheMiss, ml::DicomMessageCollector &dcmMsgCollector)
Looks for a tag with the id rawTagId in the cache and if it does not exist then it tries to load and ...
void clear()
Clears the DICOM tag cache map.
MLint getTotalNumberOfBytes() const
Returns the approximate number of cached bytes.
ml::IntField & getMaxNumMegaBytesFld() const
Return field that holds the maximum number of bytes used for tag data.
~MLDICOMCachedIOTagCache()
Destructor. Decrements the reference counting and deletes the cache if the new count is 0.
static MLDICOMCachedIOTagCache singletonProxy()
Singleton and cache management: Singleton returning the global DCMTree cache map.
void setMaxNumBytes(MLint maxNumBytes)
Set maximum number of bytes (rounded down to MB limits) used for tag data; values < 0 are clamped to ...
MLint getMaxNumBytes() const
Return maximum number of bytes used for tag data (rounded down to MB limits).
MLint getMaxNumMegaBytes() const
Return maximum number of mega bytes used for tag data.
void prefetchDCMTags(const ml::ConstantString &fileHandle, const std::set< MLuint32 > &tagIds, MLint maxTagValueSizeToCache, bool *treeLoadFailed, ml::DicomMessageCollector &dcmMsgCollector)
Prefetch all tags of the tag types listed in tagIds and if their tag value sizes are smaller or equal...
const MLDICOMCachedIOTagCacheMap * getCachedIOTagCacheMap() const
Returns a constant pointer to the cache map.
DCMTree::Const_TagPtr getCachedDCMTag(const ml::DICOMCachedIOFileHandle &fileHandle, DCMTree::RawTagId rawTagId) const
Tag access and prefetching: Returns a valid tag pointer if the fileName with the rawTagId is cached,...
void flush()
Same as flush(getMaxNumBytes(), false).
void 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 getNumFlushedBytes() const
Returns the number of flushed bytes since most recent recent resetNumFlushedBytes().
MLDICOMCachedIOTagCache()
Constructor. Increments the reference counting and creates a cache if the count is 0.
void setMaxNumMegaBytes(MLint maxNumMegaBytes)
Set maximum number of mega bytes used for tag data; values < 0 are clamped to 0.
void removeAssociatedEntries(const ml::DICOMCachedIOFileHandle &fileHandle)
Searches all tags and pixel data frames with the given fileHandle in the cache and removes them; note...
Small helper class to manage a list of data frames related to a filename.
Field to encapsulate an integer value.
MLuint64 MLuint
An unsigned ML integer type with at least 64 bits used for index calculations on very large images ev...
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 Tag > Const_TagPtr
Forward and includes of internally used DPL classes.
DICOMCachedIOFileHandleBase< char > DICOMCachedIOFileHandle
"Forward" to DICOMCachedIOFileHandle.