MeVisLab Toolbox Reference
mlAccessDirectDicomImportCache.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
14// Local includes
16
17// ML includes
18#include <mlModuleIncludes.h>
19
20#include <DCMTree_Tree.h>
21
22// Forward to avoid include.
25
26ML_START_NAMESPACE
27
29class DICOMCachedIOFileHandlePlugin;
30class DicomMessageCollector;
31
35{
36public:
39
42
44 void handleNotification (Field *field) override;
45
49 virtual DCMTree::TreePtr getDCMTree(const std::string &url,
50 DicomMessageCollector &dcmMsgCollector);
51
58 virtual DCMTree::Const_TagPtr getDCMTag(const std::string &url,
59 const std::string &tagId,
60 bool *treeLoadFailed,
61 DicomMessageCollector &dcmMsgCollector);
62
69 virtual void setTagsToPrefetchFromConfig(const std::string &config);
70
72 virtual void prefetchTags();
73
80
82 std::string getUrl() const {
83 std::string url;
84 if (_urlFld) {
85 url = _urlFld->getStringValue();
86 }
87 return url;
88 }
89
90 void setUrl(std::string &url) {
91 if(_urlFld) {
92 _urlFld->setStringValue(url);
93 }
94 }
95
96
101
102private:
105 MLuint32 getRawTagIdFromString(const std::string &tag);
106
108 MLDICOMCachedIOTagCache *_tagCacheProxy;
110 MLDICOMCachedIOTreeCache *_treeCacheProxy;
111
112
115 StringField *_urlFld;
116 StringField *_dicomTagFld;
117 StringField *_tagsToPrefetchFld;
118
119 StringField *_tagResultFld;
120
121 NotifyField *_updateTagFld;
122 NotifyField *_prefetchTagsFld;
124
126 StringField *_statusBarFld;
127
129 IntField *_dicomCachedIOTagCacheMaxNumMegaBytesFld;
131 IntField *_dicomCachedIOTreeCacheMaxNumMegaBytesFld;
132
134 BoolField *_tagResultIsValidFld;
135
136 // Implements interface for the runtime type system of the ML.
138};
139
140ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLACCESSDIRECTDICOMIMPORTCACHE_EXPORT
DLL export macro definition.
Class for cached DICOM tag loading from files for DICOM importing modules.
Class for DICOM tree accesses and caching of them for DICOM importing modules.
~AccessDirectDicomImportCache() override
Destructor.
virtual DCMTree::Const_TagPtr getDCMTag(const std::string &url, const std::string &tagId, bool *treeLoadFailed, DicomMessageCollector &dcmMsgCollector)
virtual void prefetchTags()
Prefetches the dicom tags specified in _tagsToPrefetchFld for the DCMTree with location given in _url...
AccessDirectDicomImportCache()
Constructor.
MLint getDicomCachedIOTreeCacheSize() const
Returns the maximum cache size of the MLDICOMCachedIOTreeCacheMap.
void handleNotification(Field *field) override
Handles field changes of the field field.
virtual void removeDicomCachedIOFileHandlePlugin(DICOMCachedIOFileHandlePlugin *fileHandlePlugin)
MLint getDicomCachedIOTagCacheSize() const
Returns the maximum cache size of the MLDICOMCachedIOTagCacheMap.
virtual void setTagsToPrefetchFromConfig(const std::string &config)
virtual void addDicomCachedIOFileHandlePlugin(DICOMCachedIOFileHandlePlugin *fileHandlePlugin)
virtual DCMTree::TreePtr getDCMTree(const std::string &url, DicomMessageCollector &dcmMsgCollector)
Class to collect messages and errors related to a given frame handle.
Module(int numInputImages, int numOutputImages)
#define ML_MODULE_CLASS_HEADER(className)
unsigned int MLuint32
Definition mlTypeDefs.h:184
MLint64 MLint
Definition mlTypeDefs.h:489
boost::shared_ptr< const Tag > Const_TagPtr
Definition DCMTree_Lib.h:57
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.
Definition DCMTree_Lib.h:66