00001 /* 00002 * 00003 * Copyright (C) 2001-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: dcmjpeg 00019 * 00020 * Author: Marco Eichelberg 00021 * 00022 * Purpose: Implements TIFF interface for plugable image formats 00023 * 00024 * Last Update: $Author: meichel $ 00025 * Update Date: $Date: 2005/12/08 16:01:43 $ 00026 * CVS/RCS Revision: $Revision: 1.5 $ 00027 * Status: $State: Exp $ 00028 * 00029 * CVS/RCS Log at end of file 00030 * 00031 */ 00032 00033 00034 #ifndef DIPITIFF_H 00035 #define DIPITIFF_H 00036 00037 #include "dcmtk/config/osconfig.h" 00038 00039 #ifdef WITH_LIBTIFF 00040 00041 #include "dcmtk/dcmimgle/diplugin.h" 00042 00043 00044 /*------------------------* 00045 * forward declarations * 00046 *------------------------*/ 00047 00048 class DiImage; 00049 00050 00051 /*--------------------* 00052 * type definitions * 00053 *--------------------*/ 00054 00059 enum DiTIFFCompression 00060 { 00062 E_tiffPackBitsCompression, 00063 00065 E_tiffLZWCompression, 00066 00068 E_tiffNoCompression 00069 }; 00070 00073 enum DiTIFFLZWPredictor 00074 { 00076 E_tiffLZWPredictorDefault, 00077 00079 E_tiffLZWPredictorNoPrediction, 00080 00082 E_tiffLZWPredictorHDifferencing 00083 }; 00084 00085 00086 /*---------------------* 00087 * class declaration * 00088 *---------------------*/ 00089 00092 class DiTIFFPlugin 00093 : public DiPluginFormat 00094 { 00095 00096 public: 00097 00100 DiTIFFPlugin(); 00101 00104 virtual ~DiTIFFPlugin(); 00105 00112 virtual int write(DiImage *image, 00113 FILE *stream, 00114 const unsigned long frame = 0) const; 00115 00119 void setCompressionType(DiTIFFCompression ctype); 00120 00124 void setLZWPredictor(DiTIFFLZWPredictor pred); 00125 00131 void setRowsPerStrip(unsigned long rows = 0); 00132 00137 static OFString getLibraryVersionString(); 00138 00139 00140 private: 00141 00143 DiTIFFCompression compressionType; 00144 00146 DiTIFFLZWPredictor predictor; 00147 00149 unsigned long rowsPerStrip; 00150 }; 00151 00152 #endif 00153 #endif 00154 00155 00156 /* 00157 * 00158 * CVS/RCS Log: 00159 * $Log: dipitiff.h,v $ 00160 * Revision 1.5 2005/12/08 16:01:43 meichel 00161 * Changed include path schema for all DCMTK header files 00162 * 00163 * Revision 1.4 2003/12/17 18:18:08 joergr 00164 * Removed leading underscore characters from preprocessor symbols (reserved 00165 * symbols). 00166 * 00167 * Revision 1.3 2002/09/19 08:34:53 joergr 00168 * Added static method getLibraryVersionString(). 00169 * 00170 * Revision 1.2 2001/12/06 10:10:59 meichel 00171 * Removed references to tiffconf.h which does not exist on all installations 00172 * 00173 * Revision 1.1 2001/11/30 16:47:56 meichel 00174 * Added TIFF export option to dcm2pnm and dcmj2pnm 00175 * 00176 * 00177 */