22template<
typename CT>
class DICOMCachedIOFileHandleBase;
28class DicomMessageCollector;
52 ~ MLDICOMCachedIOTreeCache();
120 const ML_NAMESPACE::DICOMCachedIOFileHandle &origFileHandle,
130 const ML_NAMESPACE::DICOMCachedIOFileHandle &fileHandle);
150 ML_NAMESPACE::DicomMessageCollector &dcmMsgCollector);
160 ML_NAMESPACE::DicomMessageCollector &dcmMsgCollector);
169 ML_NAMESPACE::DicomMessageCollector &dcmMsgCollector);
184 static MLuint _instanceCounter;
Project global and OS specific declarations.
#define MLDICOMCachedIO_EXPORT
If included by external modules, exported symbols are declared as import symbols.
void storeSingleFrameTree(DCMTree::TreePtr singleFrameTree, const ml::DICOMCachedIOFileHandle &origFileHandle, size_t frameIndex)
Single frame management of multi-frame files.
void setMaxNumBytes(MLint maxNumBytes)
Set maximum number of bytes used for tree data. Values < 0 are clamped to 0.
void flushSingleFrameCache()
Clears all cached singleFrameTrees, because they are normally excluded from normal flushing.
MLint getMaxNumMegaBytes() const
Return maximum number of bytes used for tree data.
static MLDICOMCachedIOTreeCache singletonProxy()
Singleton and cache management.
MLint getNumFlushedBytes() const
Returns the number of flushed bytes since most recent recent resetNumFlushedBytes().
MLErrorCode loadSMFTree(const ml::DICOMCachedIOFileHandle &fileHandle, DCMTree::StructuredMFPtr &smfPtr, ml::DicomMessageCollector &dcmMsgCollector)
MLint flush(const MLint maxBytes, const bool flushAll=false)
Singleton and cache management.
MLDICOMCachedIOTreeCache(const MLDICOMCachedIOTreeCache &)=delete
Delete copy constructor to prevent usage.
void removeAssociatedEntries(const ml::DICOMCachedIOFileHandle &fileHandle)
MLint getTotalNumberOfBytes() const
Returns the approximate number of cached bytes in trees.
void setMaxNumMegaBytes(MLint maxNumMegaBytes)
Set maximum number of mega bytes used for tree data. Values < 0 are clamped to 0.
MLErrorCode addDCMTree(const ml::DICOMCachedIOFileHandle &fileHandle, DCMTree::TreePtr &treePtr)
ml::IntField & getMaxNumMegaBytesFld() const
Return field that holds the maximum number of mega bytes used for tree data.
MLDICOMCachedIOTreeCache & operator=(const MLDICOMCachedIOTreeCache &)=delete
Delete assignment operator to prevent usage.
MLErrorCode loadDCMTree(const ml::DICOMCachedIOFileHandle &fileHandle, DCMTree::TreePtr &treePtr, ml::DicomMessageCollector &dcmMsgCollector)
MLErrorCode saveDCMTree(DCMTree::Const_TreePtr dcmTree, const ml::DICOMCachedIOFileHandle &fileHandle)
DCMTree IO Support.
MLErrorCode loadConstantDCMTree(const ml::DICOMCachedIOFileHandle &fileHandle, DCMTree::Const_TreePtr &treePtr, ml::DicomMessageCollector &dcmMsgCollector)
void resetNumFlushedBytes()
Sets counter of flushed bytes to 0.
MLDICOMCachedIOTreeCache()
Constructor. Increments the reference counting and creates a cache if the count is 0.
void clear()
Clears the DICOM trees cache map.
MLint flush()
Same as flush(getMaxNumBytes(), false).
MLint getMaxNumBytes() const
Return maximum number of bytes used for tree data.
MLErrorCode getCachedDCMTree(const ml::DICOMCachedIOFileHandle &fileHandle, DCMTree::TreePtr &treePtr)
MLint32 MLErrorCode
Type of an ML Error code.
boost::shared_ptr< StructuredMF > StructuredMFPtr
boost::shared_ptr< const Tree > Const_TreePtr
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.
DICOMCachedIOFileHandleBase< char > DICOMCachedIOFileHandle
"Forward" to DICOMCachedIOFileHandle.