MeVisLabToolboxReference
mlAccessDirectDicomImportCache.h
Go to the documentation of this file.
1 /*
2 // Copyright (c) Fraunhofer MEVIS, Bremen, Germany
3 // All rights reserved.
4 // **InsertLicense** code
5 */
6 //----------------------------------------------------------------------------------
8 
13 
14 //----------------------------------------------------------------------------------
15 
16 
17 #ifndef __mlAccessDirectDicomImportCache_H
18 #define __mlAccessDirectDicomImportCache_H
19 
20 // Local includes
22 
23 // ML includes
24 #include <mlModuleIncludes.h>
25 
26 #include <DCMTree_Tree.h>
27 
28 // Forward to avoid include.
31 
32 ML_START_NAMESPACE
33 
35 class DICOMCachedIOFileHandlePlugin;
36 
40 {
41 public:
44 
47 
49  virtual void handleNotification (Field *field);
50 
53  virtual DCMTree::TreePtr getDCMTree(const std::string &url, std::string &issueMessages);
54 
58  virtual DCMTree::Const_TagPtr getDCMTag(const std::string &url,const std::string &tagId, bool *treeLoadFailed, std::string &issueMessages);
59 
66  virtual void setTagsToPrefetchFromConfig(const std::string &config);
67 
69  virtual void prefetchTags();
70 
73  virtual void addDicomCachedIOFileHandlePlugin(DICOMCachedIOFileHandlePlugin * fileHandlePlugin);
76  virtual void removeDicomCachedIOFileHandlePlugin(DICOMCachedIOFileHandlePlugin * fileHandlePlugin);
78  std::string getUrl() const {
79  std::string url;
80  if (_urlFld) {
81  url = _urlFld->getStringValue();
82  }
83  return url;
84  }
85 
86  void setUrl(std::string &url) {
87  if(_urlFld) {
88  _urlFld->setStringValue(url);
89  }
90  }
92  MLint getDicomCachedIOTagCacheSize()const;
94  MLint getDicomCachedIOTreeCacheSize()const;
95 
96 private:
99  MLuint32 getRawTagIdFromString(const std::string &tag);
100 
101  MLDICOMCachedIOTagCache *_tagCacheProxy;
102  MLDICOMCachedIOTreeCache *_treeCacheProxy;
103 
104 
106 
107  StringField *_urlFld;
108  StringField *_dicomTagFld;
109  StringField *_tagsToPrefetchFld;
110 
111  StringField *_tagResultFld;
112 
113  NotifyField *_updateTagFld;
114  NotifyField *_prefetchTagsFld;
116 
118  StringField *_statusBarFld;
119  IntField *_dicomCachedIOTagCacheMaxNumMegaBytesFld;
120  IntField *_dicomCachedIOTreeCacheMaxNumMegaBytesFld;
121 
123  BoolField *_tagResultIsValidFld;
124 
125  // Implements interface for the runtime type system of the ML.
127 };
128 
129 ML_END_NAMESPACE
130 
131 #endif // __mlAccessDirectDicomImportCache_H
Field to encapsulate a boolean value.
Definition: mlFields.h:55
boost::shared_ptr< const Tag > Const_TagPtr
Definition: DCMTree_Lib.h:61
ML module class AccessDirectDicomImportCache provides access to tool functions implemented in MLDICOM...
Class for cached DICOM tag loading from files for DICOM importing modules.
#define MLACCESSDIRECTDICOMIMPORTCACHE_EXPORT
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Definition: mlTypeDefs.h:576
std::string getUrl() const
Public getter and setter function for url field values.
Base class for all fields used in the ML.
Definition: mlField.h:65
Project global and OS specific declarations.
Field to encapsulate an integer value.
Definition: mlFields.h:154
virtual void handleNotification(Field *)
Called when any field data in the field container of this module is modified.
Definition: mlModule.h:790
This class represents a complete DICOM-message, including sequences etc.
Field to encapsulate a string value.
Definition: mlFields.h:985
Class for DICOM tree accesses and caching of them for DICOM importing modules.
unsigned int MLuint32
Definition: mlTypeDefs.h:213
This file includes most files needed to implement new ML modules.
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
Base class for an image processing module of the ML.
Definition: mlModule.h:152
Field without value for notifications.
Definition: mlFields.h:1034
Class provides a file handling for DICOM importing modules.
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree
Definition: DCMTree_Lib.h:68