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

📄 dsrcodvl.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * *  Copyright (C) 2000-2005, OFFIS * *  This software and supporting documentation were developed by * *    Kuratorium OFFIS e.V. *    Healthcare Information and Communication Systems *    Escherweg 2 *    D-26121 Oldenburg, Germany * *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER. * *  Module: dcmsr * *  Author: Joerg Riesmeier * *  Purpose: *    classes: DSRCodedEntryValue * *  Last Update:      $Author: meichel $ *  Update Date:      $Date: 2005/12/08 16:04:52 $ *  CVS/RCS Revision: $Revision: 1.16 $ *  Status:           $State: Exp $ * *  CVS/RCS Log at end of file * */#ifndef DSRCODVL_H#define DSRCODVL_H#include "dcmtk/config/osconfig.h"   /* make sure OS specific configuration is included first */#include "dcmtk/dcmsr/dsrtypes.h"#include "dcmtk/ofstd/ofstring.h"/*---------------------* *  class declaration  * *---------------------*//** Class for coded entry values */class DSRCodedEntryValue{    // allow access to getValuePtr()    friend class DSRContentItem;  public:    /** default contructor     */    DSRCodedEntryValue();    /** constructor.     *  The code triple is only set if it passed the validity check (see setCode()).     ** @param  codeValue               identifier of the code to be set that is unambiguous     *                                  within the coding scheme. (VR=SH, mandatory)     *  @param  codingSchemeDesignator  textual identifier of the table where the 'codeValue'     *                                  is linked to its 'codeMeaning'. (VR=SH, mandatory)     *  @param  codeMeaning             human-readable translation of the 'codeValue'.  Used     *                                  for display when code dictionary is not available.     *                                  (VR=LO, mandatory)     */    DSRCodedEntryValue(const OFString &codeValue,                       const OFString &codingSchemeDesignator,                       const OFString &codeMeaning);    /** constructor.     *  The code 4-tuple is only set if it passed the validity check (see setCode()).     ** @param  codeValue               identifier of the code to be set that is unambiguous     *                                  within the coding scheme. (VR=SH, mandatory)     *  @param  codingSchemeDesignator  textual identifier of the table where the 'codeValue'     *                                  is linked to its 'codeMeaning'. (VR=SH, mandatory)     *  @param  codingSchemeVersion     version of the coding scheme.  Used when a coding     *                                  scheme has multiple versions and the 'codingScheme     *                                  Designator' does not explicitly (or adequately)     *                                  specify the version number. (VR=SH, optional)     *  @param  codeMeaning             human-readable translation of the 'codeValue'. Used     *                                  for display when (appropriate) code dictionary is not     *                                  available. (VR=LO, mandatory)     */    DSRCodedEntryValue(const OFString &codeValue,                       const OFString &codingSchemeDesignator,                       const OFString &codingSchemeVersion,                       const OFString &codeMeaning);    /** copy constructor     ** @param  codedEntryValue  code to be copied (not checked !)     */    DSRCodedEntryValue(const DSRCodedEntryValue &codedEntryValue);    /** destructor     */    virtual ~DSRCodedEntryValue();    /** assignment operator     ** @param  codedEntryValue  code to be copied (not checked !)     ** @return reference to this code after 'codedEntryValue' has been copied     */    DSRCodedEntryValue &operator=(const DSRCodedEntryValue &codedEntryValue);    /** comparison operator.     *  Two codes are equal if the code value, coding scheme designator and the (optional)     *  coding scheme version are equal.  The code meaning is not relevant for this check.     ** @param  codedEntryValue  code which should be compared to the current one     ** @return OFTrue if both codes are equal, OFFalse otherwise     */    OFBool operator==(const DSRCodedEntryValue &codedEntryValue) const;    /** clear all internal variables.     *  Since an empty code is invalid the code becomes invalid afterwards.     */    virtual void clear();    /** check whether the current code is valid.     *  See checkCode() for details.     ** @return OFTrue if code is valid, OFFalse otherwise     */    virtual OFBool isValid() const;    /** check whether the current code is empty.     *  Checks whether all four components of the code are empty.     ** @return OFTrue if code is empty, OFFalse otherwise     */    virtual OFBool isEmpty() const;    /** print code.     *  The output of a typical code triple looks like this: (1234,99_OFFIS_DCMTK,"Code Meaning").     *  The optional coding scheme version is printed in square brackets directly after the coding     *  scheme designator, e.g.: (cm,UCUM[1.4],"centimeter")     ** @param  stream          output stream to which the code should be printed     *  @param  printCodeValue  flag indicating whether the code value and coding scheme     *                          designator should be printed (default) or not.  If OFFalse the     *                          output looks like this: (,,"Code Meaning")     *  @param  printInvalid    flag indicating whether the text "invalid code" should be     *                          printed for invalid codes or not (default)     */    void print(ostream &stream,               const OFBool printCodeValue = OFTrue,               const OFBool printInvalid = OFFalse) const;    /** read code sequence from dataset.     *  The number of items within the code sequence is checked.  If error/warning output are     *  enabled a warning message is printed if the sequence is empty or contains more than     *  one item.     ** @param  dataset    DICOM dataset from which the code sequence should be read     *  @param  tagKey     DICOM tag specifying the attribute (= sequence) which should be read     *  @param  type       value type of the sequence (valid value: "1", "2", something else).     *                     This parameter is used for checking purpose, any difference is reported.     *  @param  logStream  pointer to error/warning output stream (output disabled if NULL)     ** @return status, EC_Normal if successful, an error code otherwise     */    OFCondition readSequence(DcmItem &dataset,                             const DcmTagKey &tagKey,                             const OFString &type,                             OFConsole *logStream);    /** write code sequence to dataset     ** @param  dataset    DICOM dataset to which the code sequence should be written     *  @param  tagKey     DICOM tag specifying the attribute (= sequence) which should be written     *  @param  logStream  pointer to error/warning output stream (output disabled if NULL)     ** @return status, EC_Normal if successful, an error code otherwise     */    OFCondition writeSequence(DcmItem &dataset,                              const DcmTagKey &tagKey,                              OFConsole *logStream) const;    /** read code from XML document     ** @param  doc     document containing the XML file content     *  @param  cursor  cursor pointing to the starting node     ** @return status, EC_Normal if successful, an error code otherwise     */    OFCondition readXML(const DSRXMLDocument &doc,                        DSRXMLCursor cursor);    /** write code in XML format     ** @param  stream     output stream to which the XML document is written     *  @param  flags      flag used to customize the output (see DSRTypes::XF_xxx)     *  @param  logStream  pointer to error/warning output stream (output disabled if NULL)     ** @return status, EC_Normal if successful, an error code otherwise     */    OFCondition writeXML(ostream &stream,                         const size_t flags,                         OFConsole *logStream) const;    /** render code in HTML format     ** @param  stream      output stream to which the HTML document is written     *  @param  flags       flag used to customize the output (see DSRTypes::HF_xxx)     *  @param  logStream   pointer to error/warning output stream (output disabled if NULL)     *  @param  fullCode    optional flag indicating whether to render the full code tuple     *                      or the code value/meaning only     *  @param  valueFirst  optional flag indicating whether to render the code value or     *                      meaning first (outside the brackets)     ** @return status, EC_Normal if successful, an error code otherwise     */    OFCondition renderHTML(ostream &stream,                           const size_t flags,                           OFConsole *logStream,                           const OFBool fullCode = OFTrue,                           const OFBool valueFirst = OFFalse) const;    /** get reference to code value     ** @return reference to code value     */    inline const DSRCodedEntryValue &getValue() const    {        return *this;    }    /** get copy of code value     ** @param  codedEntryValue  reference to variable in which the code should be stored     ** @return status, EC_Normal if successful, an error code otherwise     */

⌨️ 快捷键说明

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