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: dcmimage 00015 * 00016 * Author: Marco Eichelberg 00017 * 00018 * Purpose: class DcmQuantHistogramItem 00019 * 00020 * Last Update: $Author: joergr $ 00021 * Update Date: $Date: 2010-10-14 13:16:29 $ 00022 * CVS/RCS Revision: $Revision: 1.4 $ 00023 * Status: $State: Exp $ 00024 * 00025 * CVS/RCS Log at end of file 00026 * 00027 */ 00028 00029 00030 #ifndef DIQTHITM_H 00031 #define DIQTHITM_H 00032 00033 00034 #include "dcmtk/config/osconfig.h" 00035 #include "dcmtk/ofstd/oftypes.h" /* for OFBool */ 00036 #include "dcmtk/dcmimage/diqtpix.h" /* for DcmQuantPixel */ 00037 00038 00045 class DcmQuantHistogramItem: public DcmQuantPixel 00046 { 00047 public: 00052 DcmQuantHistogramItem(const DcmQuantPixel& colorP, int val) 00053 : DcmQuantPixel(colorP) 00054 , value(val) 00055 { 00056 } 00057 00059 DcmQuantHistogramItem() 00060 : DcmQuantPixel() 00061 , value(0) 00062 { 00063 } 00064 00065 // we don't declare a destructor here, but the standard destructor will do. 00066 00071 inline OFBool equals(const DcmQuantPixel& colorP) const 00072 { 00073 return *this == colorP; 00074 } 00075 00077 inline int getValue() const 00078 { 00079 return value; 00080 } 00081 00085 inline void setValue(int v) 00086 { 00087 value = v; 00088 } 00089 00091 inline void incValue() 00092 { 00093 ++value; 00094 } 00095 00096 private: 00097 00107 int value; 00108 00109 }; 00110 00111 00113 typedef DcmQuantHistogramItem *DcmQuantHistogramItemPointer; 00114 00115 00116 #endif 00117 00118 00119 /* 00120 * CVS/RCS Log: 00121 * $Log: diqthitm.h,v $ 00122 * Revision 1.4 2010-10-14 13:16:29 joergr 00123 * Updated copyright header. Added reference to COPYRIGHT file. 00124 * 00125 * Revision 1.3 2005/12/08 16:01:50 meichel 00126 * Changed include path schema for all DCMTK header files 00127 * 00128 * Revision 1.2 2003/12/23 12:18:05 joergr 00129 * Updated copyright header. 00130 * 00131 * Revision 1.1 2002/01/25 13:32:06 meichel 00132 * Initial release of new color quantization classes and 00133 * the dcmquant tool in module dcmimage. 00134 * 00135 * 00136 */