00001 /* 00002 * 00003 * Copyright (C) 1996-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: dcmimgle 00015 * 00016 * Author: Joerg Riesmeier 00017 * 00018 * Purpose: DicomMonochrome2Image (Header) 00019 * 00020 * Last Update: $Author: joergr $ 00021 * Update Date: $Date: 2010-10-14 13:16:26 $ 00022 * CVS/RCS Revision: $Revision: 1.18 $ 00023 * Status: $State: Exp $ 00024 * 00025 * CVS/RCS Log at end of file 00026 * 00027 */ 00028 00029 00030 #ifndef DIMO2IMG_H 00031 #define DIMO2IMG_H 00032 00033 #include "dcmtk/config/osconfig.h" 00034 00035 #include "dcmtk/dcmimgle/dimoimg.h" 00036 00037 00038 /*---------------------* 00039 * class declaration * 00040 *---------------------*/ 00041 00044 class DiMono2Image 00045 : public DiMonoImage 00046 { 00047 00048 public: 00049 00055 DiMono2Image(const DiDocument *docu, 00056 const EI_Status status); 00057 00065 DiMono2Image(const DiDocument *docu, 00066 const EI_Status status, 00067 const double slope, 00068 const double intercept); 00069 00078 DiMono2Image(const DiDocument *docu, 00079 const EI_Status status, 00080 const DcmUnsignedShort &data, 00081 const DcmUnsignedShort &descriptor, 00082 const DcmLongString *explanation); 00083 00091 DiMono2Image(const DiColorImage *image, 00092 const double red, 00093 const double green, 00094 const double blue); 00095 00104 DiMono2Image(const DiMonoImage *image, 00105 DiMonoOutputPixel *pixel, 00106 const unsigned long frame, 00107 const int stored, 00108 const int alloc); 00109 00112 virtual ~DiMono2Image(); 00113 00117 virtual EP_Interpretation getInternalColorModel() const 00118 { 00119 return EPI_Monochrome2; 00120 } 00121 00131 virtual const void *getOutputData(const unsigned long frame, 00132 const int bits, 00133 const int planar = 0); 00134 00146 virtual int getOutputData(void *buffer, 00147 const unsigned long size, 00148 const unsigned long frame, 00149 const int bits, 00150 const int planar = 0); 00151 00159 DiImage *createImage(const unsigned long fstart, 00160 const unsigned long fcount) const; 00161 00182 DiImage *createScale(const signed long left_pos, 00183 const signed long top_pos, 00184 const unsigned long clip_width, 00185 const unsigned long clip_height, 00186 const unsigned long scale_width, 00187 const unsigned long scale_height, 00188 const int interpolate, 00189 const int aspect, 00190 const Uint16 pvalue) const; 00191 00199 DiImage *createFlip(const int horz, 00200 const int vert) const; 00201 00208 DiImage *createRotate(const int degree) const; 00209 00219 DiImage *createMono(const double dummy1, 00220 const double dummy2, 00221 const double dummy3) const; 00222 00223 00224 protected: 00225 00232 DiMono2Image(const DiDocument *docu, 00233 const EI_Status status, 00234 const char dummy); 00235 00242 DiMono2Image(const DiMonoImage *image, 00243 const unsigned long fstart, 00244 const unsigned long fcount); 00245 00265 DiMono2Image(const DiMonoImage *image, 00266 const signed long left_pos, 00267 const signed long top_pos, 00268 const Uint16 src_cols, 00269 const Uint16 src_rows, 00270 const Uint16 dest_cols, 00271 const Uint16 dest_rows, 00272 const int interpolate = 0, 00273 const int aspect = 0, 00274 const Uint16 pvalue = 0); 00275 00282 DiMono2Image(const DiMonoImage *image, 00283 const int horz, 00284 const int vert); 00285 00291 DiMono2Image(const DiMonoImage *image, 00292 const int degree); 00293 }; 00294 00295 00296 #endif 00297 00298 00299 /* 00300 * 00301 * CVS/RCS Log: 00302 * $Log: dimo2img.h,v $ 00303 * Revision 1.18 2010-10-14 13:16:26 joergr 00304 * Updated copyright header. Added reference to COPYRIGHT file. 00305 * 00306 * Revision 1.17 2010-03-01 09:08:47 uli 00307 * Removed some unnecessary include directives in the headers. 00308 * 00309 * Revision 1.16 2008-05-20 10:03:53 joergr 00310 * Added new bilinear and bicubic scaling algorithms for image magnification. 00311 * 00312 * Revision 1.15 2005/12/08 16:47:47 meichel 00313 * Changed include path schema for all DCMTK header files 00314 * 00315 * Revision 1.14 2004/02/06 11:07:50 joergr 00316 * Distinguish more clearly between const and non-const access to pixel data. 00317 * 00318 * Revision 1.13 2003/12/08 18:25:12 joergr 00319 * Removed leading underscore characters from preprocessor symbols (reserved 00320 * symbols). Updated CVS header. 00321 * 00322 * Revision 1.12 2003/06/12 15:08:34 joergr 00323 * Fixed inconsistent API documentation reported by Doxygen. 00324 * 00325 * Revision 1.11 2002/12/09 13:32:52 joergr 00326 * Renamed parameter/local variable to avoid name clashes with global 00327 * declaration left and/or right (used for as iostream manipulators). 00328 * 00329 * Revision 1.10 2001/11/27 18:18:23 joergr 00330 * Added support for plugable output formats in class DicomImage. First 00331 * implementation is JPEG. 00332 * 00333 * Revision 1.9 2001/06/01 15:49:44 meichel 00334 * Updated copyright header 00335 * 00336 * Revision 1.8 2000/03/08 16:24:18 meichel 00337 * Updated copyright header. 00338 * 00339 * Revision 1.7 1999/10/06 13:29:55 joergr 00340 * Corrected creation of PrintBitmap pixel data: VOI windows should be applied 00341 * before clipping to avoid that the region outside the image (border) is also 00342 * windowed (this requires a new method in dcmimgle to create a DicomImage 00343 * with the grayscale transformations already applied). 00344 * 00345 * Revision 1.6 1999/09/17 12:22:57 joergr 00346 * Added/changed/completed DOC++ style comments in the header files. 00347 * 00348 * Revision 1.5 1999/08/25 16:41:52 joergr 00349 * Added new feature: Allow clipping region to be outside the image 00350 * (overlapping). 00351 * 00352 * Revision 1.4 1999/03/24 17:20:06 joergr 00353 * Added/Modified comments and formatting. 00354 * 00355 * Revision 1.3 1999/01/20 15:03:20 joergr 00356 * Added new output method to fill external memory buffer with rendered pixel 00357 * data. 00358 * 00359 * Revision 1.2 1998/12/16 16:32:02 joergr 00360 * Added explanation string to LUT class (retrieved from dataset). 00361 * 00362 * Revision 1.1 1998/11/27 15:12:18 joergr 00363 * Added copyright message. 00364 * Added methods and constructors for flipping and rotating, changed for 00365 * scaling and clipping. 00366 * 00367 * Revision 1.2 1998/05/11 14:53:19 joergr 00368 * Added CVS/RCS header to each file. 00369 * 00370 * 00371 */