MeVisLab Toolbox Reference
MLDICOMCachedIOPixelFrameCacheContainer Class Reference

Structure containing a container for pixel frames and an index of the most recently used one. More...

#include <mlDICOMCachedIOPixelFrameCacheContainer.h>

Public Types

enum  { MaxPixFrameDataCacheEntries = 3 }
 Number of recent multi-frame files whose frames are to be cached in memory. More...
 

Public Member Functions

 MLDICOMCachedIOPixelFrameCacheContainer ()
 Constructor; it is initialized with 25 MB of cache for DICOM tree tag data. More...
 
 ~MLDICOMCachedIOPixelFrameCacheContainer ()
 Destructor, cleaning up internal objects. More...
 
DCMTree::MFPixelTag::pixel_cont_t getCachedPixFrameData (const ml::DICOMCachedIOFileHandle &fileName, size_t frameIdx, DCMTree::MFPixelTag::pixel_cont_t pixFrameData, size_t numFrames)
 See MLDICOMCachedIOPixelFrameCache::getCachedPixFrameData(). More...
 
void addPixFrameData (const std::string &fileName, size_t frameIdx, DCMTree::MFPixelTag::pixel_cont_t pixFrameData, size_t numFrames)
 Add DICOM pixel data frame to the cache under the fileName as key; addPixFrameData requests with an empty fileName will be ignored (note that its data sizes are not counted). More...
 
void loadMultiFramesInCache (DCMTree::Const_TreePtr mfTree, const ml::DICOMCachedIOFileHandle &fileNamePath, size_t &numFoundFrames, std::string &warnDesc, std::string &errDesc)
 See MLDICOMCachedIOPixelFrameCache::loadMultiFramesInCache(). More...
 
DCMTree::MFPixelTag::pixel_cont_t getPixFrameData (const std::string &fileName, size_t frameIdx, size_t numFrames)
 If there is a pixel data cache for a file name then return a cache reference, otherwise nullptr is returned. More...
 
MLMFPixDataFramesCacheEntrygetPixFrameCacheEntry (const std::string &fileName)
 Return the vector of subimages associated with with pixel frame data; it depends by the application whether it is initialized or not. More...
 
bool hasPixFrameDataCache (const std::string &fileName, size_t numFrames) const
 If there is a pixel data cache for file name with numFrames then it returns true, otherwise false. More...
 
void removeAssociatedEntries (const std::string &fileName)
 Clears the entrie(s) of the MLDICOMCachedIOPixelFrameCacheContainer which belong to fileName. More...
 
void clear ()
 Clears the MLDICOMCachedIOPixelFrameCacheContainer, the pixel frame caches, and resets all counters. More...
 

Protected Member Functions

void _fillMFCacheFromMFPixelTag (const DCMTree::MFPixelTag &mfPixelDataTag, const ml::DICOMCachedIOFileHandle &fileNamePath, size_t &numFoundFrames, std::string &errDesc)
 Helper function. More...
 
void _fillMFCacheWithFloatData (DCMTree::Const_TreePtr mfTree, const ml::DICOMCachedIOFileHandle &fileNamePath, const boost::uint32_t numFrames, std::string &warnDesc, std::string &errDesc)
 Helper function. More...
 

Protected Attributes

size_t _recentMFPixTagCacheIdx
 Index to the recently created MFPixTagCache object. More...
 
MLMFPixDataFramesCacheEntry_pixelFrameCaches [MaxPixFrameDataCacheEntries]
 Array of at most MaxPixFrameDataCaches frame cache objects. More...
 

Detailed Description

Structure containing a container for pixel frames and an index of the most recently used one.

. It also contains a recent frame data cache for multi-frame pixel data. These two functionalities in the future should be separated into different classes for nicer modularity.

Definition at line 66 of file mlDICOMCachedIOPixelFrameCacheContainer.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Number of recent multi-frame files whose frames are to be cached in memory.

Enumerator
MaxPixFrameDataCacheEntries 

Definition at line 72 of file mlDICOMCachedIOPixelFrameCacheContainer.h.

Constructor & Destructor Documentation

◆ MLDICOMCachedIOPixelFrameCacheContainer()

MLDICOMCachedIOPixelFrameCacheContainer::MLDICOMCachedIOPixelFrameCacheContainer ( )

Constructor; it is initialized with 25 MB of cache for DICOM tree tag data.

