Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

dcpixseq.h

00001 /*
00002  *
00003  *  Copyright (C) 1994-2001, OFFIS
00004  *
00005  *  This software and supporting documentation were developed by
00006  *
00007  *    Kuratorium OFFIS e.V.
00008  *    Healthcare Information and Communication Systems
00009  *    Escherweg 2
00010  *    D-26121 Oldenburg, Germany
00011  *
00012  *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
00013  *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
00014  *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
00015  *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
00016  *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
00017  *
00018  *  Module:  dcmdata
00019  *
00020  *  Author:  Gerd Ehlers, Andreas Barth
00021  *
00022  *  Purpose: Interface of class DcmPixelSequence
00023  *
00024  *  Last Update:      $Author: joergr $
00025  *  Update Date:      $Date: 2002/12/06 12:49:12 $
00026  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmdata/include/dcpixseq.h,v $
00027  *  CVS/RCS Revision: $Revision: 1.25 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 #ifndef DCPIXSEQ_H
00035 #define DCPIXSEQ_H
00036 
00037 #include "osconfig.h"    /* make sure OS specific configuration is included first */
00038 #include "ofconsol.h"
00039 #include "dctypes.h"
00040 #include "dcsequen.h"
00041 #include "dcerror.h"
00042 #include "dcofsetl.h"    /* for class DcmOffsetList */
00043 
00044 class DcmPixelItem;
00045 
00046 class DcmPixelSequence : public DcmSequenceOfItems
00047 {
00048 private:
00049     E_TransferSyntax Xfer;
00050 
00051 
00052 // These methods are not sensible for a pix-sequence
00053 
00054     virtual OFCondition insert(DcmItem* /*item*/,
00055                                unsigned long /*where*/ = DCM_EndOfListIndex,
00056                                OFBool /*before*/ = OFFalse)
00057     {
00058         return EC_IllegalCall;
00059     }
00060     virtual DcmItem* getItem(const unsigned long /*num*/)
00061     {
00062         return NULL;
00063     }
00064     virtual DcmItem* remove(const unsigned long /*num*/)
00065     {
00066         return NULL;
00067     }
00068     virtual DcmItem* remove(DcmItem* /*item*/)
00069     {
00070         return NULL;
00071     }
00072 
00073 protected:
00074     virtual OFCondition makeSubObject(DcmObject * & newObject, // out
00075                                       const DcmTag & newTag,
00076                                       const Uint32 newLength);  // in
00077 
00078 public:
00079     DcmPixelSequence(const DcmTag &tag, const Uint32 len = 0);
00080     DcmPixelSequence(const DcmPixelSequence &old);
00081     virtual ~DcmPixelSequence();
00082 
00083     DcmPixelSequence &operator=(const DcmPixelSequence &obj);
00084 
00085     virtual DcmEVR ident(void) const { return EVR_pixelSQ; }
00086 
00087     virtual void print(ostream &out,
00088                        const size_t flags = 0,
00089                        const int level = 0,
00090                        const char *pixelFileName = NULL,
00091                        size_t *pixelCounter = NULL);
00092 
00093     virtual Uint32 calcElementLength(const E_TransferSyntax xfer,
00094                                      const E_EncodingType enctype);
00095 
00096     virtual OFCondition insert(DcmPixelItem* item,
00097                                unsigned long where = DCM_EndOfListIndex);
00098 
00099     virtual OFCondition getItem(DcmPixelItem * & item, const unsigned long num);
00100     virtual OFCondition remove(DcmPixelItem * & item, const unsigned long num);
00101     virtual OFCondition remove(DcmPixelItem* item);
00102 
00103 
00104     OFCondition changeXfer(const E_TransferSyntax newXfer);
00105 
00106     virtual OFBool canWriteXfer(const E_TransferSyntax newXfer,
00107                               const E_TransferSyntax oldXfer);
00108 
00109     virtual OFCondition read(DcmInputStream & inStream,
00110                              const E_TransferSyntax ixfer,
00111                              const E_GrpLenEncoding glenc = EGL_noChange,
00112                              const Uint32 maxReadLength
00113                              = DCM_MaxReadLength);
00114 
00115     virtual OFCondition write(DcmOutputStream & outStream,
00116                               const E_TransferSyntax oxfer,
00117                               const E_EncodingType /*enctype*/);
00118 
00121     virtual OFCondition writeSignatureFormat(DcmOutputStream & outStream,
00122                      const E_TransferSyntax oxfer,
00123                      const E_EncodingType enctype
00124                      = EET_UndefinedLength);
00125 
00134   virtual OFCondition storeCompressedFrame(
00135         DcmOffsetList& offsetList,
00136         Uint8 *compressedData,
00137         Uint32 compressedLen,
00138         Uint32 fragmentSize);
00139 
00140 };
00141 
00142 #endif // DCPIXSEQ_H
00143 
00144 /*
00145 ** CVS/RCS Log:
00146 ** $Log: dcpixseq.h,v $
00147 ** Revision 1.25  2002/12/06 12:49:12  joergr
00148 ** Enhanced "print()" function by re-working the implementation and replacing
00149 ** the boolean "showFullData" parameter by a more general integer flag.
00150 ** Added doc++ documentation.
00151 ** Made source code formatting more consistent with other modules/files.
00152 **
00153 ** Revision 1.24  2002/08/27 16:55:38  meichel
00154 ** Initial release of new DICOM I/O stream classes that add support for stream
00155 **   compression (deflated little endian explicit VR transfer syntax)
00156 **
00157 ** Revision 1.23  2002/05/24 14:51:42  meichel
00158 ** Moved helper methods that are useful for different compression techniques
00159 **   from module dcmjpeg to module dcmdata
00160 **
00161 ** Revision 1.22  2001/09/25 17:19:28  meichel
00162 ** Adapted dcmdata to class OFCondition
00163 **
00164 ** Revision 1.21  2001/06/01 15:48:42  meichel
00165 ** Updated copyright header
00166 **
00167 ** Revision 1.20  2000/11/07 16:56:08  meichel
00168 ** Initial release of dcmsign module for DICOM Digital Signatures
00169 **
00170 ** Revision 1.19  2000/04/14 16:02:23  meichel
00171 ** Removed default value from output stream passed to print() method.
00172 **   Required for use in multi-thread environments.
00173 **
00174 ** Revision 1.18  2000/03/08 16:26:17  meichel
00175 ** Updated copyright header.
00176 **
00177 ** Revision 1.17  2000/03/06 18:11:30  joergr
00178 ** Local variable hided member variable (reported by Sun CC 4.2).
00179 **
00180 ** Revision 1.16  2000/03/03 14:41:56  joergr
00181 ** Corrected bug related to padding of file and item size.
00182 **
00183 ** Revision 1.15  2000/03/03 14:05:25  meichel
00184 ** Implemented library support for redirecting error messages into memory
00185 **   instead of printing them to stdout/stderr for GUI applications.
00186 **
00187 ** Revision 1.14  2000/02/10 10:50:53  joergr
00188 ** Added new feature to dcmdump (enhanced print method of dcmdata): write
00189 ** pixel data/item value fields to raw files.
00190 **
00191 ** Revision 1.13  1999/03/31 09:24:44  meichel
00192 ** Updated copyright header in module dcmdata
00193 **
00194 ** Revision 1.12  1998/11/12 16:47:42  meichel
00195 ** Implemented operator= for all classes derived from DcmObject.
00196 **
00197 ** Revision 1.11  1998/07/15 15:48:51  joergr
00198 ** Removed several compiler warnings reported by gcc 2.8.1 with
00199 ** additional options, e.g. missing copy constructors and assignment
00200 ** operators, initialization of member variables in the body of a
00201 ** constructor instead of the member initialization list, hiding of
00202 ** methods by use of identical names, uninitialized member variables,
00203 ** missing const declaration of char pointers. Replaced tabs by spaces.
00204 **
00205 ** Revision 1.10  1997/07/21 08:25:10  andreas
00206 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL)
00207 **   with one unique boolean type OFBool.
00208 **
00209 ** Revision 1.9  1997/05/27 13:48:29  andreas
00210 ** - Add method canWriteXfer to class DcmObject and all derived classes.
00211 **   This method checks whether it is possible to convert the original
00212 **   transfer syntax to an new transfer syntax. The check is used in the
00213 **   dcmconv utility to prohibit the change of a compressed transfer
00214 **   syntax to a uncompressed.
00215 **
00216 ** Revision 1.8  1997/05/22 16:57:10  andreas
00217 ** - Corrected errors for writing of pixel sequences for encapsulated
00218 **   transfer syntaxes.
00219 **
00220 ** Revision 1.7  1997/05/06 09:22:37  hewett
00221 ** Added a "before" flag to the insertion of items for compatibility with
00222 ** insertion in normal Sequences.
00223 **
00224 ** Revision 1.6  1996/08/05 08:45:27  andreas
00225 ** new print routine with additional parameters:
00226 **         - print into files
00227 **         - fix output length for elements
00228 ** corrected error in search routine with parameter ESM_fromStackTop
00229 **
00230 ** Revision 1.5  1996/01/29 13:38:13  andreas
00231 ** - new put method for every VR to put value as a string
00232 ** - better and unique print methods
00233 **
00234 ** Revision 1.4  1996/01/24 09:34:55  andreas
00235 ** Support for 64 bit long
00236 **
00237 ** Revision 1.3  1996/01/05 13:22:58  andreas
00238 ** - changed to support new streaming facilities
00239 ** - more cleanups
00240 ** - merged read / write methods for block and file transfer
00241 **
00242 */


Generated on 8 Dec 2004 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.3.9.1