OFFIS DCMTK
Version 3.6.0
Main Page
Related Pages
Classes
Files
File List
File Members
dcmdata
include
dcmtk
dcmdata
dcwcache.h
1
/*
2
*
3
* Copyright (C) 2007-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: dcmdata
15
*
16
* Author: Marco Eichelberg
17
*
18
* Purpose: file cache facility for DcmElement::getPartialValue
19
*
20
* Last Update: $Author: joergr $
21
* Update Date: $Date: 2010-10-14 13:15:43 $
22
* CVS/RCS Revision: $Revision: 1.4 $
23
* Status: $State: Exp $
24
*
25
* CVS/RCS Log at end of file
26
*
27
*/
28
29
30
#ifndef DCWCACHE_H
31
#define DCWCACHE_H
32
33
#include "dcmtk/config/osconfig.h"
/* make sure OS specific configuration is included first */
34
35
#include "dcmtk/ofstd/oftypes.h"
/* for Uint8 */
36
#include "dcmtk/dcmdata/dcfcache.h"
/* for class DcmFileCache */
37
38
class
DcmElement
;
39
class
DcmOutputStream
;
40
41
#define DcmWriteCacheBufsize 65536
/* buffer size, in bytes */
42
50
class
DcmWriteCache
51
{
52
public
:
53
55
DcmWriteCache
()
56
:
fcache_
()
57
,
buf_
(NULL)
58
,
owner_
(NULL)
59
,
offset_
(0)
60
,
numBytes_
(0)
61
,
capacity_
(0)
62
,
fieldLength_
(0)
63
,
fieldOffset_
(0)
64
,
byteOrder_
(EBO_unknown)
65
{
66
}
67
69
~DcmWriteCache
()
70
{
71
delete
[]
buf_
;
72
}
73
80
void
init
(
void
*owner, Uint32 fieldLength, Uint32 bytesTransferred, E_ByteOrder byteOrder);
81
85
OFBool
bufferIsEmpty
()
const
{
return
(
numBytes_
== 0); }
86
90
Uint32
contentLength
()
const
{
return
numBytes_
; }
91
99
OFCondition
fillBuffer
(
DcmElement
& elem);
100
105
Uint32
writeBuffer
(
DcmOutputStream
&outStream);
106
107
private
:
108
110
DcmWriteCache
(
const
DcmWriteCache
& arg);
111
113
DcmWriteCache
&
operator=
(
const
DcmWriteCache
& arg);
114
116
DcmFileCache
fcache_
;
117
119
Uint8 *
buf_
;
120
122
void
*
owner_
;
123
125
Uint32
offset_
;
126
128
Uint32
numBytes_
;
129
131
Uint32
capacity_
;
132
134
Uint32
fieldLength_
;
135
137
Uint32
fieldOffset_
;
138
140
E_ByteOrder
byteOrder_
;
141
};
142
143
#endif
144
145
/*
146
* CVS/RCS Log:
147
* $Log: dcwcache.h,v $
148
* Revision 1.4 2010-10-14 13:15:43 joergr
149
* Updated copyright header. Added reference to COPYRIGHT file.
150
*
151
* Revision 1.3 2009-02-25 12:58:55 joergr
152
* Removed wrong comment (apparently copied from other class).
153
*
154
* Revision 1.2 2009-02-04 17:54:31 joergr
155
* Fixed various layout and formatting issues.
156
*
157
* Revision 1.1 2007-11-29 14:30:18 meichel
158
* Write methods now handle large raw data elements (such as pixel data)
159
* without loading everything into memory. This allows very large images to
160
* be sent over a network connection, or to be copied without ever being
161
* fully in memory.
162
*
163
*
164
*/
Generated on Thu Dec 20 2012 for
OFFIS DCMTK
Version 3.6.0 by
Doxygen
1.8.2