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

📄 dcmimage.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 5 页
字号:
     ** @return pointer to description text (NULL if absent)     */    inline const char *getPresentationLutExplanation() const    {        return ((Image != NULL) && (Image->getMonoImagePtr() != NULL)) ?            Image->getMonoImagePtr()->getPresentationLutExplanation() : OFstatic_cast(const char *, NULL);    }    /** set inverse LUT for presentation transformation.     *  this LUT transform is e.g. used for DICOM print (12->8, 8->12 bit)     *  possibly active presentation LUT will not be considered !     *     ** @param  data         contains LUT data     *  @param  descriptor   describes LUT structure     *  @param  ignoreDepth  ignore third value of LUT descriptor if OFTrue.     *                       Determine bits per table entry automatically from max value.     *     ** @return true if successful, false otherwise     */    inline int setInversePresentationLut(const DcmUnsignedShort &data,                                         const DcmUnsignedShort &descriptor,                                         const OFBool ignoreDepth = OFFalse)    {        return ((Image != NULL) && (Image->getMonoImagePtr() != NULL)) ?            Image->getMonoImagePtr()->setInversePresentationLut(data, descriptor, ignoreDepth) : 0;    } // --- overlays: return true (!0) if successful (see also 'diovlay.cc') //               only applicable to grayscale images    /** add specified plane to group of additional overlay planes.     *  replaces old overlay plane if group number already exists.     *     ** @param  group        group number (0x60nn) of overlay plane     *  @param  width        width of overlay plane (in pixels)     *  @param  height       height of overlay plane (in pixels)     *  @param  left_pos     x coordinate of plane orgin (referring to image origin)     *  @param  top_pos      y coordinate of plane origin     *  @param  data         overlay plane data (dcmdata element)     *  @param  label        overlay plane label     *  @param  description  overlay plane description     *  @param  mode         display mode (see 'diutils.h')     *     ** @return false (0) if an error occurred, true otherwise (1 = added new plane,     *                                                          2 = replaced existing plane)     */    inline int addOverlay(const unsigned int group,                          const signed int left_pos,                          const signed int top_pos,                          const unsigned int width,                          const unsigned int height,                          const DcmOverlayData &data,                          const DcmLongString &label,                          const DcmLongString &description,                          const EM_Overlay mode = EMO_Default)    {        return ((Image != NULL) && (Image->getMonoImagePtr() != NULL)) ?            Image->getMonoImagePtr()->addOverlay(group, left_pos, top_pos, width, height, data, label, description, mode) : 0;    }    /** remove specified (additional) overlay plane     *     ** @param  group  group number (0x60nn) of overlay plane     *     ** @return false (0) if an error occurred (e.g. plane doesn't exist), true otherwise     */    inline int removeOverlay(const unsigned int group)    {        return ((Image != NULL) && (Image->getOverlayPtr(1) != NULL)) ?            Image->getOverlayPtr(1)->removePlane(group) : 0;    }    /** remove all additional overlay planes     *     ** @return false (0) if an error occurred, true otherwise (1 = all planes deleted,     *                                                          2 = no planes to be deleted)     */    inline int removeAllOverlays()    {        return ((Image != NULL) && (Image->getMonoImagePtr() != NULL)) ?            Image->getMonoImagePtr()->removeAllOverlays() : 0;    }    /** check whether specified overlay plane is visible/activated.     *  see show/hideOverlay() to modifiy the visibility status.     *     ** @param  plane  number (0..15) or group number (0x60nn) of overlay plane     *  @param  idx    index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return true (1) if overlay plane is visible, false (0) otherwise     */    inline int isOverlayVisible(const unsigned int plane,                                const unsigned int idx = 0)    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?            Image->getOverlayPtr(idx)->isPlaneVisible(plane) : 0;    }    /** activate specified overlay plane     *     ** @param  plane  number (0..15) or group number (0x60nn) of overlay plane     *  @param  idx    index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return false (0) if an error occurred, true otherwise (1 = plane successfully activated,     *                                                          2 = plane has already been visible)     */    inline int showOverlay(const unsigned int plane,                           const unsigned int idx = 0)    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?            Image->getOverlayPtr(idx)->showPlane(plane) : 0;    }    /** activate specified overlay plane and change some parameters     *     ** @param  plane   number (0..15) or group number (0x60nn) of overlay plane     *  @param  mode    display mode (see 'diutils.h')     *  @param  fore    plane's foreground color (in percent, default: 1.0)     *  @param  thresh  treshhold value (in percent, default: 0.5), only for EMO_TreshholdReplace     *  @param  idx     index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return false (0) if an error occurred, true otherwise     */    inline int showOverlay(const unsigned int plane,                           const EM_Overlay mode,                           const double fore = 1.0,                           const double thresh = 0.5,                           const unsigned int idx = 0)    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?            Image->getOverlayPtr(idx)->showPlane(plane, fore, thresh, mode) : 0;    }    /** activate specified overlay plane and change 'pvalue' (only for bitmap shutters)     *     ** @param  plane   number (0..15) or group number (0x60nn) of overlay plane     *  @param  pvalue  P-value used to display overlay plane     *     ** @return false (0) if an error occurred, true otherwise     */    inline int showOverlay(const unsigned int plane,                           const Uint16 pvalue)    {        return ((Image != NULL) && (Image->getOverlayPtr(1) != NULL)) ?            Image->getOverlayPtr(1)->showPlane(plane, pvalue) : 0;    }    /** activate all overlay planes (make them visible)     *     ** @param  idx  index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return false (0) if an error occurred, true otherwise (1 = planes have been successfully activated,     *                                                          2 = no planes to be activated)     */    inline int showAllOverlays(const unsigned int idx = 0)    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?            Image->getOverlayPtr(idx)->showAllPlanes() : 0;    }    /** activate all overlay planes and set specified parameters     *     ** @param  mode    display mode (see 'diutils.h')     *  @param  fore    plane's foreground color (in percent, default: 1.0)     *  @param  thresh  treshhold value (in percent, default: 0.5), only for EMO_TreshholdReplace     *  @param  idx     index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return false (0) if an error occurred, true otherwise (1 = planes have been successfully activated,     *                                                          2 = no planes to be activated)     */    inline int showAllOverlays(const EM_Overlay mode,                               const double fore = 1,                               const double thresh = 0.5,                               const unsigned int idx = 0)    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?            Image->getOverlayPtr(idx)->showAllPlanes(fore, thresh, mode) : 0;    }    /** deactivate specified overlay plane     *     ** @param  plane  number (0..15) or group number (0x60nn) of overlay plane     *  @param  idx    index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return false (0) if an error occurred, true otherwise (1 = plane successfully deactivated,     *                                                          2 = plane has already been invisible)     */    inline int hideOverlay(const unsigned int plane,                           const unsigned int idx = 0)    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?            Image->getOverlayPtr(idx)->hidePlane(plane) : 0;    }    /** deactivate all overlay planes (make them invisible)     *     ** @param  idx  index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return false (0) if an error occurred, true otherwise (1 = planes have been successfully deactivated,     *                                                          2 = no planes to be deactivated)     */    inline int hideAllOverlays(const unsigned int idx = 0)    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?            Image->getOverlayPtr(idx)->hideAllPlanes() : 0;    }    /** move origin of specified overlay plane to given position     *     ** @param  plane     number (0..15) or group number (0x60nn) of overlay plane     *  @param  left_pos  x coordinate of new plane origin (origin = 0)     *  @param  top_pos   y coordinate of new plane origin (origin = 0)     *  @param  idx       index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return false (0) if an error occurred, true otherwise (1 = plane has been successfully moved,     *                                                          2 = old and new position are equal, nothing to do)     */    inline int placeOverlay(const unsigned int plane,                            const signed int left_pos,                            const signed int top_pos,                            const unsigned int idx = 0)    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?            Image->getOverlayPtr(idx)->placePlane(plane, left_pos, top_pos) : 0;    }    /** get number of overlay planes     *     ** @param  idx  index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return number of overlay planes stored in the image     */    inline unsigned int getOverlayCount(const unsigned int idx = 0) const    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?            Image->getOverlayPtr(idx)->getCount() : 0;    }    /** get group number of specified overlay plane     *     ** @param  plane  number (0..15) or group number (0x60nn) of overlay plane     *  @param  idx    index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return group number of given overlay plane if successful, false (0) otherwise     */    inline unsigned int getOverlayGroupNumber(const unsigned int plane,                                              const unsigned int idx = 0) const    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?            Image->getOverlayPtr(idx)->getPlaneGroupNumber(plane) : 0;    }    /** get label of specified overlay plane     *     ** @param  plane  number (0..15) or group number (0x60nn) of overlay plane     *  @param  idx    index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return pointer to overlay plane label if successful, false (NULL) otherwise     */    inline const char *getOverlayLabel(const unsigned int plane,                                       const unsigned int idx = 0) const    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?            Image->getOverlayPtr(idx)->getPlaneLabel(plane) : OFstatic_cast(const char *, NULL);    }    /** get description of specified overlay plane     *     ** @param  plane  number (0..15) or group number (0x60nn) of overlay plane     *  @param  idx    index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return pointer to overlay plane description if successful, false (NULL) otherwise     */    inline const char *getOverlayDescription(const unsigned int plane,                                             const unsigned int idx = 0) const    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?            Image->getOverlayPtr(idx)->getPlaneDescription(plane) : OFstatic_cast(const char *, NULL);    }    /** get mode of specified overlay plane     *     ** @param  plane  number (0..15) or group number (0x60nn) of overlay plane     *  @param  idx    index of overlay group (0 = dataset, 1 = additional), default: 0     *     ** @return mode of overlay plane if succesful, EMO_Default otherwise     */    inline EM_Overlay getOverlayMode(const unsigned int plane,                                     const unsigned int idx = 0) const    {        return ((Image != NULL) && (Image->getOverlayPtr(idx) != NULL)) ?

⌨️ 快捷键说明

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