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
33namespace DCMTree
34{
35 class Reader;
36 typedef boost::shared_ptr<Reader> ReaderPtr;
37 typedef boost::shared_ptr<const Reader> Const_ReaderPtr;
38
40 {
41 public:
47
49 virtual ~Reader();
50
55 virtual MessagePtr read (const Const_IOParameterPtr &parameter)=0;
56
61
62 protected:
69 static ReaderPtr create(const Const_ReaderPtr &prototype, const Const_DictPtr &dictArg);
70
73
75 static void setPrototype(Const_ReaderPtr prototype);
76
81 virtual ReaderPtr createConcrete(const Const_DictPtr &dictArg) const = 0;
82
85
88
89 private:
91 static Const_ReaderPtr _prototype;
92
93 Const_DictPtr _dict;
94 };
95}
96
97#ifdef _MSC_VER
98 #pragma warning (pop)
99#endif
100
101#endif
102
103
#define DCMTREE_EXPORT
Const_DictPtr dict() const
Accesses 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)
Constructor that needs a DCMTree::Dict implementation.
virtual ~Reader()
Destructor.
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
Reads a DCMTree::Tree from the file with the given name up to the given tag.
virtual ReaderPtr createConcrete(const Const_DictPtr &dictArg) const =0
Concrete factory creates method of the implementing prototype, called by the abstract one.
Reader()
Constructor without parameter for prototype.
static void setPrototype(Const_ReaderPtr prototype)
The concrete prototype is set by the implementing DLL.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Class to dump a DCMTree DICOM message into a human-readable file.
boost::shared_ptr< Message > MessagePtr
Definition DCMTree_Lib.h:70
boost::shared_ptr< const Reader > Const_ReaderPtr
boost::shared_ptr< const Dict > Const_DictPtr
boost::shared_ptr< const IOParameter > Const_IOParameterPtr
boost::shared_ptr< Reader > ReaderPtr
A shared pointer to DCMTree::Reader.