diqthitm.h

00001 /*
00002  *
00003  *  Copyright (C) 2002-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:  dcmimage
00019  *
00020  *  Author:  Marco Eichelberg
00021  *
00022  *  Purpose: class DcmQuantHistogramItem
00023  *
00024  *  Last Update:      $Author: meichel $
00025  *  Update Date:      $Date: 2005/12/08 16:01:50 $
00026  *  CVS/RCS Revision: $Revision: 1.3 $
00027  *  Status:           $State: Exp $
00028  *
00029  *  CVS/RCS Log at end of file
00030  *
00031  */
00032 
00033 
00034 #ifndef DIQTHITM_H
00035 #define DIQTHITM_H
00036 
00037 
00038 #include "dcmtk/config/osconfig.h"
00039 #include "dcmtk/ofstd/oftypes.h"   /* for OFBool */
00040 #include "dcmtk/dcmimage/diqtpix.h"   /* for DcmQuantPixel */
00041 
00042 
00049 class DcmQuantHistogramItem: public DcmQuantPixel
00050 {
00051 public:
00056   DcmQuantHistogramItem(const DcmQuantPixel& colorP, int val)
00057   : DcmQuantPixel(colorP)
00058   , value(val)
00059   {
00060   }
00061 
00063   DcmQuantHistogramItem()
00064   : DcmQuantPixel()
00065   , value(0)
00066   {
00067   }
00068 
00069   // we don't declare a destructor here, but the standard destructor will do.
00070 
00075   inline OFBool equals(const DcmQuantPixel& colorP) const
00076   {
00077     return *this == colorP;
00078   }
00079 
00081   inline int getValue() const
00082   {
00083     return value;
00084   }
00085 
00089   inline void setValue(int v)
00090   {
00091     value = v;
00092   }
00093 
00095   inline void incValue()
00096   {
00097     ++value;
00098   }
00099 
00100 private:
00101 
00111   int value;
00112 
00113 };
00114 
00115 
00117 typedef DcmQuantHistogramItem *DcmQuantHistogramItemPointer;
00118 
00119 
00120 #endif
00121 
00122 
00123 /*
00124  * CVS/RCS Log:
00125  * $Log: diqthitm.h,v $
00126  * Revision 1.3  2005/12/08 16:01:50  meichel
00127  * Changed include path schema for all DCMTK header files
00128  *
00129  * Revision 1.2  2003/12/23 12:18:05  joergr
00130  * Updated copyright header.
00131  *
00132  * Revision 1.1  2002/01/25 13:32:06  meichel
00133  * Initial release of new color quantization classes and
00134  *   the dcmquant tool in module dcmimage.
00135  *
00136  *
00137  */


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