16#include <FMEThirdPartyWarningsDisable.h>
19#include <boost/unordered_map.hpp>
20#include <FMEThirdPartyWarningsRestore.h>
43 _subImagesFlipped(
false)
52 std::vector<DCMTree::MFPixelTag::pixel_cont_t>
_pixDatas;
72 enum { MaxPixFrameDataCacheEntries = 3 };
95 const ML_NAMESPACE::DICOMCachedIOFileHandle &
fileNamePath,
120 const ML_NAMESPACE::DICOMCachedIOFileHandle &
fileNamePath,
125 const ML_NAMESPACE::DICOMCachedIOFileHandle &
fileNamePath,
Project global and OS specific declarations.
#define MLDICOMCachedIO_EXPORT
If included by external modules, exported symbols are declared as import symbols.
DCMTree::pixel_cont_t pixel_cont_t
Structure containing a container for pixel frames and an index of the most recently used one.
void removeAssociatedEntries(const std::string &fileName)
Clears the entrie(s) of the MLDICOMCachedIOPixelFrameCacheContainer which belong to fileName.
void clear()
Clears the MLDICOMCachedIOPixelFrameCacheContainer, the pixel frame caches, and resets all counters.
size_t _recentMFPixTagCacheIdx
Index to the recently created MFPixTagCache object.
void _fillMFCacheWithFloatData(DCMTree::Const_TreePtr mfTree, const ml::DICOMCachedIOFileHandle &fileNamePath, const boost::uint32_t numFrames, std::string &warnDesc, std::string &errDesc)
Helper function.
MLDICOMCachedIOPixelFrameCacheContainer()
Constructor; it is initialized with 25 MB of cache for DICOM tree tag data.
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.
void _fillMFCacheFromMFPixelTag(const DCMTree::MFPixelTag &mfPixelDataTag, const ml::DICOMCachedIOFileHandle &fileNamePath, size_t &numFoundFrames, std::string &errDesc)
Helper function.
~MLDICOMCachedIOPixelFrameCacheContainer()
Destructor, cleaning up internal objects.
void loadMultiFramesInCache(DCMTree::Const_TreePtr mfTree, const ml::DICOMCachedIOFileHandle &fileNamePath, size_t &numFoundFrames, std::string &warnDesc, std::string &errDesc)
See MLDICOMCachedIOPixelFrameCache::loadMultiFramesInCache().
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 re...
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().
MLMFPixDataFramesCacheEntry * getPixFrameCacheEntry(const std::string &fileName)
Return the vector of subimages associated with with pixel frame data; it depends by the application w...
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 e...
Small helper class to manage a list of data frames related to a filename.
std::vector< ml::SubImage > _frameSubImages
Array of fully constructed subimages containing the frames.
bool _subImagesFlipped
Indicates that subimages have been flipped, for example to compensate a negative slice spacing.
MLMFPixDataFramesCacheEntry(const std::string &fileName, size_t numFrames)
Constructor to store the filename and to set the size of the array for its data frames.
std::string _fileName
Name of the file from which the frames come.
std::vector< DCMTree::MFPixelTag::pixel_cont_t > _pixDatas
Array of raw frame data pointers.
Header of FileHandle class which should be used in DICOM importing modules to resolve the filename fo...
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
boost::shared_ptr< const Tree > Const_TreePtr