⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dccodec.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 2 页
字号:
  /** registers a codec object in the global list of codecs consulted by dcmdata   *  whenever conversion to/from compressed transfer syntaxes is requested.   *  This function must not be called before main() is started, e.g. from   *  a constructor of a global object.   *  This call is safe in multi-thread operations.   *  @param aCodec pointer to codec object.     *    Must remain unmodified and valid until the codec has been deregistered.    *  @param aDefaultRepParam default representation parameter.    *    Must remain unmodified and valid until the codec has been deregistered.    *  @param aCodecParameter codec parameter.    *    Must remain unmodified and valid until the codec has been deregistered or the   *    parameter has been replaced by a call to updateCodecParameter()   *  @return EC_Normal if successful, an error code otherwise   */  static OFCondition registerCodec(    const DcmCodec *aCodec,      const DcmRepresentationParameter *aDefaultRepParam,    const DcmCodecParameter *aCodecParameter);  /** deregisters a codec and it's parameter objects from the global list.   *  This call is safe in multi-thread operations.   *  @param aCodec pointer to registered codec   *  @return EC_Normal if successful, an error code otherwise   */  static OFCondition deregisterCodec(const DcmCodec *aCodec);      /** updates the codec parameters object for a codec that has been registered before.   *  This call is safe in multi-thread operations.   *  @param aCodec pointer to codec object that has been registered before   *  @param aCodecParameter codec parameter.    *    Must remain unmodified and valid until the codec has been deregistered or the   *    parameter has been replaced by another call to updateCodecParameter()   *  @return EC_Normal if successful, an error code otherwise   */  static OFCondition updateCodecParameter(    const DcmCodec *aCodec,    const DcmCodecParameter *aCodecParameter);  /** looks for a codec that is able to decode from the given transfer syntax   *  and calls the decode() method of the codec.  A read lock on the list of   *  codecs is acquired until this method returns.   *  @param fromType transfer syntax to decode from   *  @param fromParam representation parameter of current compressed   *    representation, may be NULL.   *  @param fromPixSeq compressed pixel sequence   *  @param uncompressedPixelData uncompressed pixel data stored in this element   *  @param pixelStack stack pointing to the location of the pixel data   *    element in the current dataset.   *  @return EC_Normal if successful, an error code otherwise.   */  static OFCondition decode(    const DcmXfer & fromType,    const DcmRepresentationParameter * fromParam,    DcmPixelSequence * fromPixSeq,    DcmPolymorphOBOW& uncompressedPixelData,    DcmStack & pixelStack);  /** looks for a codec that is able to encode from the given transfer syntax   *  and calls the encode() method of the codec.  A read lock on the list of   *  codecs is acquired until this method returns.   *  @param fromRepType transfer syntax to encode from   *  @param pixelData pointer to the uncompressed image data in OW format   *    and local byte order   *  @param length of the pixel data field in bytes   *  @param toRepType transfer syntax to compress to   *  @param toRepParam representation parameter describing the desired   *    compressed representation (e.g. JPEG quality)   *  @param pixSeq compressed pixel sequence (pointer to new DcmPixelSequence object   *    allocated on heap) returned in this parameter upon success.      *  @param pixelStack stack pointing to the location of the pixel data   *    element in the current dataset.   *  @return EC_Normal if successful, an error code otherwise.   */  static OFCondition encode(    const E_TransferSyntax fromRepType,    const Uint16 * pixelData,    const Uint32 length,    const E_TransferSyntax toRepType,    const DcmRepresentationParameter * toRepParam,    DcmPixelSequence * & pixSeq,    DcmStack & pixelStack);  /** looks for a codec that is able to transcode (re-compresses)   *  from the given transfer syntax to the given transfer syntax   *  and calls the encode() method of the codec.   *  A read lock on the list of   *  codecs is acquired until this method returns.   *  @param fromRepType current transfer syntax of the compressed image   *  @param fromParam current representation parameter of compressed data, may be NULL   *  @param fromPixSeq compressed pixel sequence   *  @param toRepType transfer syntax to compress to   *  @param toRepParam representation parameter describing the desired   *    new compressed representation (e.g. JPEG quality)   *  @param toPixSeq compressed pixel sequence (pointer to new DcmPixelSequence object   *    allocated on heap) returned in this parameter upon success.      *  @param pixelStack stack pointing to the location of the pixel data   *    element in the current dataset.   *  @return EC_Normal if successful, an error code otherwise.   */  static OFCondition encode(    const E_TransferSyntax fromRepType,    const DcmRepresentationParameter * fromParam,     DcmPixelSequence * fromPixSeq,     const E_TransferSyntax toRepType,    const DcmRepresentationParameter * toRepParam,    DcmPixelSequence * & toPixSeq,    DcmStack & pixelStack);  /** looks for a codec that claims to be able to convert   *  between the given transfer syntaxes.   *  A read lock on the list of   *  codecs is acquired until this method returns.   *  @param fromRepType current transfer syntax   *  @param toRepType desired new transfer syntax   *  @return true if transformation is supported by a codec, false otherwise.   */  static OFBool canChangeCoding(    const E_TransferSyntax fromRepType,    const E_TransferSyntax toRepType);private:  /** constructor   *  @param aCodec pointer to codec object.     *  @param aDefaultRepParam default representation parameter.    *  @param aCodecParameter codec parameter.    */  DcmCodecList(    const DcmCodec *aCodec,      const DcmRepresentationParameter *aDefaultRepParam,    const DcmCodecParameter *aCodecParameter);  /// private undefined copy constructor   DcmCodecList(const DcmCodecList &);  /// private undefined copy assignment operator   DcmCodecList &operator=(const DcmCodecList &);  /// pointer to codec object  const DcmCodec * codec;    /// pointer to default representation parameter  const DcmRepresentationParameter * defaultRepParam;    /// pointer to codec parameter set  const DcmCodecParameter * codecParameter;  /// singleton list of registered codecs  static OFList<DcmCodecList *> registeredCodecs;  #ifdef _REENTRANT  /// read/write lock guarding access to singleton list  static OFReadWriteLock codecLock;#endif  // dummy friend declaration to prevent gcc from complaining  // that this class only defines private constructors and has no friends.  friend class DcmCodecListDummyFriend;}; #endif/*** CVS/RCS Log:** $Log: dccodec.h,v $** Revision 1.18  2005/12/09 14:48:14  meichel** Added missing virtual destructors**** Revision 1.17  2005/12/08 16:28:01  meichel** Changed include path schema for all DCMTK header files**** Revision 1.16  2004/08/24 14:54:18  meichel**  Updated compression helper methods. Image type is not set to SECONDARY**   any more, support for the purpose of reference code sequence added.**** Revision 1.15  2003/06/12 13:35:23  joergr** Fixed inconsistent API documentation reported by Doxygen.**** Revision 1.14  2002/05/24 14:51:41  meichel** Moved helper methods that are useful for different compression techniques**   from module dcmjpeg to module dcmdata**** Revision 1.13  2002/02/27 14:21:20  meichel** Declare dcmdata read/write locks only when compiled in multi-thread mode**** Revision 1.12  2001/11/12 16:29:51  meichel** Added dummy friend class declaration to singleton class DcmCodecList**   to keep gcc from squawking.**** Revision 1.11  2001/11/08 16:19:39  meichel** Changed interface for codec registration. Now everything is thread-safe**   and multiple codecs can be registered for a single transfer syntax (e.g.**   one encoder and one decoder).**** Revision 1.10  2001/09/25 17:19:07  meichel** Updated abstract class DcmCodecParameter for use with dcmjpeg.**   Added new function deregisterGlobalCodec().**** Revision 1.9  2001/06/01 15:48:34  meichel** Updated copyright header**** Revision 1.8  2001/05/25 09:53:51  meichel** Modified DcmCodec::decode() interface, required for future dcmjpeg module.**** Revision 1.7  2000/09/27 08:19:54  meichel** Minor changes in DcmCodec interface, required for future dcmjpeg module.**** Revision 1.6  2000/04/14 16:09:12  meichel** Made function DcmCodec and related functions thread safe.**   registerGlobalCodec() should not be called anymore from the constructor**   of global objects.**** Revision 1.5  2000/03/08 16:26:11  meichel** Updated copyright header.**** Revision 1.4  1999/03/31 09:24:31  meichel** Updated copyright header in module dcmdata**** Revision 1.3  1998/07/15 15:48:43  joergr** Removed several compiler warnings reported by gcc 2.8.1 with** additional options, e.g. missing copy constructors and assignment** operators, initialization of member variables in the body of a** constructor instead of the member initialization list, hiding of** methods by use of identical names, uninitialized member variables,** missing const declaration of char pointers. Replaced tabs by spaces.**** Revision 1.2  1997/07/24 13:07:45  andreas** - Make DcmCodec:canChangeCoding abstract**** Revision 1.1  1997/07/21 07:54:57  andreas** - New environment for encapsulated pixel representations. DcmPixelData**   can contain different representations and uses codecs to convert**   between them. Codecs are derived from the DcmCodec class. New error**   codes are introduced for handling of representations. New internal**   value representation (only for ident()) for PixelData** */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -