MeVisLab Toolbox Reference
mlAccessDirectDicomImportWrapper.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code
3 //----------------------------------------------------------------------------------
5 
11 //----------------------------------------------------------------------------------
12 #pragma once
13 
14 #include <ThirdPartyWarningsDisable.h>
15 #include <QObject>
16 #include <QVariantList>
17 #include <ThirdPartyWarningsRestore.h>
18 
21 
22 ML_START_NAMESPACE
23 class AccessDirectDicomImportCache;
24 ML_END_NAMESPACE
25 
28 class MLAccessDirectDicomImportWrapper: public QObject {
29 Q_OBJECT ;
30 
31 public:
33  MLAccessDirectDicomImportWrapper(ml::AccessDirectDicomImportCache* addic):_fileHandlePlugin(NULL), _dicomTreeWrapper(NULL),_dicomTagWrapper(NULL),_accessDirectDicomImport(addic) {};
36 
37  //public slots, that can be called via Qt / Python.
38 public slots:
40  QObject* getDCMTree();
42  QObject* getDCMTree(const QString &key);
44  QObject* getDCMTag(const QString &key);
46  QObject* getDCMTagByName(const QString &name);
48  QString getDicomTagValueByKey(const QString &key);
50  QString getDicomTagValueByName(const QString& name);
52  void setUrl(QString &url);
54  void setTagsToPrefetchFromConfig(const QString &config);
56  void prefetchTagsFromConfig(const QString &config);
65 
66 private:
68  QObject* _getDCMTree(const std::string &key);
69  // DICOMCachedIOFileHandlePythonPlugin to be added to the DICOMCachedIOFileHandlePluginProvider
70 
72  void _updateMLABDicomTreeWrapper(DCMTree::Const_TreePtr dcmTree);
74  void _updateMLABDicomTagWrapper(DCMTree::Const_TagPtr tag);
75 
77  DICOMCachedIOFileHandlePythonPlugin * _fileHandlePlugin;
79  QObject* _dicomTreeWrapper;
81  QObject* _dicomTagWrapper;
82 
84  ml::AccessDirectDicomImportCache* _accessDirectDicomImport;
85 };
The DICOMCachedIOFileHandlePythonPlugin class can be used to resolve DICOMCachedIOFileHandle from pyt...
The DICOMCachedIOFileHandlePythonPlugin class can be used to resolve DICOMCachedIOFileHandle from pyt...
This class wraps MLAccessDirectDicomImportCache objects.
QString getDicomTagValueByKey(const QString &key)
Returns the string representation of the DICOM tag.
QObject * getDCMTree()
Returns the MLABDicomTree for the url specified in the urlField.
qint64 getDicomCachedIoTreeCacheMaxNumBytes() const
Returns the maximum cache size of the MLDICOMCachedIOTreeCacheMap.
QString getDicomTagValueByName(const QString &name)
Returns the string representation of the DICOM tag by given name.
void removePythonFileHandlePlugin(DICOMCachedIOFileHandlePythonPlugin *)
Removes the given instance of a DICOMCachedIOFileHandlePythonPlugin to resolve filenames for a given ...
QObject * getDCMTree(const QString &key)
Returns the MLABDicomTree for given url.
void prefetchTagsFromConfig(const QString &config)
Reads the Dicom Tag id's from a DPL config and prefetches these tags.
void setTagsToPrefetchFromConfig(const QString &config)
Reads the Dicom Tag id's from a DPL config and sets these id's in the _tagsToPrefetchFld.
QObject * addPythonFileHandlePlugin()
Adds an instance of a DICOMCachedIOFileHandlePythonPlugin to resolve filenames for a given file handl...
qint64 getDicomCachedIoTagCacheMaxNumBytes() const
Returns the maximum cache size of the MLDICOMCachedIOTagCacheMap.
QObject * getDCMTag(const QString &key)
Returns the MLABDicomTag for the given dicom key in format.
void setUrl(QString &url)
sets the url for the dicom tree.
MLAccessDirectDicomImportWrapper(ml::AccessDirectDicomImportCache *addic)
Constructor.
~MLAccessDirectDicomImportWrapper() override
Destructor.
QObject * getDCMTagByName(const QString &name)
Returns the MLABDicomTag for the given dicom tag name.
ML module class AccessDirectDicomImportCache provides access to tool functions implemented in MLDICOM...
The ML module class AccessDirectDicomImportCache.
boost::shared_ptr< const Tag > Const_TagPtr
Definition: DCMTree_Lib.h:63
boost::shared_ptr< const Tree > Const_TreePtr
Definition: DCMTree_Lib.h:73