dcmdata/include/dcmtk/dcmdata/dcrlecce.h

00001 /*
00002  *
00003  *  Copyright (C) 2002-2010, OFFIS e.V.
00004  *  All rights reserved.  See COPYRIGHT file for details.
00005  *
00006  *  This software and supporting documentation were developed by
00007  *
00008  *    OFFIS e.V.
00009  *    R&D Division Health
00010  *    Escherweg 2
00011  *    D-26121 Oldenburg, Germany
00012  *
00013  *
00014  *  Module:  dcmdata
00015  *
00016  *  Author:  Marco Eichelberg
00017  *
00018  *  Purpose: encoder codec class for RLE
00019  *
00020  *  Last Update:      $Author: joergr $
00021  *  Update Date:      $Date: 2010-10-14 13:15:41 $
00022  *  CVS/RCS Revision: $Revision: 1.7 $
00023  *  Status:           $State: Exp $
00024  *
00025  *  CVS/RCS Log at end of file
00026  *
00027  */
00028 
00029 #ifndef DCRLECCE_H
00030 #define DCRLECCE_H
00031 
00032 #include "dcmtk/config/osconfig.h"
00033 #include "dcmtk/dcmdata/dccodec.h"  /* for class DcmCodec */
00034 
00035 class DcmItem;
00036 
00041 class DcmRLECodecEncoder: public DcmCodec
00042 {
00043 public:
00044 
00046   DcmRLECodecEncoder();
00047 
00049   virtual ~DcmRLECodecEncoder();
00050 
00061   virtual OFCondition decode(
00062     const DcmRepresentationParameter * fromRepParam,
00063     DcmPixelSequence * pixSeq,
00064     DcmPolymorphOBOW& uncompressedPixelData,
00065     const DcmCodecParameter * cp,
00066     const DcmStack& objStack) const;
00067 
00093   virtual OFCondition decodeFrame(
00094     const DcmRepresentationParameter * fromParam,
00095     DcmPixelSequence * fromPixSeq,
00096     const DcmCodecParameter * cp,
00097     DcmItem *dataset,
00098     Uint32 frameNo,
00099     Uint32& startFragment,
00100     void *buffer,
00101     Uint32 bufSize,
00102     OFString& decompressedColorModel) const;
00103 
00118   virtual OFCondition encode(
00119     const Uint16 * pixelData,
00120     const Uint32 length,
00121     const DcmRepresentationParameter * toRepParam,
00122     DcmPixelSequence * & pixSeq,
00123     const DcmCodecParameter *cp,
00124     DcmStack & objStack) const;
00125 
00140   virtual OFCondition encode(
00141     const E_TransferSyntax fromRepType,
00142     const DcmRepresentationParameter * fromRepParam,
00143     DcmPixelSequence * fromPixSeq,
00144     const DcmRepresentationParameter * toRepParam,
00145     DcmPixelSequence * & toPixSeq,
00146     const DcmCodecParameter * cp,
00147     DcmStack & objStack) const;
00148 
00156   virtual OFBool canChangeCoding(
00157     const E_TransferSyntax oldRepType,
00158     const E_TransferSyntax newRepType) const;
00159 
00173   virtual OFCondition determineDecompressedColorModel(
00174     const DcmRepresentationParameter *fromParam,
00175     DcmPixelSequence *fromPixSeq,
00176     const DcmCodecParameter *cp,
00177     DcmItem *dataset,
00178     OFString &decompressedColorModel) const;
00179 
00180 private:
00181 
00183   DcmRLECodecEncoder(const DcmRLECodecEncoder&);
00184 
00186   DcmRLECodecEncoder& operator=(const DcmRLECodecEncoder&);
00187 
00194   static OFCondition updateDerivationDescription(
00195       DcmItem *dataset,
00196       double ratio);
00197 };
00198 
00199 #endif
00200 
00201 /*
00202  * CVS/RCS Log
00203  * $Log: dcrlecce.h,v $
00204  * Revision 1.7  2010-10-14 13:15:41  joergr
00205  * Updated copyright header. Added reference to COPYRIGHT file.
00206  *
00207  * Revision 1.6  2009-11-17 16:36:51  joergr
00208  * Added new method that allows for determining the color model of the
00209  * decompressed image.
00210  *
00211  * Revision 1.5  2009-11-04 09:58:07  uli
00212  * Switched to logging mechanism provided by the "new" oflog module
00213  *
00214  * Revision 1.4  2008-05-29 10:46:13  meichel
00215  * Implemented new method DcmPixelData::getUncompressedFrame
00216  *   that permits frame-wise access to compressed and uncompressed
00217  *   objects without ever loading the complete object into main memory.
00218  *   For this new method to work with compressed images, all classes derived from
00219  *   DcmCodec need to implement a new method decodeFrame(). For now, only
00220  *   dummy implementations returning an error code have been defined.
00221  *
00222  * Revision 1.3  2005/12/08 16:28:34  meichel
00223  * Changed include path schema for all DCMTK header files
00224  *
00225  * Revision 1.2  2003/03/21 13:06:46  meichel
00226  * Minor code purifications for warnings reported by MSVC in Level 4
00227  *
00228  * Revision 1.1  2002/06/06 14:52:35  meichel
00229  * Initial release of the new RLE codec classes
00230  *   and the dcmcrle/dcmdrle tools in module dcmdata
00231  *
00232  *
00233  */


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1