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

📄 dcitem.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 4 页
字号:
     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the reference to the element value is stored (might be NULL)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetString(const DcmTagKey &tagKey,                                 const char *&value,                                 const OFBool searchIntoSub = OFFalse);    /** find element and get value as a C++ string (only one component).     *  Applicable to the following VRs: AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, LT, OB, OF, OW,     *  PN, SH, SL, SS, ST, TM, UI, UL, US, UT     *  Since the getOFString() routine is called internally the resulting string is normalized, i.e.     *  leading and/or trailing spaces are removed according to the associated value representation,     *  or the element value is converted to a character string (for non-string VRs) - see documentation     *  in the corresponding header file.     *  In contrast to the above and below function only the specified component (see parameter 'pos')     *  is returned. The result variable 'value' is automatically set to an empty string if an error     *  occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the element value is stored     *  @param pos index of the value in case of multi-valued elements (0..vm-1)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetOFString(const DcmTagKey &tagKey,                                   OFString &value,                                   const unsigned long pos = 0,                                   const OFBool searchIntoSub = OFFalse);    /** find element and get value as a C++ string (all components).     *  Applicable to the following VRs: AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, LT, OB, OF, OW,     *  PN, SH, SL, SS, ST, TM, UI, UL, US, UT     *  Since the getOFStringArray() routine is called internally the resulting string is normalized,     *  i.e. leading and/or trailing spaces are removed according to the associated value representation     *  or the element values are converted to character strings (for non-string VRs) - see documentation     *  in the corresponding header file.     *  The result variable 'value' is automatically set to an empty string if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the element value is stored     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetOFStringArray(const DcmTagKey &tagKey,                                        OFString &value,                                        const OFBool searchIntoSub = OFFalse);    /** find element and get value as an unsigned 8-bit integer.     *  Applicable to the following VRs: OB     *  The result variable 'value' is automatically set to zero if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the element value is stored     *  @param pos index of the value in case of multi-valued elements (0..vm-1)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetUint8(const DcmTagKey &tagKey,                                Uint8 &value,                                const unsigned long pos = 0,                                const OFBool searchIntoSub = OFFalse);    /** find element and get value as an array of unsigned 8-bit integers.     *  Applicable to the following VRs: OB     *  The result variable 'value' is automatically set to NULL if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the reference to the element value is stored     *  @param count stores number of items in the result array (if not NULL)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetUint8Array(const DcmTagKey &tagKey,                                     const Uint8 *&value,                                     unsigned long *count = NULL,                                     const OFBool searchIntoSub = OFFalse);    /** find element and get value as an unsigned 16-bit integer.     *  Applicable to the following VRs: OW, US     *  The result variable 'value' is automatically set to zero if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the element value is stored     *  @param pos index of the value in case of multi-valued elements (0..vm-1)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetUint16(const DcmTagKey &tagKey,                                 Uint16 &value,                                 const unsigned long pos = 0,                                 const OFBool searchIntoSub = OFFalse);    /** find element and get value as an array of unsigned 16-bit integers.     *  Applicable to the following VRs: AT, OW, US     *  The result variable 'value' is automatically set to NULL if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the reference to the element value is stored     *  @param count stores number of items in the result array (if not NULL)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetUint16Array(const DcmTagKey &tagKey,                                      const Uint16 *&value,                                      unsigned long *count = NULL,                                      const OFBool searchIntoSub = OFFalse);    /** find element and get value as a signed 16-bit integer.     *  Applicable to the following VRs: SS     *  The result variable 'value' is automatically set to zero if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the element value is stored     *  @param pos index of the value in case of multi-valued elements (0..vm-1)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetSint16(const DcmTagKey &tagKey,                                 Sint16 &value,                                 const unsigned long pos = 0,                                 const OFBool searchIntoSub = OFFalse);    /** find element and get value as an array of signed 16-bit integers.     *  Applicable to the following VRs: SS     *  The result variable 'value' is automatically set to NULL if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the reference to the element value is stored     *  @param count stores number of items in the result array (if not NULL)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetSint16Array(const DcmTagKey &tagKey,                                      const Sint16 *&value,                                      unsigned long *count = NULL,                                      const OFBool searchIntoSub = OFFalse);    /** find element and get value as an unsigned 32-bit integer.     *  Applicable to the following VRs: UL     *  The result variable 'value' is automatically set to zero if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the element value is stored     *  @param pos index of the value in case of multi-valued elements (0..vm-1)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetUint32(const DcmTagKey &tagKey,                                 Uint32 &value,                                 const unsigned long pos = 0,                                 const OFBool searchIntoSub = OFFalse);    /** find element and get value as an array of unsigned 32-bit integers.     *  Applicable to the following VRs: UL     *  The result variable 'value' is automatically set to NULL if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the reference to the element value is stored     *  @param count stores number of items in the result array (if not NULL)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetUint32Array(const DcmTagKey &tagKey,                                      const Uint32 *&value,                                      unsigned long *count = NULL,                                      const OFBool searchIntoSub = OFFalse);    /** find element and get value as a signed 32-bit integer.     *  Applicable to the following VRs: IS, SL     *  The result variable 'value' is automatically set to zero if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the element value is stored     *  @param pos index of the value in case of multi-valued elements (0..vm-1)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetSint32(const DcmTagKey &tagKey,                                 Sint32 &value,                                 const unsigned long pos = 0,                                 const OFBool searchIntoSub = OFFalse);    /** find element and get value as an array of signed 32-bit integers.     *  Applicable to the following VRs: SL     *  The result variable 'value' is automatically set to NULL if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the reference to the element value is stored     *  @param count stores number of items in the result array (if not NULL)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetSint32Array(const DcmTagKey &tagKey,                                      const Sint32 *&value,                                      unsigned long *count = NULL,                                      const OFBool searchIntoSub = OFFalse);    /** find element and get value as a (signed) long integer.     *  Applicable to the following VRs: IS, SL, SS, UL, US     *  The result variable 'value' is automatically set to zero if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the element value is stored     *  @param pos index of the value in case of multi-valued elements (0..vm-1)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetLongInt(const DcmTagKey &tagKey,                                  long int &value,                                  const unsigned long pos = 0,                                  const OFBool searchIntoSub = OFFalse);    /** find element and get value as a 32-bit floating point.     *  Applicable to the following VRs: FL, OF     *  The result variable 'value' is automatically set to zero if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the element value is stored     *  @param pos index of the value in case of multi-valued elements (0..vm-1)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetFloat32(const DcmTagKey &tagKey,                                  Float32 &value,                                  const unsigned long pos = 0,                                  const OFBool searchIntoSub = OFFalse);    /** find element and get value as an array of 32-bit floating point values.     *  Applicable to the following VRs: FL, OF     *  The result variable 'value' is automatically set to NULL if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the reference to the element value is stored     *  @param count stores number of items in the result array (if not NULL)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetFloat32Array(const DcmTagKey &tagKey,                                       const Float32 *&value,                                       unsigned long *count = NULL,                                       const OFBool searchIntoSub = OFFalse);    /** find element and get value as a 64-bit floating point.     *  Applicable to the following VRs: DS, FD     *  The result variable 'value' is automatically set to zero if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the element value is stored     *  @param pos index of the value in case of multi-valued elements (0..vm-1)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetFloat64(const DcmTagKey &tagKey,                                  Float64 &value,                                  const unsigned long pos = 0,                                  const OFBool searchIntoSub = OFFalse);    /** find element and get value as an array of 64-bit floating point values.     *  Applicable to the following VRs: FD     *  The result variable 'value' is automatically set to NULL if an error occurs.     *  @param tagKey DICOM tag specifying the attribute to be searched for     *  @param value variable in which the reference to the element value is stored     *  @param count stores number of items in the result array (if not NULL)     *  @param searchIntoSub flag indicating whether to search into sequences or not     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition findAndGetFloat64Array(const DcmTagKey &tagKey,                                       const Float64 *&value,                                       unsigned long *count = NULL,                                       const OFBool searchIntoSub = OFFalse);    /** looks up and returns a given sequence.     *  Applicable to the following VRs: SQ, (pixelSQ)     *  The result variable 'sequence' is automatically set to NULL if an error occurs     *  (e.g. if 'seqTagKey' does not refer to a sequence attribute).     *  @param seqTagKey DICOM tag specifying the sequence attribute to be searched for     *  @param sequence variable in which the reference to the sequence element is stored     *  @param searchIntoSub flag indicating whether to search into sub-sequences or not     *  @return EC_Normal upon success, an error otherwise.     */    OFCondition findAndGetSequence(const DcmTagKey &seqTagKey,                                   DcmSequenceOfItems *&sequence,                                   const OFBool searchIntoSub = OFFalse);    /** looks up and returns a given sequence item, if it exists. Otherwise sets 'item'     *  to NULL and returns EC_TagNotFound (specified sequence does not exist) or     *  EC_IllegalParameter (specified item does not exist). Only the top-most level of     *  the dataset/item is examined (i.e. no deep-search is performed).     *  Applicable to the following VRs: SQ, (pixelSQ)     *  @param seqTagKey DICOM tag specifying the sequence attribute to be searched for     *  @param item variable in which the reference to the sequence item is stored     *  @param itemNum number of the item to be searched for (0..n-1, -1 for last)     *  @return EC_Normal upon success, an error otherwise.     */    OFCondition findAndGetSequenceItem(const DcmTagKey &seqTagKey,                                       DcmItem *&item,                                       const signed long itemNum = 0);    /* --- findOrCreate functions: find an element or create a new one --- */

⌨️ 快捷键说明

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