OFFIS DCMTK  Version 3.6.0
dimopx.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: DicomMonochromePixel (Header)
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:16:26 $
22  * CVS/RCS Revision: $Revision: 1.20 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 
30 #ifndef DIMOPX_H
31 #define DIMOPX_H
32 
33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/ofstd/ofcast.h"
35 
36 #include "dcmtk/dcmimgle/dipixel.h"
37 #include "dcmtk/dcmimgle/dimomod.h"
38 
39 
40 /*------------------------*
41  * forward declarations *
42  *------------------------*/
43 
44 class DiInputPixel;
45 class DiMonoOutputPixel;
46 
47 
48 /*---------------------*
49  * class declaration *
50  *---------------------*/
51 
55  : public DiPixel
56 {
57 
58  public:
59 
64  DiMonoPixel(const unsigned long count);
65 
71  DiMonoPixel(const DiInputPixel *pixel,
72  DiMonoModality *modality);
73 
80  DiMonoModality *modality);
81 
84  virtual ~DiMonoPixel();
85 
90  inline int getPlanes() const
91  {
92  return 1;
93  }
94 
102  virtual int getMinMaxValues(double &min,
103  double &max) const = 0;
104 
113  virtual int getMinMaxWindow(const int idx,
114  double &center,
115  double &width) = 0;
116 
131  virtual int getRoiWindow(const unsigned long left_pos,
132  const unsigned long top_pos,
133  const unsigned long width,
134  const unsigned long height,
135  const unsigned long columns,
136  const unsigned long rows,
137  const unsigned long frame,
138  double &voiCenter,
139  double &voiWidth) = 0;
140 
149  virtual int getHistogramWindow(const double thresh,
150  double &center,
151  double &width) = 0;
152 
157  inline unsigned int getBits() const
158  {
159  return (Modality != NULL) ? Modality->getBits() : 0;
160  }
161 
167  inline double getAbsMinimum() const
168  {
169  return (Modality != NULL) ? Modality->getAbsMinimum() : 0;
170  }
171 
177  inline double getAbsMaximum() const
178  {
179  return (Modality != NULL) ? Modality->getAbsMaximum() : 0;
180  }
181 
186  inline double getAbsMaxRange() const
187  {
188  return getAbsMaximum() - getAbsMinimum() + 1;
189  }
190 
195  inline const char *getModalityLutExplanation() const
196  {
197  return (Modality != NULL) ? Modality->getExplanation() : OFstatic_cast(const char *, NULL);
198  }
199 
206  inline int isPotentiallySigned() const
207  {
208  return (getAbsMinimum() < 0);
209  }
210 
211 
212  protected:
213 
219  DiMonoPixel(const DiPixel *pixel,
220  DiMonoModality *modality);
221 
227  DiMonoPixel(const DiMonoPixel *pixel,
228  const unsigned long count);
229 
232 
233 
234  private:
235 
236  // --- declarations to avoid compiler warnings
237 
238  DiMonoPixel(const DiMonoPixel &);
239  DiMonoPixel &operator=(const DiMonoPixel &);
240 };
241 
242 
243 #endif
244 
245 
246 /*
247  *
248  * CVS/RCS Log:
249  * $Log: dimopx.h,v $
250  * Revision 1.20 2010-10-14 13:16:26 joergr
251  * Updated copyright header. Added reference to COPYRIGHT file.
252  *
253  * Revision 1.19 2010-03-01 09:08:47 uli
254  * Removed some unnecessary include directives in the headers.
255  *
256  * Revision 1.18 2005-12-08 16:47:55 meichel
257  * Changed include path schema for all DCMTK header files
258  *
259  * Revision 1.17 2004/02/06 11:07:50 joergr
260  * Distinguish more clearly between const and non-const access to pixel data.
261  *
262  * Revision 1.16 2003/12/08 18:45:29 joergr
263  * Adapted type casts to new-style typecast operators defined in ofcast.h.
264  * Removed leading underscore characters from preprocessor symbols (reserved
265  * symbols). Updated copyright header.
266  *
267  * Revision 1.15 2002/12/09 13:32:54 joergr
268  * Renamed parameter/local variable to avoid name clashes with global
269  * declaration left and/or right (used for as iostream manipulators).
270  *
271  * Revision 1.14 2001/11/19 12:56:15 joergr
272  * Added parameter 'frame' to setRoiWindow().
273  *
274  * Revision 1.13 2001/09/28 13:07:43 joergr
275  * Added method setRoiWindow() which automatically calculates a min-max VOI
276  * window for a specified rectangular region of the image.
277  *
278  * Revision 1.12 2001/06/01 15:49:47 meichel
279  * Updated copyright header
280  *
281  * Revision 1.11 2000/03/08 16:24:20 meichel
282  * Updated copyright header.
283  *
284  * Revision 1.10 1999/10/06 13:43:29 joergr
285  * Corrected creation of PrintBitmap pixel data: VOI windows should be applied
286  * before clipping to avoid that the region outside the image (border) is also
287  * windowed (this requires a new method in dcmimgle to create a DicomImage
288  * with the grayscale transformations already applied).
289  *
290  * Revision 1.9 1999/09/17 12:41:26 joergr
291  * Added/changed/completed DOC++ style comments in the header files.
292  *
293  * Revision 1.8 1999/05/31 12:35:16 joergr
294  * Corrected bug concerning the conversion of color images to grayscale.
295  *
296  * Revision 1.7 1999/04/28 17:03:48 joergr
297  * Added type casts to NULL pointers returned as 'const char *' to avoid
298  * compiler warnings reported by gcc 2.7.2.1 (Linux).
299  *
300  * Revision 1.6 1999/03/24 17:20:15 joergr
301  * Added/Modified comments and formatting.
302  *
303  * Revision 1.5 1999/02/03 17:33:18 joergr
304  * Added member variable and related methods to store number of bits used for
305  * pixel data.
306  *
307  * Revision 1.4 1999/01/11 09:35:56 joergr
308  * Corrected some typos and formatting.
309  *
310  * Revision 1.3 1998/12/22 14:33:45 joergr
311  * Added implementation of methods to return member variables AbsMinimum/
312  * Maximum.
313  *
314  * Revision 1.2 1998/12/16 16:35:39 joergr
315  * Added explanation string to LUT class (retrieved from dataset).
316  *
317  * Revision 1.1 1998/11/27 15:33:16 joergr
318  * Added copyright message.
319  * Introduced new pixel base class.
320  *
321  * Revision 1.4 1998/07/01 08:39:24 joergr
322  * Minor changes to avoid compiler warnings (gcc 2.8.1 with additional
323  * options), e.g. add copy constructors.
324  *
325  * Revision 1.3 1998/05/11 14:53:23 joergr
326  * Added CVS/RCS header to each file.
327  *
328  *
329  */


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