◆ ~MLDICOMCachedIOPixelFrameCacheContainer()

MLDICOMCachedIOPixelFrameCacheContainer::~MLDICOMCachedIOPixelFrameCacheContainer ( )

Destructor, cleaning up internal objects.

Member Function Documentation

◆ _fillMFCacheFromMFPixelTag()

void MLDICOMCachedIOPixelFrameCacheContainer::_fillMFCacheFromMFPixelTag ( const DCMTree::MFPixelTag mfPixelDataTag,
const ml::DICOMCachedIOFileHandle fileNamePath,
size_t &  numFoundFrames,
std::string &  errDesc 
)
protected

Helper function.

◆ _fillMFCacheWithFloatData()

void MLDICOMCachedIOPixelFrameCacheContainer::_fillMFCacheWithFloatData ( DCMTree::Const_TreePtr  mfTree,
const ml::DICOMCachedIOFileHandle fileNamePath,
const boost::uint32_t  numFrames,
std::string &  warnDesc,
std::string &  errDesc 
)
protected

Helper function.

◆ addPixFrameData()

void MLDICOMCachedIOPixelFrameCacheContainer::addPixFrameData ( const std::string &  fileName,
size_t  frameIdx,
DCMTree::MFPixelTag::pixel_cont_t  pixFrameData,
size_t  numFrames 
)

Add DICOM pixel data frame to the cache under the fileName as key; addPixFrameData requests with an empty fileName will be ignored (note that its data sizes are not counted).


◆ clear()

void MLDICOMCachedIOPixelFrameCacheContainer::clear ( )

Clears the MLDICOMCachedIOPixelFrameCacheContainer, the pixel frame caches, and resets all counters.

◆ getCachedPixFrameData()

DCMTree::MFPixelTag::pixel_cont_t MLDICOMCachedIOPixelFrameCacheContainer::getCachedPixFrameData ( const ml::DICOMCachedIOFileHandle fileName,
size_t  frameIdx,
DCMTree::MFPixelTag::pixel_cont_t  pixFrameData,
size_t  numFrames 
)

◆ getPixFrameCacheEntry()

MLMFPixDataFramesCacheEntry* MLDICOMCachedIOPixelFrameCacheContainer::getPixFrameCacheEntry ( const std::string &  fileName)

Return the vector of subimages associated with with pixel frame data; it depends by the application whether it is initialized or not.

◆ getPixFrameData()

DCMTree::MFPixelTag::pixel_cont_t MLDICOMCachedIOPixelFrameCacheContainer::getPixFrameData ( const std::string &  fileName,
size_t  frameIdx,
size_t  numFrames 
)

If there is a pixel data cache for a file name then return a cache reference, otherwise nullptr is returned.

◆ hasPixFrameDataCache()

bool MLDICOMCachedIOPixelFrameCacheContainer::hasPixFrameDataCache ( const std::string &  fileName,
size_t  numFrames 
) const

If there is a pixel data cache for file name with numFrames then it returns true, otherwise false.

◆ loadMultiFramesInCache()

void MLDICOMCachedIOPixelFrameCacheContainer::loadMultiFramesInCache ( DCMTree::Const_TreePtr  mfTree,
const ml::DICOMCachedIOFileHandle fileNamePath,
size_t &  numFoundFrames,
std::string &  warnDesc,
std::string &  errDesc 
)

◆ removeAssociatedEntries()

void MLDICOMCachedIOPixelFrameCacheContainer::removeAssociatedEntries ( const std::string &  fileName)

Clears the entrie(s) of the MLDICOMCachedIOPixelFrameCacheContainer which belong to fileName.

Member Data Documentation

◆ _pixelFrameCaches

MLMFPixDataFramesCacheEntry* MLDICOMCachedIOPixelFrameCacheContainer::_pixelFrameCaches[MaxPixFrameDataCacheEntries]
protected

Array of at most MaxPixFrameDataCaches frame cache objects.

Definition at line 135 of file mlDICOMCachedIOPixelFrameCacheContainer.h.

◆ _recentMFPixTagCacheIdx

size_t MLDICOMCachedIOPixelFrameCacheContainer::_recentMFPixTagCacheIdx
protected

Index to the recently created MFPixTagCache object.

Definition at line 132 of file mlDICOMCachedIOPixelFrameCacheContainer.h.


The documentation for this class was generated from the following file: