dimo2img.h

00001 /*
00002  *
00003  *  Copyright (C) 1996-2005, OFFIS
00004  *
00005  *  This software and supporting documentation were developed by
00006  *
00007  *    Kuratorium OFFIS e.V.
00008  *    Healthcare Information and Communication Systems
00009  *    Escherweg 2
00010  *    D-26121 Oldenburg, Germany
00011  *
00012  *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
00013  *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
00014  *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
00015  *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
00016  *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
00017  *
00018  *  Module:  dcmimgle
00019  *
00020  *  Author:  Joerg Riesmeier
00021  *
00022  *  Purpose: DicomMonochrome2Image (Header)
00023  *
00024  *  Last Update:      $Author: meichel $
00025  *  Update Date:      $Date: 2005/12/08 16:47:47 $
00026  *  CVS/RCS Revision: $Revision: 1.15 $
00027  *  Status:           $State: Exp $
00028  *
00029  *  CVS/RCS Log at end of file
00030  *
00031  */
00032 
00033 
00034 #ifndef DIMO2IMG_H
00035 #define DIMO2IMG_H
00036 
00037 #include "dcmtk/config/osconfig.h"
00038 #include "dcmtk/dcmdata/dctypes.h"
00039 
00040 #include "dcmtk/dcmimgle/dimoimg.h"
00041 
00042 
00043 /*---------------------*
00044  *  class declaration  *
00045  *---------------------*/
00046 
00049 class DiMono2Image
00050   : public DiMonoImage
00051 {
00052 
00053  public:
00054 
00060     DiMono2Image(const DiDocument *docu,
00061                  const EI_Status status);
00062 
00070     DiMono2Image(const DiDocument *docu,
00071                  const EI_Status status,
00072                  const double slope,
00073                  const double intercept);
00074 
00083     DiMono2Image(const DiDocument *docu,
00084                  const EI_Status status,
00085                  const DcmUnsignedShort &data,
00086                  const DcmUnsignedShort &descriptor,
00087                  const DcmLongString *explanation);
00088 
00096     DiMono2Image(const DiColorImage *image,
00097                  const double red,
00098                  const double green,
00099                  const double blue);
00100 
00109     DiMono2Image(const DiMonoImage *image,
00110                  DiMonoOutputPixel *pixel,
00111                  const unsigned long frame,
00112                  const int stored,
00113                  const int alloc);
00114 
00117     virtual ~DiMono2Image();
00118 
00122     virtual EP_Interpretation getInternalColorModel() const
00123     {
00124         return EPI_Monochrome2;
00125     }
00126 
00136     virtual const void *getOutputData(const unsigned long frame,
00137                                       const int bits,
00138                                       const int planar = 0);
00139 
00151     virtual int getOutputData(void *buffer,
00152                               const unsigned long size,
00153                               const unsigned long frame,
00154                               const int bits,
00155                               const int planar = 0);
00156 
00164     DiImage *createImage(const unsigned long fstart,
00165                          const unsigned long fcount) const;
00166 
00185     DiImage *createScale(const signed long left_pos,
00186                          const signed long top_pos,
00187                          const unsigned long clip_width,
00188                          const unsigned long clip_height,
00189                          const unsigned long scale_width,
00190                          const unsigned long scale_height,
00191                          const int interpolate,
00192                          const int aspect,
00193                          const Uint16 pvalue) const;
00194 
00202     DiImage *createFlip(const int horz,
00203                         const int vert) const;
00204 
00211     DiImage *createRotate(const int degree) const;
00212 
00222     DiImage *createMono(const double dummy1,
00223                         const double dummy2,
00224                         const double dummy3) const;
00225 
00226 
00227  protected:
00228 
00235     DiMono2Image(const DiDocument *docu,
00236                  const EI_Status status,
00237                  const char dummy);
00238 
00245     DiMono2Image(const DiMonoImage *image,
00246                  const unsigned long fstart,
00247                  const unsigned long fcount);
00248 
00266     DiMono2Image(const DiMonoImage *image,
00267                  const signed long left_pos,
00268                  const signed long top_pos,
00269                  const Uint16 src_cols,
00270                  const Uint16 src_rows,
00271                  const Uint16 dest_cols,
00272                  const Uint16 dest_rows,
00273                  const int interpolate = 0,
00274                  const int aspect = 0,
00275                  const Uint16 pvalue = 0);
00276 
00283     DiMono2Image(const DiMonoImage *image,
00284                  const int horz,
00285                  const int vert);
00286 
00292     DiMono2Image(const DiMonoImage *image,
00293                  const int degree);
00294 };
00295 
00296 
00297 #endif
00298 
00299 
00300 /*
00301  *
00302  * CVS/RCS Log:
00303  * $Log: dimo2img.h,v $
00304  * Revision 1.15  2005/12/08 16:47:47  meichel
00305  * Changed include path schema for all DCMTK header files
00306  *
00307  * Revision 1.14  2004/02/06 11:07:50  joergr
00308  * Distinguish more clearly between const and non-const access to pixel data.
00309  *
00310  * Revision 1.13  2003/12/08 18:25:12  joergr
00311  * Removed leading underscore characters from preprocessor symbols (reserved
00312  * symbols). Updated CVS header.
00313  *
00314  * Revision 1.12  2003/06/12 15:08:34  joergr
00315  * Fixed inconsistent API documentation reported by Doxygen.
00316  *
00317  * Revision 1.11  2002/12/09 13:32:52  joergr
00318  * Renamed parameter/local variable to avoid name clashes with global
00319  * declaration left and/or right (used for as iostream manipulators).
00320  *
00321  * Revision 1.10  2001/11/27 18:18:23  joergr
00322  * Added support for plugable output formats in class DicomImage. First
00323  * implementation is JPEG.
00324  *
00325  * Revision 1.9  2001/06/01 15:49:44  meichel
00326  * Updated copyright header
00327  *
00328  * Revision 1.8  2000/03/08 16:24:18  meichel
00329  * Updated copyright header.
00330  *
00331  * Revision 1.7  1999/10/06 13:29:55  joergr
00332  * Corrected creation of PrintBitmap pixel data: VOI windows should be applied
00333  * before clipping to avoid that the region outside the image (border) is also
00334  * windowed (this requires a new method in dcmimgle to create a DicomImage
00335  * with the grayscale transformations already applied).
00336  *
00337  * Revision 1.6  1999/09/17 12:22:57  joergr
00338  * Added/changed/completed DOC++ style comments in the header files.
00339  *
00340  * Revision 1.5  1999/08/25 16:41:52  joergr
00341  * Added new feature: Allow clipping region to be outside the image
00342  * (overlapping).
00343  *
00344  * Revision 1.4  1999/03/24 17:20:06  joergr
00345  * Added/Modified comments and formatting.
00346  *
00347  * Revision 1.3  1999/01/20 15:03:20  joergr
00348  * Added new output method to fill external memory buffer with rendered pixel
00349  * data.
00350  *
00351  * Revision 1.2  1998/12/16 16:32:02  joergr
00352  * Added explanation string to LUT class (retrieved from dataset).
00353  *
00354  * Revision 1.1  1998/11/27 15:12:18  joergr
00355  * Added copyright message.
00356  * Added methods and constructors for flipping and rotating, changed for
00357  * scaling and clipping.
00358  *
00359  * Revision 1.2  1998/05/11 14:53:19  joergr
00360  * Added CVS/RCS header to each file.
00361  *
00362  *
00363  */


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5