OFFIS DCMTK  Version 3.6.0
diluptab.h
1 /*
2  *
3  * Copyright (C) 1996-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: dcmimgle
15  *
16  * Author: Joerg Riesmeier
17  *
18  * Purpose: DicomLookupTable (Header)
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:16:26 $
22  * CVS/RCS Revision: $Revision: 1.26 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 
30 #ifndef DILUPTAB_H
31 #define DILUPTAB_H
32 
33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/dcmdata/dctagkey.h"
35 
36 #include "dcmtk/dcmimgle/dibaslut.h"
37 #include "dcmtk/dcmimgle/diobjcou.h"
38 
39 
40 /*------------------------*
41  * forward declarations *
42  *------------------------*/
43 
44 class DcmObject;
45 class DcmUnsignedShort;
46 class DcmLongString;
47 class DiDocument;
48 
49 
50 /*---------------------*
51  * class declaration *
52  *---------------------*/
53 
57  : public DiBaseLUT,
58  public DiObjectCounter
59 {
60 
61  public:
62 
72  DiLookupTable(const DiDocument *docu,
73  const DcmTagKey &descriptor,
74  const DcmTagKey &data,
75  const DcmTagKey &explanation,
76  const EL_BitsPerTableEntry descripMode = ELM_UseValue,
77  EI_Status *status = NULL);
78 
91  DiLookupTable(const DiDocument *docu,
92  const DcmTagKey &sequence,
93  const DcmTagKey &descriptor,
94  const DcmTagKey &data,
95  const DcmTagKey &explanation,
96  const EL_BitsPerTableEntry descripMode = ELM_UseValue,
97  const unsigned long pos = 0,
98  unsigned long *card = NULL);
99 
109  DiLookupTable(const DcmUnsignedShort &data,
110  const DcmUnsignedShort &descriptor,
111  const DcmLongString *explanation = NULL,
112  const EL_BitsPerTableEntry descripMode = ELM_UseValue,
113  const signed long first = -1,
114  EI_Status *status = NULL);
115 
122  DiLookupTable(Uint16 *buffer,
123  const Uint32 count,
124  const Uint16 bits);
125 
128  virtual ~DiLookupTable();
129 
141  int invertTable(const int flag = 0x1);
142 
155  int mirrorTable(const int flag = 0x1);
156 
164 
175  int compareLUT(const DcmUnsignedShort &data,
176  const DcmUnsignedShort &descriptor);
177 
178 
185  virtual OFBool operator==(const DiBaseLUT &lut);
186 
193  virtual OFBool operator==(const DiLookupTable &lut);
194 
195 
196  protected:
197 
208  void Init(const DiDocument *docu,
209  DcmObject *obj,
210  const DcmTagKey &descriptor,
211  const DcmTagKey &data,
212  const DcmTagKey &explanation,
213  const EL_BitsPerTableEntry descripMode = ELM_UseValue,
214  EI_Status *status = NULL);
215 
223  void checkTable(unsigned long count,
224  Uint16 bits,
225  const EL_BitsPerTableEntry descripMode = ELM_UseValue,
226  EI_Status *status = NULL);
227 
238  void checkBits(const Uint16 bits,
239  const Uint16 rightBits,
240  const Uint16 wrongBits = 0,
241  const EL_BitsPerTableEntry descripMode = ELM_UseValue);
242 
243  private:
244 
249 
250  // --- declarations to avoid compiler warnings
251 
252  DiLookupTable(const DiLookupTable &);
253  DiLookupTable &operator=(const DiLookupTable &);
254 };
255 
256 
257 #endif
258 
259 
260 /*
261  *
262  * CVS/RCS Log:
263  * $Log: diluptab.h,v $
264  * Revision 1.26 2010-10-14 13:16:26 joergr
265  * Updated copyright header. Added reference to COPYRIGHT file.
266  *
267  * Revision 1.25 2007/03/16 11:56:06 joergr
268  * Introduced new flag that allows to select how to handle the BitsPerTableEntry
269  * value in the LUT descriptor (use, ignore or check).
270  *
271  * Revision 1.24 2005/12/08 16:47:45 meichel
272  * Changed include path schema for all DCMTK header files
273  *
274  * Revision 1.23 2003/12/17 16:17:29 joergr
275  * Added new compatibility flag that allows to ignore the third value of LUT
276  * descriptors and to determine the bits per table entry automatically.
277  *
278  * Revision 1.22 2003/12/08 18:24:15 joergr
279  * Removed leading underscore characters from preprocessor symbols (reserved
280  * symbols). Updated CVS header.
281  *
282  * Revision 1.21 2003/06/12 15:08:34 joergr
283  * Fixed inconsistent API documentation reported by Doxygen.
284  *
285  * Revision 1.20 2002/12/09 13:32:51 joergr
286  * Renamed parameter/local variable to avoid name clashes with global
287  * declaration left and/or right (used for as iostream manipulators).
288  *
289  * Revision 1.19 2001/06/01 15:49:43 meichel
290  * Updated copyright header
291  *
292  * Revision 1.18 2000/07/07 13:42:30 joergr
293  * Added support for LIN OD presentation LUT shape.
294  *
295  * Revision 1.17 2000/03/08 16:24:17 meichel
296  * Updated copyright header.
297  *
298  * Revision 1.16 2000/03/06 18:19:36 joergr
299  * Moved get-method to base class, renamed method and made method virtual to
300  * avoid hiding of methods (reported by Sun CC 4.2).
301  *
302  * Revision 1.15 1999/11/24 11:13:46 joergr
303  * Added method to mirror order of entries in look-up tables.
304  * Enhanced comments for methods "inverting" the LUT values/entries.
305  *
306  * Revision 1.14 1999/11/03 12:52:08 joergr
307  * Added copy constructor and assignment operator to avoid compiler warnings.
308  *
309  * Revision 1.13 1999/10/20 10:34:44 joergr
310  * Enhanced method invertTable to distinguish between copy of LUT data and
311  * original (referenced) LUT data.
312  *
313  * Revision 1.12 1999/09/30 11:37:09 joergr
314  * Added methods to compare two lookup tables.
315  *
316  * Revision 1.11 1999/09/17 12:22:53 joergr
317  * Added/changed/completed DOC++ style comments in the header files.
318  *
319  * Revision 1.10 1999/09/08 15:19:24 joergr
320  * Completed implementation of setting inverse presentation LUT as needed
321  * e.g. for DICOM print (invert 8->12 bits PLUT).
322  *
323  * Revision 1.9 1999/07/23 14:01:49 joergr
324  * Added dummy method (no implementation yet) to create inverse LUTs.
325  *
326  * Revision 1.8 1999/05/03 11:09:28 joergr
327  * Minor code purifications to keep Sun CC 2.0.1 quiet.
328  *
329  * Revision 1.7 1999/03/24 17:20:04 joergr
330  * Added/Modified comments and formatting.
331  *
332  * Revision 1.6 1999/02/03 17:27:23 joergr
333  * Added base class for look-up tables (moved main functionality of class
334  * DiLookupTable to DiBaseLUT).
335  *
336  * Revision 1.5 1998/12/23 11:34:34 joergr
337  * Changed behaviour of getLabel/Description/Explanation() methods: return
338  * NULL if string empty, no empty string "".
339  *
340  * Revision 1.4 1998/12/22 14:24:36 joergr
341  * Changed parameter type.
342  * Added method getAbsMaxRange.
343  *
344  * Revision 1.3 1998/12/16 16:31:30 joergr
345  * Added explanation string to LUT class (retrieved from dataset).
346  *
347  * Revision 1.2 1998/12/14 17:19:19 joergr
348  * Added support for signed values as second entry in look-up tables
349  * (= first value mapped).
350  *
351  * Revision 1.1 1998/11/27 15:10:21 joergr
352  * Added copyright message.
353  * Added support of object counter class.
354  * Added constructors to use external modality transformations.
355  * Added methods to support presentation LUTs and shapes.
356  *
357  * Revision 1.3 1998/07/01 08:39:22 joergr
358  * Minor changes to avoid compiler warnings (gcc 2.8.1 with additional
359  * options), e.g. add copy constructors.
360  *
361  * Revision 1.2 1998/05/11 14:53:18 joergr
362  * Added CVS/RCS header to each file.
363  *
364  *
365  */


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