dcmimgle/include/dcmtk/dcmimgle/dimoopx.h

00001 /*
00002  *
00003  *  Copyright (C) 1996-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:  dcmimgle
00015  *
00016  *  Author:  Joerg Riesmeier
00017  *
00018  *  Purpose: DicomMonoOutputPixel (Header)
00019  *
00020  *  Last Update:      $Author: joergr $
00021  *  Update Date:      $Date: 2010-10-14 13:16:26 $
00022  *  CVS/RCS Revision: $Revision: 1.21 $
00023  *  Status:           $State: Exp $
00024  *
00025  *  CVS/RCS Log at end of file
00026  *
00027  */
00028 
00029 
00030 #ifndef DIMOOPX_H
00031 #define DIMOOPX_H
00032 
00033 #include "dcmtk/config/osconfig.h"
00034 #include "dcmtk/dcmimgle/diutils.h"
00035 
00036 #include "dcmtk/ofstd/ofstream.h"
00037 
00038 
00039 /*------------------------*
00040  *  forward declarations  *
00041  *------------------------*/
00042 
00043 class DiMonoPixel;
00044 
00045 
00046 /*---------------------*
00047  *  class declaration  *
00048  *---------------------*/
00049 
00052 class DiMonoOutputPixel
00053 {
00054 
00055  public:
00056 
00064     DiMonoOutputPixel(const DiMonoPixel *pixel,
00065                       const unsigned long size,
00066                       const unsigned long frame,
00067                       const unsigned long max);
00068 
00071     virtual ~DiMonoOutputPixel();
00072 
00077     virtual EP_Representation getRepresentation() const = 0;
00078 
00083     virtual const void *getData() const = 0;
00084 
00089     virtual void *getDataPtr() = 0;
00090 
00093     virtual void removeDataReference() = 0;
00094 
00099     virtual size_t getItemSize() const = 0;
00100 
00107     virtual int writePPM(STD_NAMESPACE ostream& stream) const = 0;
00108 
00115     virtual int writePPM(FILE *stream) const = 0;
00116 
00121     inline unsigned long getCount() const
00122     {
00123         return FrameSize;
00124     }
00125 
00134     int isUnused(const unsigned long value);
00135 
00136 
00137  protected:
00138 
00141     virtual void determineUsedValues() = 0;
00142 
00143 
00145     /*const*/ unsigned long Count;
00147     const unsigned long FrameSize;
00148 
00150     Uint8 *UsedValues;
00152     const unsigned long MaxValue;
00153 
00154 
00155  private:
00156 
00157  // --- declarations to avoid compiler warnings
00158 
00159     DiMonoOutputPixel(const DiMonoOutputPixel &);
00160     DiMonoOutputPixel &operator=(const DiMonoOutputPixel &);
00161 };
00162 
00163 
00164 #endif
00165 
00166 
00167 /*
00168  *
00169  * CVS/RCS Log:
00170  * $Log: dimoopx.h,v $
00171  * Revision 1.21  2010-10-14 13:16:26  joergr
00172  * Updated copyright header. Added reference to COPYRIGHT file.
00173  *
00174  * Revision 1.20  2010-03-01 09:08:47  uli
00175  * Removed some unnecessary include directives in the headers.
00176  *
00177  * Revision 1.19  2006-08-15 16:30:11  meichel
00178  * Updated the code in module dcmimgle to correctly compile when
00179  *   all standard C++ classes remain in namespace std.
00180  *
00181  * Revision 1.18  2005/12/08 16:47:53  meichel
00182  * Changed include path schema for all DCMTK header files
00183  *
00184  * Revision 1.17  2004/02/06 11:07:50  joergr
00185  * Distinguish more clearly between const and non-const access to pixel data.
00186  *
00187  * Revision 1.16  2004/01/05 14:52:20  joergr
00188  * Removed acknowledgements with e-mail addresses from CVS log.
00189  *
00190  * Revision 1.15  2003/12/08 18:44:05  joergr
00191  * Removed leading underscore characters from preprocessor symbols (reserved
00192  * symbols). Updated copyright header.
00193  *
00194  * Revision 1.14  2002/11/27 14:08:05  meichel
00195  * Adapted module dcmimgle to use of new header file ofstdinc.h
00196  *
00197  * Revision 1.13  2002/04/16 13:53:11  joergr
00198  * Added configurable support for C++ ANSI standard includes (e.g. streams).
00199  *
00200  * Revision 1.12  2001/06/01 15:49:46  meichel
00201  * Updated copyright header
00202  *
00203  * Revision 1.11  2000/03/08 16:24:19  meichel
00204  * Updated copyright header.
00205  *
00206  * Revision 1.10  2000/02/23 15:12:15  meichel
00207  * Corrected macro for Borland C++ Builder 4 workaround.
00208  *
00209  * Revision 1.9  2000/02/01 10:52:37  meichel
00210  * Avoiding to include <stdlib.h> as extern "C" on Borland C++ Builder 4,
00211  *   workaround for bug in compiler header files.
00212  *
00213  * Revision 1.8  1999/10/06 13:41:21  joergr
00214  * Added method to renmoved reference to (internally handles) pixel data.
00215  *
00216  * Revision 1.7  1999/09/17 12:26:52  joergr
00217  * Added/changed/completed DOC++ style comments in the header files.
00218  *
00219  * Revision 1.6  1999/07/23 14:05:55  joergr
00220  * Enhanced handling of corrupted pixel data (wrong length).
00221  *
00222  * Revision 1.5  1999/03/24 17:20:13  joergr
00223  * Added/Modified comments and formatting.
00224  *
00225  * Revision 1.4  1999/02/11 16:37:56  joergr
00226  * Added routine to check whether particular grayscale values are unused in
00227  * the output data.
00228  *
00229  * Revision 1.3  1999/02/03 17:30:30  joergr
00230  * Added BEGIN_EXTERN_C and END_EXTERN_C to some C includes.
00231  *
00232  * Revision 1.2  1999/01/20 15:07:02  joergr
00233  * Replaced invocation of getCount() by member variable Count where possible.
00234  *
00235  * Revision 1.1  1998/11/27 15:25:48  joergr
00236  * Added copyright message.
00237  *
00238  * Revision 1.3  1998/05/11 14:53:22  joergr
00239  * Added CVS/RCS header to each file.
00240  *
00241  *
00242  */


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