OFFIS DCMTK  Version 3.6.0
diqthash.h
1 /*
2  *
3  * Copyright (C) 2002-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmimage
15  *
16  * Author: Marco Eichelberg
17  *
18  * Purpose: class DcmQuantColorHashTable
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:16:29 $
22  * CVS/RCS Revision: $Revision: 1.4 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 
30 #ifndef DIQTHASH_H
31 #define DIQTHASH_H
32 
33 
34 #include "dcmtk/config/osconfig.h"
35 #include "dcmtk/dcmimage/diqtpix.h" /* for DcmQuantPixel */
36 #include "dcmtk/dcmimage/diqthitl.h" /* for DcmQuantHistogramItemList */
37 
38 
39 class DicomImage;
40 
41 
48 {
49 public:
52 
55 
61  inline void add(const DcmQuantPixel& colorP, int value)
62  {
63  table[colorP.hash()]->push_front(colorP, value);
64  }
65 
71  inline int lookup(const DcmQuantPixel& colorP) const
72  {
73  return table[colorP.hash()]->lookup(colorP);
74  }
75 
89  unsigned long addToHashTable(
90  DicomImage& image,
91  unsigned long newmaxval,
92  unsigned long maxcolors);
93 
97  unsigned long countEntries() const;
98 
107  unsigned long createHistogram(DcmQuantHistogramItemPointer *& array);
108 
109 private:
110 
113 
116 
119 };
120 
121 
122 #endif
123 
124 
125 /*
126  * CVS/RCS Log:
127  * $Log: diqthash.h,v $
128  * Revision 1.4 2010-10-14 13:16:29 joergr
129  * Updated copyright header. Added reference to COPYRIGHT file.
130  *
131  * Revision 1.3 2005/12/08 16:01:47 meichel
132  * Changed include path schema for all DCMTK header files
133  *
134  * Revision 1.2 2003/12/23 12:17:26 joergr
135  * Updated copyright header.
136  *
137  * Revision 1.1 2002/01/25 13:32:05 meichel
138  * Initial release of new color quantization classes and
139  * the dcmquant tool in module dcmimage.
140  *
141  *
142  */


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2