00001 /* 00002 * 00003 * Copyright (C) 2001-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: dcmdata 00015 * 00016 * Author: Michael Onken 00017 * 00018 * Purpose: Base Class for plugins extracting pixel data from standard 00019 * image files 00020 * 00021 * Last Update: $Author: joergr $ 00022 * Update Date: $Date: 2010-10-14 13:15:46 $ 00023 * CVS/RCS Revision: $Revision: 1.9 $ 00024 * Status: $State: Exp $ 00025 * 00026 * CVS/RCS Log at end of file 00027 * 00028 */ 00029 00030 #ifndef I2DIMGS_H 00031 #define I2DIMGS_H 00032 00033 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00034 00035 #include "dcmtk/ofstd/ofcond.h" 00036 #include "dcmtk/dcmdata/dcxfer.h" 00037 00038 class I2DImgSource 00039 { 00040 00041 public: 00042 00045 I2DImgSource() : m_imageFile() {} 00046 00050 virtual OFString inputFormat() const =0; 00051 00076 virtual OFCondition readPixelData( Uint16& rows, 00077 Uint16& cols, 00078 Uint16& samplesPerPixel, 00079 OFString& photoMetrInt, 00080 Uint16& bitsAlloc, 00081 Uint16& bitsStored, 00082 Uint16& highBit, 00083 Uint16& pixelRepr, 00084 Uint16& planConf, 00085 Uint16& pixAspectH, 00086 Uint16& pixAspectV, 00087 char*& pixData, 00088 Uint32& length, 00089 E_TransferSyntax& ts) =0; 00090 00091 /* After reading of pixel data, this function can be used for getting 00092 * information about lossy compression parameters. 00093 * @param srcEncodingLossy - [out] Denotes, whether the encoding of the pixel 00094 * data read was lossy (OFtrue) or lossless (OFFalse) 00095 * @param srcLossyComprMethod - [out] Denotes the lossy compression method used 00096 * in source if there is one (srcEncodingLossy = OFTrue). 00097 * Should use defined terms of attribute Lossy Compression Method. 00098 * @return EC_Normal if information is available, error otherwise 00099 */ 00100 virtual OFCondition getLossyComprInfo(OFBool& srcEncodingLossy, 00101 OFString& srcLossyComprMethod) const =0; 00102 00107 void setImageFile(const OFString& filename) { m_imageFile = filename; }; 00108 00112 OFString getImageFile() { return m_imageFile; }; 00113 00116 virtual ~I2DImgSource() {} 00117 00118 protected: 00119 00121 OFString m_imageFile; 00122 00123 }; 00124 00125 #endif // #ifndef I2DIMGS_H 00126 00127 /* 00128 * CVS/RCS Log: 00129 * $Log: i2dimgs.h,v $ 00130 * Revision 1.9 2010-10-14 13:15:46 joergr 00131 * Updated copyright header. Added reference to COPYRIGHT file. 00132 * 00133 * Revision 1.8 2010-02-22 11:39:54 uli 00134 * Remove some unneeded includes. 00135 * 00136 * Revision 1.7 2009-11-04 09:58:08 uli 00137 * Switched to logging mechanism provided by the "new" oflog module 00138 * 00139 * Revision 1.6 2009-09-30 08:05:25 uli 00140 * Stop including dctk.h in libi2d's header files. 00141 * 00142 * Revision 1.5 2009-07-16 14:22:19 onken 00143 * Changed comment (and thus semantic of parameter for output transfer syntax). 00144 * 00145 * Revision 1.4 2009-03-31 13:06:09 onken 00146 * Changed implementation of lossy compression attribute detection and writing. 00147 * 00148 * Revision 1.2 2009-01-16 09:51:55 onken 00149 * Completed doxygen documentation for libi2d. 00150 * 00151 * Revision 1.1 2008-01-16 15:08:38 onken 00152 * Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d 00153 * 00154 * Revision 1.2 2008-01-11 14:17:53 onken 00155 * Added various options to i2dlib. Changed logging to use a configurable 00156 * logstream. Added output plugin for the new Multiframe Secondary Capture SOP 00157 * Classes. Added mode for JPEG plugin to copy exsiting APPn markers (except 00158 * JFIF). Changed img2dcm default behaviour to invent type1/type2 attributes (no 00159 * need for templates any more). Added some bug fixes. 00160 * 00161 * Revision 1.1 2007/11/08 15:58:55 onken 00162 * Initial checkin of img2dcm application and corresponding library i2dlib. 00163 * 00164 * 00165 */ 00166