OFFIS DCMTK
Version 3.6.0
Main Page
Related Pages
Classes
Files
File List
File Members
dcmimgle
include
dcmtk
dcmimgle
dipxrept.h
1
/*
2
*
3
* Copyright (C) 1996-2010, OFFIS e.V.
4
* All rights reserved. See COPYRIGHT file for details.
5
*
6
* This software and supporting documentation were developed by
7
*
8
* OFFIS e.V.
9
* R&D Division Health
10
* Escherweg 2
11
* D-26121 Oldenburg, Germany
12
*
13
*
14
* Module: dcmimgle
15
*
16
* Author: Joerg Riesmeier
17
*
18
* Purpose: DicomPixelRepresentationTemplate (Header)
19
*
20
* Last Update: $Author: joergr $
21
* Update Date: $Date: 2010-12-06 10:07:42 $
22
* CVS/RCS Revision: $Revision: 1.17 $
23
* Status: $State: Exp $
24
*
25
* CVS/RCS Log at end of file
26
*
27
*/
28
29
30
#ifndef DIPXREPT_H
31
#define DIPXREPT_H
32
33
#include "dcmtk/config/osconfig.h"
34
35
#include "dcmtk/dcmimgle/diutils.h"
36
37
#ifdef HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION
38
#define EXPLICIT_SPECIALIZATION template<>
39
#else
40
#define EXPLICIT_SPECIALIZATION
41
#endif
42
43
44
/*---------------------*
45
* class declaration *
46
*---------------------*/
47
51
template
<
class
T>
52
class
DiPixelRepresentationTemplate
53
{
54
55
public
:
56
58
DiPixelRepresentationTemplate
() {}
59
61
virtual
~DiPixelRepresentationTemplate
() {}
62
67
inline
int
isSigned
()
const
;
68
69
protected
:
70
75
virtual
inline
EP_Representation
getRepresentation
()
const
;
76
};
77
78
79
/********************************************************************/
80
81
82
EXPLICIT_SPECIALIZATION
83
inline
EP_Representation
DiPixelRepresentationTemplate<Uint8>::getRepresentation
()
const
84
{
85
return
EPR_Uint8;
86
}
87
88
89
EXPLICIT_SPECIALIZATION
90
inline
EP_Representation
DiPixelRepresentationTemplate<Sint8>::getRepresentation
()
const
91
{
92
return
EPR_Sint8;
93
}
94
95
96
EXPLICIT_SPECIALIZATION
97
inline
EP_Representation
DiPixelRepresentationTemplate<Uint16>::getRepresentation
()
const
98
{
99
return
EPR_Uint16;
100
}
101
102
103
EXPLICIT_SPECIALIZATION
104
inline
EP_Representation
DiPixelRepresentationTemplate<Sint16>::getRepresentation
()
const
105
{
106
return
EPR_Sint16;
107
}
108
109
110
EXPLICIT_SPECIALIZATION
111
inline
EP_Representation
DiPixelRepresentationTemplate<Uint32>::getRepresentation
()
const
112
{
113
return
EPR_Uint32;
114
}
115
116
117
EXPLICIT_SPECIALIZATION
118
inline
EP_Representation
DiPixelRepresentationTemplate<Sint32>::getRepresentation
()
const
119
{
120
return
EPR_Sint32;
121
}
122
123
124
EXPLICIT_SPECIALIZATION
125
inline
int
DiPixelRepresentationTemplate<Uint8>::isSigned
()
const
126
{
127
return
0;
128
}
129
130
131
EXPLICIT_SPECIALIZATION
132
inline
int
DiPixelRepresentationTemplate<Uint16>::isSigned
()
const
133
{
134
return
0;
135
}
136
137
138
EXPLICIT_SPECIALIZATION
139
inline
int
DiPixelRepresentationTemplate<Uint32>::isSigned
()
const
140
{
141
return
0;
142
}
143
144
145
EXPLICIT_SPECIALIZATION
146
inline
int
DiPixelRepresentationTemplate<Sint8>::isSigned
()
const
147
{
148
return
1;
149
}
150
151
152
EXPLICIT_SPECIALIZATION
153
inline
int
DiPixelRepresentationTemplate<Sint16>::isSigned
()
const
154
{
155
return
1;
156
}
157
158
159
EXPLICIT_SPECIALIZATION
160
inline
int
DiPixelRepresentationTemplate<Sint32>::isSigned
()
const
161
{
162
return
1;
163
}
164
165
166
#endif
167
168
169
/*
170
*
171
* CVS/RCS Log:
172
* $Log: dipxrept.h,v $
173
* Revision 1.17 2010-12-06 10:07:42 joergr
174
* Added explicit default constructor to keep Intel Compiler 11.1 quiet.
175
*
176
* Revision 1.16 2010-10-14 13:16:27 joergr
177
* Updated copyright header. Added reference to COPYRIGHT file.
178
*
179
* Revision 1.15 2005/12/09 14:48:35 meichel
180
* Added missing virtual destructors
181
*
182
* Revision 1.14 2005/12/08 16:48:06 meichel
183
* Changed include path schema for all DCMTK header files
184
*
185
* Revision 1.13 2003/12/08 19:26:45 joergr
186
* Removed leading underscore characters from preprocessor symbols (reserved
187
* symbols). Updated copyright header.
188
*
189
* Revision 1.12 2001/06/01 15:49:50 meichel
190
* Updated copyright header
191
*
192
* Revision 1.11 2000/03/08 16:24:23 meichel
193
* Updated copyright header.
194
*
195
* Revision 1.10 2000/02/02 11:02:39 joergr
196
* Removed space characters before preprocessor directives.
197
*
198
* Revision 1.9 1999/09/17 12:47:52 joergr
199
* Added/changed/completed DOC++ style comments in the header files.
200
*
201
* Revision 1.8 1999/04/28 17:03:17 joergr
202
* Added test whether the compiler supports the new explicit template
203
* specialization syntax (see below).
204
*
205
* Revision 1.7 1999/04/28 14:54:37 joergr
206
* Added "template<>" to specialized template functions/methods to avoid
207
* compiler warnings reported by gcc version egcs-2.91.66 (conforms with new
208
* C++ standard).
209
*
210
* Revision 1.6 1999/03/24 17:20:23 joergr
211
* Added/Modified comments and formatting.
212
*
213
* Revision 1.5 1999/02/11 16:41:39 joergr
214
* Corrected some typos and formatting.
215
*
216
* Revision 1.4 1998/12/22 14:37:22 joergr
217
* Removed methods getMinimum/Maximum().
218
*
219
* Revision 1.3 1998/12/16 16:38:23 joergr
220
* Added methods to determine absolute minimum and maximum value for given
221
* value representation.
222
*
223
* Revision 1.2 1998/12/14 17:28:53 joergr
224
* Removed old source header.
225
*
226
* Revision 1.1 1998/11/27 15:45:50 joergr
227
* Added copyright message.
228
*
229
* Revision 1.2 1998/05/11 14:53:28 joergr
230
* Added CVS/RCS header to each file.
231
*
232
*
233
*/
Generated on Thu Dec 20 2012 for
OFFIS DCMTK
Version 3.6.0 by
Doxygen
1.8.2