dcpixseq.h

00001 /*
00002  *
00003  *  Copyright (C) 1994-2005, 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: meichel $
00025  *  Update Date:      $Date: 2005/12/08 16:28:31 $
00026  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmdata/include/dcmtk/dcmdata/dcpixseq.h,v $
00027  *  CVS/RCS Revision: $Revision: 1.27 $
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 "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00038 #include "dcmtk/ofstd/ofconsol.h"
00039 #include "dcmtk/dcmdata/dctypes.h"
00040 #include "dcmtk/dcmdata/dcsequen.h"
00041 #include "dcmtk/dcmdata/dcerror.h"
00042 #include "dcmtk/dcmdata/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 
00088     virtual DcmObject *clone() const
00089     {
00090       return new DcmPixelSequence(*this);
00091     }
00092 
00093     virtual DcmEVR ident(void) const { return EVR_pixelSQ; }
00094 
00095     virtual void print(ostream &out,
00096                        const size_t flags = 0,
00097                        const int level = 0,
00098                        const char *pixelFileName = NULL,
00099                        size_t *pixelCounter = NULL);
00100 
00101     virtual Uint32 calcElementLength(const E_TransferSyntax xfer,
00102                                      const E_EncodingType enctype);
00103 
00104     virtual OFCondition insert(DcmPixelItem* item,
00105                                unsigned long where = DCM_EndOfListIndex);
00106 
00107     virtual OFCondition getItem(DcmPixelItem * & item, const unsigned long num);
00108     virtual OFCondition remove(DcmPixelItem * & item, const unsigned long num);
00109     virtual OFCondition remove(DcmPixelItem* item);
00110 
00111 
00112     OFCondition changeXfer(const E_TransferSyntax newXfer);
00113 
00114     virtual OFBool canWriteXfer(const E_TransferSyntax newXfer,
00115                               const E_TransferSyntax oldXfer);
00116 
00117     virtual OFCondition read(DcmInputStream & inStream,
00118                              const E_TransferSyntax ixfer,
00119                              const E_GrpLenEncoding glenc = EGL_noChange,
00120                              const Uint32 maxReadLength
00121                              = DCM_MaxReadLength);
00122 
00123     virtual OFCondition write(DcmOutputStream & outStream,
00124                               const E_TransferSyntax oxfer,
00125                               const E_EncodingType /*enctype*/);
00126 
00129     virtual OFCondition writeSignatureFormat(DcmOutputStream & outStream,
00130                      const E_TransferSyntax oxfer,
00131                      const E_EncodingType enctype
00132                      = EET_UndefinedLength);
00133 
00142   virtual OFCondition storeCompressedFrame(
00143         DcmOffsetList& offsetList,
00144         Uint8 *compressedData,
00145         Uint32 compressedLen,
00146         Uint32 fragmentSize);
00147 
00148 };
00149 
00150 #endif // DCPIXSEQ_H
00151 
00152 /*
00153 ** CVS/RCS Log:
00154 ** $Log: dcpixseq.h,v $
00155 ** Revision 1.27  2005/12/08 16:28:31  meichel
00156 ** Changed include path schema for all DCMTK header files
00157 **
00158 ** Revision 1.26  2004/07/01 12:28:25  meichel
00159 ** Introduced virtual clone method for DcmObject and derived classes.
00160 **
00161 ** Revision 1.25  2002/12/06 12:49:12  joergr
00162 ** Enhanced "print()" function by re-working the implementation and replacing
00163 ** the boolean "showFullData" parameter by a more general integer flag.
00164 ** Added doc++ documentation.
00165 ** Made source code formatting more consistent with other modules/files.
00166 **
00167 ** Revision 1.24  2002/08/27 16:55:38  meichel
00168 ** Initial release of new DICOM I/O stream classes that add support for stream
00169 **   compression (deflated little endian explicit VR transfer syntax)
00170 **
00171 ** Revision 1.23  2002/05/24 14:51:42  meichel
00172 ** Moved helper methods that are useful for different compression techniques
00173 **   from module dcmjpeg to module dcmdata
00174 **
00175 ** Revision 1.22  2001/09/25 17:19:28  meichel
00176 ** Adapted dcmdata to class OFCondition
00177 **
00178 ** Revision 1.21  2001/06/01 15:48:42  meichel
00179 ** Updated copyright header
00180 **
00181 ** Revision 1.20  2000/11/07 16:56:08  meichel
00182 ** Initial release of dcmsign module for DICOM Digital Signatures
00183 **
00184 ** Revision 1.19  2000/04/14 16:02:23  meichel
00185 ** Removed default value from output stream passed to print() method.
00186 **   Required for use in multi-thread environments.
00187 **
00188 ** Revision 1.18  2000/03/08 16:26:17  meichel
00189 ** Updated copyright header.
00190 **
00191 ** Revision 1.17  2000/03/06 18:11:30  joergr
00192 ** Local variable hided member variable (reported by Sun CC 4.2).
00193 **
00194 ** Revision 1.16  2000/03/03 14:41:56  joergr
00195 ** Corrected bug related to padding of file and item size.
00196 **
00197 ** Revision 1.15  2000/03/03 14:05:25  meichel
00198 ** Implemented library support for redirecting error messages into memory
00199 **   instead of printing them to stdout/stderr for GUI applications.
00200 **
00201 ** Revision 1.14  2000/02/10 10:50:53  joergr
00202 ** Added new feature to dcmdump (enhanced print method of dcmdata): write
00203 ** pixel data/item value fields to raw files.
00204 **
00205 ** Revision 1.13  1999/03/31 09:24:44  meichel
00206 ** Updated copyright header in module dcmdata
00207 **
00208 ** Revision 1.12  1998/11/12 16:47:42  meichel
00209 ** Implemented operator= for all classes derived from DcmObject.
00210 **
00211 ** Revision 1.11  1998/07/15 15:48:51  joergr
00212 ** Removed several compiler warnings reported by gcc 2.8.1 with
00213 ** additional options, e.g. missing copy constructors and assignment
00214 ** operators, initialization of member variables in the body of a
00215 ** constructor instead of the member initialization list, hiding of
00216 ** methods by use of identical names, uninitialized member variables,
00217 ** missing const declaration of char pointers. Replaced tabs by spaces.
00218 **
00219 ** Revision 1.10  1997/07/21 08:25:10  andreas
00220 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL)
00221 **   with one unique boolean type OFBool.
00222 **
00223 ** Revision 1.9  1997/05/27 13:48:29  andreas
00224 ** - Add method canWriteXfer to class DcmObject and all derived classes.
00225 **   This method checks whether it is possible to convert the original
00226 **   transfer syntax to an new transfer syntax. The check is used in the
00227 **   dcmconv utility to prohibit the change of a compressed transfer
00228 **   syntax to a uncompressed.
00229 **
00230 ** Revision 1.8  1997/05/22 16:57:10  andreas
00231 ** - Corrected errors for writing of pixel sequences for encapsulated
00232 **   transfer syntaxes.
00233 **
00234 ** Revision 1.7  1997/05/06 09:22:37  hewett
00235 ** Added a "before" flag to the insertion of items for compatibility with
00236 ** insertion in normal Sequences.
00237 **
00238 ** Revision 1.6  1996/08/05 08:45:27  andreas
00239 ** new print routine with additional parameters:
00240 **         - print into files
00241 **         - fix output length for elements
00242 ** corrected error in search routine with parameter ESM_fromStackTop
00243 **
00244 ** Revision 1.5  1996/01/29 13:38:13  andreas
00245 ** - new put method for every VR to put value as a string
00246 ** - better and unique print methods
00247 **
00248 ** Revision 1.4  1996/01/24 09:34:55  andreas
00249 ** Support for 64 bit long
00250 **
00251 ** Revision 1.3  1996/01/05 13:22:58  andreas
00252 ** - changed to support new streaming facilities
00253 ** - more cleanups
00254 ** - merged read / write methods for block and file transfer
00255 **
00256 */


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5