Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages

djcparam.h

00001 /*
00002  *
00003  *  Copyright (C) 1997-2001, 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:  dcmjpeg
00019  *
00020  *  Author:  Norbert Olges, Marco Eichelberg
00021  *
00022  *  Purpose: codec parameter class for dcmjpeg codecs
00023  *
00024  *  Last Update:      $Author: joergr $
00025  *  Update Date:      $Date: 2002/12/09 13:51:26 $
00026  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmjpeg/include/djcparam.h,v $
00027  *  CVS/RCS Revision: $Revision: 1.3 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 #ifndef DJCPARAM_H
00035 #define DJCPARAM_H
00036 
00037 #include "osconfig.h"
00038 #include "dccodec.h" /* for DcmCodecParameter */
00039 #include "djutils.h" /* for enums */
00040 
00043 class DJCodecParameter: public DcmCodecParameter
00044 {
00045 public:
00046 
00076   DJCodecParameter(
00077     E_CompressionColorSpaceConversion pCompressionCSConversion,
00078     E_DecompressionColorSpaceConversion pDecompressionCSConversion,
00079     E_UIDCreation pCreateSOPInstanceUID,
00080     E_PlanarConfiguration pPlanarConfiguration,
00081     OFBool pVerbose = OFFalse,
00082     OFBool pOptimizeHuffman = OFFalse,
00083     int pSmoothingFactor = 0,
00084     int pForcedBitDepth = 0,
00085     Uint32 pFragmentSize = 0,
00086     OFBool pCreateOffsetTable = OFTrue,
00087     E_SubSampling pSampleFactors = ESS_444,
00088     OFBool pWriteYBR422 = OFFalse,
00089     OFBool pConvertToSC = OFFalse,
00090     unsigned long pWindowType = 0,
00091     unsigned long pWindowParameter = 0,
00092     double pVoiCenter = 0.0,
00093     double pVoiWidth = 0.0,
00094     unsigned long pRoiLeft = 0,
00095     unsigned long pRoiTop = 0,
00096     unsigned long pRoiWidth = 0,
00097     unsigned long pRoiHeight = 0,
00098     OFBool pUsePixelValues = OFTrue,
00099     OFBool pUseModalityRescale = OFFalse);
00100 
00102   DJCodecParameter(const DJCodecParameter& arg);
00103 
00105   virtual ~DJCodecParameter();
00106 
00111   virtual DcmCodecParameter *clone() const;
00112 
00116   virtual const char *className() const;
00117 
00121   OFBool getOptimizeHuffmanCoding() const
00122   {
00123     return optimizeHuffman;
00124   }
00125 
00129   int getSmoothingFactor() const
00130   {
00131     return smoothingFactor;
00132   }
00133 
00137   int getForcedBitDepth() const
00138   {
00139     return forcedBitDepth;
00140   }
00141 
00145   Uint32 getFragmentSize() const
00146   {
00147     return fragmentSize;
00148   }
00149 
00153   OFBool getCreateOffsetTable() const
00154   {
00155     return createOffsetTable;
00156   }
00157 
00161   E_SubSampling getSampleFactors() const
00162   {
00163     return sampleFactors;
00164   }
00165 
00170   OFBool getWriteYBR422() const
00171   {
00172     return writeYBR422;
00173   }
00174 
00178   OFBool getConvertToSC() const
00179   {
00180     return convertToSC;
00181   }
00182 
00186   E_UIDCreation getUIDCreation() const
00187   {
00188     return uidCreation;
00189   }
00190 
00194   unsigned long getWindowType() const
00195   {
00196     return windowType;
00197   }
00198 
00202   unsigned long getWindowParameter() const
00203   {
00204     return windowParameter;
00205   }
00206 
00211   void getVOIWindow(double& center, double& width) const
00212   {
00213     center = voiCenter;
00214     width = voiWidth;
00215   }
00216 
00223   void getROI(
00224     unsigned long& left_pos,
00225     unsigned long& top_pos,
00226     unsigned long& width,
00227     unsigned long& height) const
00228   {
00229     left_pos = roiLeft;
00230     top_pos = roiTop;
00231     width = roiWidth;
00232     height = roiHeight;
00233   }
00234 
00238   E_PlanarConfiguration getPlanarConfiguration() const
00239   {
00240     return planarConfiguration;
00241   }
00242 
00246   E_CompressionColorSpaceConversion getCompressionColorSpaceConversion() const
00247   {
00248     return compressionCSConversion;
00249   }
00250 
00254   E_DecompressionColorSpaceConversion getDecompressionColorSpaceConversion() const
00255   {
00256     return decompressionCSConversion;
00257   }
00258 
00262   OFBool getUsePixelValues() const
00263   {
00264     return usePixelValues;
00265   }
00266 
00270   OFBool getUseModalityRescale() const
00271   {
00272     return useModalityRescale;
00273   }
00274 
00278   OFBool isVerbose() const
00279   {
00280     return verboseMode;
00281   }
00282 
00283 private:
00284 
00286   DJCodecParameter& operator=(const DJCodecParameter&);
00287 
00289   E_CompressionColorSpaceConversion compressionCSConversion;
00290 
00292   E_DecompressionColorSpaceConversion decompressionCSConversion;
00293 
00295   E_PlanarConfiguration planarConfiguration;
00296 
00298   OFBool optimizeHuffman;
00299 
00301   int smoothingFactor;
00302 
00304   int forcedBitDepth;
00305 
00307   Uint32 fragmentSize;
00308 
00310   OFBool createOffsetTable;
00311 
00313   E_SubSampling sampleFactors;
00314 
00318   OFBool writeYBR422;
00319 
00321   OFBool convertToSC;
00322 
00324   E_UIDCreation uidCreation;
00325 
00327   unsigned long windowType;
00328 
00330   unsigned long windowParameter;
00331 
00333   double voiCenter;
00334 
00336   double voiWidth;
00337 
00339   unsigned long roiLeft;
00340 
00342   unsigned long roiTop;
00343 
00345   unsigned long roiWidth;
00346 
00348   unsigned long roiHeight;
00349 
00351   OFBool usePixelValues;
00352 
00354   OFBool useModalityRescale;
00355 
00357   OFBool verboseMode;
00358 };
00359 
00360 
00361 #endif
00362 
00363 /*
00364  * CVS/RCS Log
00365  * $Log: djcparam.h,v $
00366  * Revision 1.3  2002/12/09 13:51:26  joergr
00367  * Renamed parameter/local variable to avoid name clashes with global
00368  * declaration left and/or right (used for as iostream manipulators).
00369  *
00370  * Revision 1.2  2001/11/19 15:13:26  meichel
00371  * Introduced verbose mode in module dcmjpeg. If enabled, warning
00372  *   messages from the IJG library are printed on ofConsole, otherwise
00373  *   the library remains quiet.
00374  *
00375  * Revision 1.1  2001/11/13 15:56:17  meichel
00376  * Initial release of module dcmjpeg
00377  *
00378  *
00379  */


Generated on 29 Apr 2005 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.4.2