MeVisLab Toolbox Reference
mlDICOMCachedIOPixelFrameCache.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
5
10//----------------------------------------------------------------------------------
11
12#pragma once
13
15#include <mlTypeDefs.h>
16#include <DCMTree_Lib.h>
17#include "DCMTree_MFPixelTag.h"
18
19ML_START_NAMESPACE
21
23 template<typename CT> class DICOMCachedIOFileHandleBase;
24
26 typedef DICOMCachedIOFileHandleBase<char> DICOMCachedIOFileHandle;
28ML_END_NAMESPACE
29
33
36
37public:
40
43
46
49
54
59 void removeAssociatedEntries(const ML_NAMESPACE::DICOMCachedIOFileHandle &fileHandle);
60
63 bool hasMultiFrameCache(const ML_NAMESPACE::DICOMCachedIOFileHandle &fileHandle,
64 size_t numFrames) const;
65
81 const ML_NAMESPACE::DICOMCachedIOFileHandle &fileNamePath,
82 size_t &numFoundFrames,
83 std::string &warnDesc,
84 std::string &errDesc);
85
96 DCMTree::MFPixelTag::pixel_cont_t getCachedPixFrameData(const ML_NAMESPACE::DICOMCachedIOFileHandle &fileName,
97 size_t frameIdx,
99 size_t numFrames);
100
103 MLMFPixDataFramesCacheEntry* getCachedPixFrameCacheEntry(const ML_NAMESPACE::DICOMCachedIOFileHandle &fileName);
104
106 void clear();
107
110
111private:
112
114 static MLDICOMCachedIOPixelFrameCacheContainer *_pixelFrameCachePtr;
115
118 static MLuint _instanceCounter;
119
121 MLDICOMCachedIOPixelFrameCacheContainer& _getCachedIOPixelFrameCacheContainer() const;
122};
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
DCMTree::MFPixelTag::pixel_cont_t getCachedPixFrameData(const ml::DICOMCachedIOFileHandle &fileName, size_t frameIdx, DCMTree::MFPixelTag::pixel_cont_t pixFrameData, size_t numFrames)
MLDICOMCachedIOPixelFrameCache & operator=(const MLDICOMCachedIOPixelFrameCache &)=default
Default assignment operator.
~MLDICOMCachedIOPixelFrameCache()
Destructor. Decrements the reference counting and deletes the cache if the new count is 0.
const MLDICOMCachedIOPixelFrameCacheContainer * getCachedIOPixelFrameCacheContainer() const
Returns a constant pointer to the singleton object.
void removeAssociatedEntries(const ml::DICOMCachedIOFileHandle &fileHandle)
bool hasMultiFrameCache(const ml::DICOMCachedIOFileHandle &fileHandle, size_t numFrames) const
void loadMultiFramesInCache(DCMTree::Const_TreePtr mfTree, const ml::DICOMCachedIOFileHandle &fileNamePath, size_t &numFoundFrames, std::string &warnDesc, std::string &errDesc)
static MLDICOMCachedIOPixelFrameCache singletonProxy()
MLDICOMCachedIOPixelFrameCache()
Constructor. Increments the reference counting and creates a cache if the count is 0.
void clear()
Clears the DICOM tag cache container.
MLMFPixDataFramesCacheEntry * getCachedPixFrameCacheEntry(const ml::DICOMCachedIOFileHandle &fileName)
MLDICOMCachedIOPixelFrameCache(const MLDICOMCachedIOPixelFrameCache &)=default
Default copy constructor.
Small helper class to manage a list of data frames related to a filename.
MLuint64 MLuint
Definition mlTypeDefs.h:505
boost::shared_ptr< const Tree > Const_TreePtr
Definition DCMTree_Lib.h:67
DICOMCachedIOFileHandleBase< char > DICOMCachedIOFileHandle
"Forward" to DICOMCachedIOFileHandle.