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 
26 ML_START_NAMESPACE
27 
29 class DICOMCachedIOFileHandlePlugin;
30 class DicomMessageCollector;
31 
35 {
36 public:
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  }
96 
101 
102 private:
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 
140 ML_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.
ML module class AccessDirectDicomImportCache provides access to tool functions implemented in MLDICOM...
~AccessDirectDicomImportCache() override
Destructor.
virtual DCMTree::Const_TagPtr getDCMTag(const std::string &url, const std::string &tagId, bool *treeLoadFailed, DicomMessageCollector &dcmMsgCollector)
Returns the DCMTree::Const_TagPtr for the specified url and tag.
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)
Removes a DICOMCachedIOFileHandlePlugin to the DICOMCachedIOFileHandleProvider.
MLint getDicomCachedIOTagCacheSize() const
Returns the maximum cache size of the MLDICOMCachedIOTagCacheMap.
virtual void setTagsToPrefetchFromConfig(const std::string &config)
Tool function to prefetch DCMTags into the MLDICOMCachedIOTagCache, to be used in combination with Di...
virtual void addDicomCachedIOFileHandlePlugin(DICOMCachedIOFileHandlePlugin *fileHandlePlugin)
Adds a DICOMCachedIOFileHandlePlugin to the DICOMCachedIOFileHandleProvider.
virtual DCMTree::TreePtr getDCMTree(const std::string &url, DicomMessageCollector &dcmMsgCollector)
Returns the DCMTree::TreePtr for the specified url.
Field to encapsulate a boolean value.
Definition: mlFields.h:62
Class for resolving filenames from a given identifier (url,etc...) for DICOM importing modules.
Class to collect messages and errors related to a given frame handle.
Base class for all fields used in the ML.
Definition: mlField.h:73
Field to encapsulate an integer value.
Definition: mlFields.h:161
Base class for an image processing module of the ML.
Definition: mlModule.h:156
Field without value for notifications.
Definition: mlFields.h:1049
Field to encapsulate a string value.
Definition: mlFields.h:1000
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
unsigned int MLuint32
Definition: mlTypeDefs.h:191
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Definition: mlTypeDefs.h:578
boost::shared_ptr< const Tag > Const_TagPtr
Definition: DCMTree_Lib.h:63
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree
Definition: DCMTree_Lib.h:70