OFFIS DCMTK  Version 3.6.0
dcistrma.h
1 /*
2  *
3  * Copyright (C) 1994-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: base classes for input streams
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:15:41 $
22  * CVS/RCS Revision: $Revision: 1.5 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 #ifndef DCISTRMA_H
30 #define DCISTRMA_H
31 
32 #include "dcmtk/config/osconfig.h"
33 #include "dcmtk/ofstd/oftypes.h" /* for OFBool */
34 #include "dcmtk/ofstd/ofcond.h" /* for OFCondition */
35 #include "dcmtk/ofstd/offile.h" /* for offile_off_t */
36 #include "dcmtk/dcmdata/dcxfer.h" /* for E_StreamCompression */
37 
38 class DcmInputStream;
39 
44 {
45 public:
46 
48  virtual ~DcmProducer()
49  {
50  }
51 
56  virtual OFBool good() const = 0;
57 
62  virtual OFCondition status() const = 0;
63 
67  virtual OFBool eos() = 0;
68 
76  virtual offile_off_t avail() = 0;
77 
83  virtual offile_off_t read(void *buf, offile_off_t buflen) = 0;
84 
89  virtual offile_off_t skip(offile_off_t skiplen) = 0;
90 
95  virtual void putback(offile_off_t num) = 0;
96 
97 };
98 
99 
104 {
105 public:
106 
108  virtual ~DcmInputFilter()
109  {
110  }
111 
118  virtual void append(DcmProducer& producer) = 0;
119 };
120 
121 
126 {
127 public:
128 
131  {
132  }
133 
137  virtual DcmInputStream *create() const = 0;
138 
141  virtual DcmInputStreamFactory *clone() const = 0;
142 };
143 
144 
148 {
149 public:
150 
152  virtual ~DcmInputStream();
153 
158  virtual OFBool good() const;
159 
164  virtual OFCondition status() const;
165 
169  virtual OFBool eos();
170 
178  virtual offile_off_t avail();
179 
185  virtual offile_off_t read(void *buf, offile_off_t buflen);
186 
191  virtual offile_off_t skip(offile_off_t skiplen);
192 
196  virtual offile_off_t tell() const;
197 
205  virtual OFCondition installCompressionFilter(E_StreamCompression filterType);
206 
216  virtual DcmInputStreamFactory *newFactory() const = 0;
217 
225  virtual void mark();
226 
231  virtual void putback();
232 
233 protected:
234 
241  DcmInputStream(DcmProducer *initial);
242 
245  const DcmProducer *currentProducer() const;
246 
247 private:
248 
251 
254 
257 
260 
262  offile_off_t tell_;
263 
265  offile_off_t mark_;
266 };
267 
268 
269 
270 #endif
271 
272 /*
273  * CVS/RCS Log:
274  * $Log: dcistrma.h,v $
275  * Revision 1.5 2010-10-14 13:15:41 joergr
276  * Updated copyright header. Added reference to COPYRIGHT file.
277  *
278  * Revision 1.4 2009-11-04 09:58:07 uli
279  * Switched to logging mechanism provided by the "new" oflog module
280  *
281  * Revision 1.3 2007-02-19 15:45:41 meichel
282  * Class DcmInputStream and related classes are now safe for use with
283  * large files (2 GBytes or more) if supported by compiler and operating system.
284  *
285  * Revision 1.2 2005/12/08 16:28:15 meichel
286  * Changed include path schema for all DCMTK header files
287  *
288  * Revision 1.1 2002/08/27 16:55:32 meichel
289  * Initial release of new DICOM I/O stream classes that add support for stream
290  * compression (deflated little endian explicit VR transfer syntax)
291  *
292  *
293  */
294 


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2