/
storage.hpp
241 lines (214 loc) · 8.08 KB
/
storage.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
// mvh 20030922 Added PDU_Service to CheckObject call
// mvh 20050108 Fixed for linux compile
// mvh 20070314 Allow send of 0000,1030 (MoveOriginatorAE) and 0000,1031 (MoveOriginatorMessageID) in StandardStorage : write
/****************************************************************************
Copyright (C) 1995, University of California, Davis
THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND THE UNIVERSITY
OF CALIFORNIA DOES NOT MAKE ANY WARRANTY ABOUT THE SOFTWARE, ITS
PERFORMANCE, ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
USE, FREEDOM FROM ANY COMPUTER DISEASES OR ITS CONFORMITY TO ANY
SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF
THE SOFTWARE IS WITH THE USER.
Copyright of the software and supporting documentation is
owned by the University of California, and free access
is hereby granted as a license to use this software, copy this
software and prepare derivative works based upon this software.
However, any distribution of this software source code or
supporting documentation or derivative works (source code and
supporting documentation) must include this copyright notice.
****************************************************************************/
/***************************************************************************
*
* University of California, Davis
* UCDMC DICOM Network Transport Libraries
* Version 0.1 Beta
*
* Technical Contact: mhoskin@ucdavis.edu
*
***************************************************************************/
// Storage classes
// Note there are many "ungood" things about the class hierachys in
// this file. Notable things should be protected rather than public,
// there should be no inline "wrapper"'s.. Both of these are done
// to be compatible with gcc.
// Base Storage class
class StandardStorage :
public CStoreRQ,
public CStoreRSP
{
public:
BOOL GetUID ( UID &uid) { return (uGetUID(uid)); };
virtual BOOL uGetUID ( UID &uid ) = 0;
virtual UINT16 CheckObject(DICOMDataObject *, PDU_Service *) { return ( 0 ); };
BOOL Read ( PDU_Service *,
DICOMCommandObject *,
DICOMDataObject * );
BOOL Write ( PDU_Service *, DICOMDataObject *, VR *MoveMessageID = NULL, unsigned char *CallingAE = NULL );
};
class UnknownStorage :
public CStoreRQ,
public CStoreRSP
{
public:
BOOL GetUID(UID &);
virtual UINT16 CheckObject(DICOMDataObject *, PDU_Service *) { return ( 0 ); };
BOOL Read ( PDU_Service *,
DICOMCommandObject *,
DICOMDataObject * );
};
class CRStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};
class CTStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};
class USMultiframeStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};
class MRStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};
class NMStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};
class USStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};
class SCStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};
class StandaloneOverlayStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};
class StandaloneCurveStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};
class StandaloneModalityLUTStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};
class StandaloneVOILUTStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};
class GEMRStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};
class GECTStorage :
public StandardStorage
{
public:
BOOL GetUID(UID &);
BOOL uGetUID(UID &uid) { return ( GetUID(uid) ); };
inline BOOL Read ( PDU_Service *PDU, DICOMCommandObject *DCO,
DICOMDataObject *DDO )
{ return ( StandardStorage :: Read ( PDU, DCO, DDO ) ); };
inline BOOL Write ( PDU_Service *PDU, DICOMDataObject *DDO)
{ return ( StandardStorage :: Write ( PDU, DDO ) ); };
};