dcmimgle/include/dcmtk/dcmimgle/diinpx.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: DicomInputPixel (Header)
00019  *
00020  *  Last Update:      $Author: joergr $
00021  *  Update Date:      $Date: 2010-10-14 13:16:26 $
00022  *  CVS/RCS Revision: $Revision: 1.20 $
00023  *  Status:           $State: Exp $
00024  *
00025  *   CVS/RCS Log at end of file
00026  *
00027  */
00028 
00029 
00030 #ifndef DIINPX_H
00031 #define DIINPX_H
00032 
00033 #include "dcmtk/config/osconfig.h"
00034 
00035 #include "dcmtk/dcmimgle/diutils.h"
00036 
00037 
00038 /*---------------------*
00039  *  class declaration  *
00040  *---------------------*/
00041 
00044 class DiInputPixel
00045 {
00046 
00047  public:
00048 
00056     DiInputPixel(const unsigned int bits,
00057                  const unsigned long first,
00058                  const unsigned long number,
00059                  const unsigned long fsize);
00060 
00063     virtual ~DiInputPixel();
00064 
00069     virtual int determineMinMax() = 0;
00070 
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 
00102     virtual double getMinValue(const int idx) const = 0;
00103 
00111     virtual double getMaxValue(const int idx) const = 0;
00112 
00117     inline unsigned int getBits() const
00118     {
00119         return Bits;
00120     }
00121 
00126     inline double getAbsMinimum() const
00127     {
00128         return AbsMinimum;
00129     }
00130 
00135     inline double getAbsMaximum() const
00136     {
00137         return AbsMaximum;
00138     }
00139 
00144     inline double getAbsMaxRange() const
00145     {
00146         return AbsMaximum - AbsMinimum + 1;
00147     }
00148 
00153     inline unsigned long getCount() const
00154     {
00155         return Count;
00156     }
00157 
00162     inline unsigned long getPixelStart() const
00163     {
00164         return PixelStart;
00165     }
00166 
00171     inline unsigned long getPixelCount() const
00172     {
00173         return PixelCount;
00174     }
00175 
00180     inline unsigned long getComputedCount() const
00181     {
00182         return ComputedCount;
00183     }
00184 
00185 
00186  protected:
00187 
00189     unsigned long Count;
00191     unsigned int Bits;
00192 
00194     unsigned long FirstFrame;
00196     unsigned long NumberOfFrames;
00198     unsigned long FrameSize;
00199 
00201     unsigned long PixelStart;
00203     unsigned long PixelCount;
00204 
00206     unsigned long ComputedCount;
00207 
00209     double AbsMinimum;
00211     double AbsMaximum;
00212 };
00213 
00214 
00215 #endif
00216 
00217 
00218 /*
00219  *
00220  * CVS/RCS Log:
00221  * $Log: diinpx.h,v $
00222  * Revision 1.20  2010-10-14 13:16:26  joergr
00223  * Updated copyright header. Added reference to COPYRIGHT file.
00224  *
00225  * Revision 1.19  2010-03-01 09:08:46  uli
00226  * Removed some unnecessary include directives in the headers.
00227  *
00228  * Revision 1.18  2009-11-25 15:59:51  joergr
00229  * Adapted code for new approach to access individual frames of a DICOM image.
00230  *
00231  * Revision 1.17  2005/12/08 16:47:43  meichel
00232  * Changed include path schema for all DCMTK header files
00233  *
00234  * Revision 1.16  2004/02/06 11:07:50  joergr
00235  * Distinguish more clearly between const and non-const access to pixel data.
00236  *
00237  * Revision 1.15  2003/12/08 18:23:09  joergr
00238  * Removed leading underscore characters from preprocessor symbols (reserved
00239  * symbols). Updated copyright header.
00240  *
00241  * Revision 1.14  2002/06/26 16:02:31  joergr
00242  * Enhanced handling of corrupted pixel data and/or length.
00243  *
00244  * Revision 1.13  2001/09/28 13:04:58  joergr
00245  * Enhanced algorithm to determine the min and max value.
00246  *
00247  * Revision 1.12  2001/06/01 15:49:42  meichel
00248  * Updated copyright header
00249  *
00250  * Revision 1.11  2000/04/27 13:08:38  joergr
00251  * Dcmimgle library code now consistently uses ofConsole for error output.
00252  *
00253  * Revision 1.10  2000/03/08 16:24:16  meichel
00254  * Updated copyright header.
00255  *
00256  * Revision 1.9  2000/03/03 14:09:11  meichel
00257  * Implemented library support for redirecting error messages into memory
00258  *   instead of printing them to stdout/stderr for GUI applications.
00259  *
00260  * Revision 1.8  1999/09/17 12:13:18  joergr
00261  * Added/changed/completed DOC++ style comments in the header files.
00262  *
00263  * Revision 1.7  1999/07/23 13:54:37  joergr
00264  * Optimized memory usage for converting input pixel data (reference instead
00265  * of copying where possible).
00266  *
00267  * Revision 1.6  1999/03/24 17:20:02  joergr
00268  * Added/Modified comments and formatting.
00269  *
00270  * Revision 1.5  1999/02/03 17:03:47  joergr
00271  * Added member variable and related methods to store number of bits used for
00272  * pixel data.
00273  *
00274  * Revision 1.4  1999/01/20 15:00:54  joergr
00275  * Added routine to calculate absolute range of pixel data.
00276  *
00277  * Revision 1.3  1998/12/22 14:18:40  joergr
00278  * Added implementation of methods to return member variables AbsMinimum/
00279  * Maximum.
00280  *
00281  * Revision 1.2  1998/12/16 16:30:34  joergr
00282  * Added methods to determine absolute minimum and maximum value for given
00283  * value representation.
00284  *
00285  * Revision 1.1  1998/11/27 15:06:38  joergr
00286  * Added copyright message.
00287  *
00288  * Revision 1.3  1998/05/11 14:53:17  joergr
00289  * Added CVS/RCS header to each file.
00290  *
00291  *
00292  */


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