OFFIS DCMTK  Version 3.6.0
dcpixseq.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: Gerd Ehlers, Andreas Barth
17  *
18  * Purpose: Interface of class DcmPixelSequence
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:15:41 $
22  * CVS/RCS Revision: $Revision: 1.37 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 
30 #ifndef DCPIXSEQ_H
31 #define DCPIXSEQ_H
32 
33 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
34 #include "dcmtk/dcmdata/dcsequen.h"
35 #include "dcmtk/dcmdata/dcofsetl.h" /* for class DcmOffsetList */
36 
37 class DcmPixelItem;
38 
46 {
47 public:
48 
53  DcmPixelSequence(const DcmTag &tag, const Uint32 len = 0);
54 
59 
61  virtual ~DcmPixelSequence();
62 
67 
71  virtual DcmObject *clone() const
72  {
73  return new DcmPixelSequence(*this);
74  }
75 
88  virtual OFCondition copyFrom(const DcmObject& rhs);
89 
93  virtual DcmEVR ident(void) const { return EVR_pixelSQ; }
94 
102  virtual void print(STD_NAMESPACE ostream &out,
103  const size_t flags = 0,
104  const int level = 0,
105  const char *pixelFileName = NULL,
106  size_t *pixelCounter = NULL);
107 
118  virtual Uint32 calcElementLength(const E_TransferSyntax xfer,
119  const E_EncodingType enctype);
120 
127  virtual OFCondition insert(DcmPixelItem *item,
128  unsigned long where = DCM_EndOfListIndex);
129 
136  virtual OFCondition getItem(DcmPixelItem * &item,
137  const unsigned long num);
138 
146  virtual OFCondition remove(DcmPixelItem * &item,
147  const unsigned long num);
148 
154  virtual OFCondition remove(DcmPixelItem* item);
155 
162  OFCondition changeXfer(const E_TransferSyntax newXfer);
163 
169  virtual OFBool canWriteXfer(const E_TransferSyntax newXfer,
170  const E_TransferSyntax oldXfer);
171 
185  virtual OFCondition read(DcmInputStream & inStream,
186  const E_TransferSyntax ixfer,
187  const E_GrpLenEncoding glenc = EGL_noChange,
188  const Uint32 maxReadLength = DCM_MaxReadLength);
189 
197  virtual OFCondition write(DcmOutputStream &outStream,
198  const E_TransferSyntax oxfer,
199  const E_EncodingType enctype,
200  DcmWriteCache *wcache);
201 
210  const E_TransferSyntax oxfer,
211  const E_EncodingType enctype,
212  DcmWriteCache *wcache);
213 
223  virtual OFCondition storeCompressedFrame(DcmOffsetList &offsetList,
224  Uint8 *compressedData,
225  Uint32 compressedLen,
226  Uint32 fragmentSize);
227 
228 protected:
229 
237  virtual OFCondition makeSubObject(DcmObject * &newObject, // out
238  const DcmTag &newTag,
239  const Uint32 newLength); // in
240 
241 private:
246  E_TransferSyntax Xfer;
247 
249  virtual OFCondition insert(DcmItem* /*item*/,
250  unsigned long /*where*/ = DCM_EndOfListIndex,
251  OFBool /*before*/ = OFFalse)
252  {
253  return EC_IllegalCall;
254  }
255 
257  virtual DcmItem* getItem(const unsigned long /*num*/)
258  {
259  return NULL;
260  }
261 
263  virtual DcmItem* remove(const unsigned long /*num*/)
264  {
265  return NULL;
266  }
267 
269  virtual DcmItem* remove(DcmItem* /*item*/)
270  {
271  return NULL;
272  }
273 
274 };
275 
276 #endif // DCPIXSEQ_H
277 
278 
279 /*
280 ** CVS/RCS Log:
281 ** $Log: dcpixseq.h,v $
282 ** Revision 1.37 2010-10-14 13:15:41 joergr
283 ** Updated copyright header. Added reference to COPYRIGHT file.
284 **
285 ** Revision 1.36 2010-03-01 09:08:44 uli
286 ** Removed some unnecessary include directives in the headers.
287 **
288 ** Revision 1.35 2010-02-22 11:39:54 uli
289 ** Remove some unneeded includes.
290 **
291 ** Revision 1.34 2009-02-04 17:54:30 joergr
292 ** Fixed various layout and formatting issues.
293 **
294 ** Revision 1.33 2009-02-04 10:18:19 joergr
295 ** Fixed issue with compressed frames of odd length (possibly wrong values in
296 ** basic offset table).
297 **
298 ** Revision 1.32 2008-07-17 11:19:49 onken
299 ** Updated copyFrom() documentation.
300 **
301 ** Revision 1.31 2008-07-17 10:30:23 onken
302 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which
303 ** permits setting an instance's value from an existing object. Implemented
304 ** assignment operator where necessary.
305 **
306 ** Revision 1.30 2008-06-23 12:09:13 joergr
307 ** Fixed inconsistencies in Doxygen API documentation.
308 **
309 ** Revision 1.29 2007/11/29 14:30:19 meichel
310 ** Write methods now handle large raw data elements (such as pixel data)
311 ** without loading everything into memory. This allows very large images to
312 ** be sent over a network connection, or to be copied without ever being
313 ** fully in memory.
314 **
315 ** Revision 1.28 2006/08/15 15:49:56 meichel
316 ** Updated all code in module dcmdata to correctly compile when
317 ** all standard C++ classes remain in namespace std.
318 **
319 ** Revision 1.27 2005/12/08 16:28:31 meichel
320 ** Changed include path schema for all DCMTK header files
321 **
322 ** Revision 1.26 2004/07/01 12:28:25 meichel
323 ** Introduced virtual clone method for DcmObject and derived classes.
324 **
325 ** Revision 1.25 2002/12/06 12:49:12 joergr
326 ** Enhanced "print()" function by re-working the implementation and replacing
327 ** the boolean "showFullData" parameter by a more general integer flag.
328 ** Added doc++ documentation.
329 ** Made source code formatting more consistent with other modules/files.
330 **
331 ** Revision 1.24 2002/08/27 16:55:38 meichel
332 ** Initial release of new DICOM I/O stream classes that add support for stream
333 ** compression (deflated little endian explicit VR transfer syntax)
334 **
335 ** Revision 1.23 2002/05/24 14:51:42 meichel
336 ** Moved helper methods that are useful for different compression techniques
337 ** from module dcmjpeg to module dcmdata
338 **
339 ** Revision 1.22 2001/09/25 17:19:28 meichel
340 ** Adapted dcmdata to class OFCondition
341 **
342 ** Revision 1.21 2001/06/01 15:48:42 meichel
343 ** Updated copyright header
344 **
345 ** Revision 1.20 2000/11/07 16:56:08 meichel
346 ** Initial release of dcmsign module for DICOM Digital Signatures
347 **
348 ** Revision 1.19 2000/04/14 16:02:23 meichel
349 ** Removed default value from output stream passed to print() method.
350 ** Required for use in multi-thread environments.
351 **
352 ** Revision 1.18 2000/03/08 16:26:17 meichel
353 ** Updated copyright header.
354 **
355 ** Revision 1.17 2000/03/06 18:11:30 joergr
356 ** Local variable hided member variable (reported by Sun CC 4.2).
357 **
358 ** Revision 1.16 2000/03/03 14:41:56 joergr
359 ** Corrected bug related to padding of file and item size.
360 **
361 ** Revision 1.15 2000/03/03 14:05:25 meichel
362 ** Implemented library support for redirecting error messages into memory
363 ** instead of printing them to stdout/stderr for GUI applications.
364 **
365 ** Revision 1.14 2000/02/10 10:50:53 joergr
366 ** Added new feature to dcmdump (enhanced print method of dcmdata): write
367 ** pixel data/item value fields to raw files.
368 **
369 ** Revision 1.13 1999/03/31 09:24:44 meichel
370 ** Updated copyright header in module dcmdata
371 **
372 ** Revision 1.12 1998/11/12 16:47:42 meichel
373 ** Implemented operator= for all classes derived from DcmObject.
374 **
375 ** Revision 1.11 1998/07/15 15:48:51 joergr
376 ** Removed several compiler warnings reported by gcc 2.8.1 with
377 ** additional options, e.g. missing copy constructors and assignment
378 ** operators, initialization of member variables in the body of a
379 ** constructor instead of the member initialization list, hiding of
380 ** methods by use of identical names, uninitialized member variables,
381 ** missing const declaration of char pointers. Replaced tabs by spaces.
382 **
383 ** Revision 1.10 1997/07/21 08:25:10 andreas
384 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL)
385 ** with one unique boolean type OFBool.
386 **
387 ** Revision 1.9 1997/05/27 13:48:29 andreas
388 ** - Add method canWriteXfer to class DcmObject and all derived classes.
389 ** This method checks whether it is possible to convert the original
390 ** transfer syntax to an new transfer syntax. The check is used in the
391 ** dcmconv utility to prohibit the change of a compressed transfer
392 ** syntax to a uncompressed.
393 **
394 ** Revision 1.8 1997/05/22 16:57:10 andreas
395 ** - Corrected errors for writing of pixel sequences for encapsulated
396 ** transfer syntaxes.
397 **
398 ** Revision 1.7 1997/05/06 09:22:37 hewett
399 ** Added a "before" flag to the insertion of items for compatibility with
400 ** insertion in normal Sequences.
401 **
402 ** Revision 1.6 1996/08/05 08:45:27 andreas
403 ** new print routine with additional parameters:
404 ** - print into files
405 ** - fix output length for elements
406 ** corrected error in search routine with parameter ESM_fromStackTop
407 **
408 ** Revision 1.5 1996/01/29 13:38:13 andreas
409 ** - new put method for every VR to put value as a string
410 ** - better and unique print methods
411 **
412 ** Revision 1.4 1996/01/24 09:34:55 andreas
413 ** Support for 64 bit long
414 **
415 ** Revision 1.3 1996/01/05 13:22:58 andreas
416 ** - changed to support new streaming facilities
417 ** - more cleanups
418 ** - merged read / write methods for block and file transfer
419 **
420 */


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