MeVisLab Toolbox Reference
DCMTree_Reader.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef DCM_TREE_READER_H
14 #define DCM_TREE_READER_H
15 
16 #include "DCMTree_Lib.h"
17 #include "DCMTree_Defines.h"
18 #include "DCMTree_TagId.h"
19 #include "DCMTree_IOParameter.h"
20 
21 #ifdef _MSC_VER
22  #pragma warning (push)
23  #pragma warning (disable : 4251)
24 #endif
25 
45 namespace DCMTree
46 {
47  class Reader;
48  typedef boost::shared_ptr<Reader> ReaderPtr;
49  typedef boost::shared_ptr<const Reader> Const_ReaderPtr;
50 
52  {
53  public:
58  static ReaderPtr create(const Const_DictPtr &dictArg);
59 
61  virtual ~Reader();
62 
67  virtual MessagePtr read (const Const_IOParameterPtr &parameter)=0;
68 
73 
74  protected:
81  static ReaderPtr create(const Const_ReaderPtr &prototype, const Const_DictPtr &dictArg);
82 
85 
87  static void setPrototype(Const_ReaderPtr prototype);
88 
93  virtual ReaderPtr createConcrete(const Const_DictPtr &dictArg) const = 0;
94 
96  Reader (Const_DictPtr dictArg);
97 
99  Reader ();
100 
101  private:
103  static Const_ReaderPtr _prototype;
104 
105  Const_DictPtr _dict;
106  };
107 }
108 
109 #ifdef _MSC_VER
110  #pragma warning (pop)
111 #endif
112 
113 #endif
114 
115 
#define DCMTREE_EXPORT
Const_DictPtr dict() const
access the Dict
static Const_ReaderPtr prototype()
the current concrete prototype
static ReaderPtr create(const Const_DictPtr &dictArg)
abstract factory create method
Reader(Const_DictPtr dictArg)
ctor - needs a DCMTree::Dict implementation
virtual ~Reader()
dtor
static ReaderPtr create(const Const_ReaderPtr &prototype, const Const_DictPtr &dictArg)
abstract factory create method for specified prototype; used for implemeting DCMTreeSyngo::Reader
virtual MessagePtr read(const Const_IOParameterPtr &parameter)=0
read a DCMTree::Tree from the file with the given name up to the given tag must be implemented by sub...
virtual ReaderPtr createConcrete(const Const_DictPtr &dictArg) const =0
concrete factory create method of the implementing prototype, called by the abstract one
Reader()
ctor - without parameter for prototype
static void setPrototype(Const_ReaderPtr prototype)
The concrete prototype is set by the implementing DLL.
class to dump a DCMTree dicom message into a human readable file this class could be used as a starte...
boost::shared_ptr< Message > MessagePtr
Definition: DCMTree_Lib.h:75
boost::shared_ptr< const Reader > Const_ReaderPtr
Definition: DCMTree_Lib.h:165
boost::shared_ptr< const Dict > Const_DictPtr
Definition: DCMTree_Dict.h:53
boost::shared_ptr< const IOParameter > Const_IOParameterPtr
boost::shared_ptr< Reader > ReaderPtr
a shared-pointer to DCMTree::Reader
Definition: DCMTree_Lib.h:161