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

📄 diovlay.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * *  Copyright (C) 1996-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:  dcmimgle * *  Author:  Joerg Riesmeier * *  Purpose: DicomOverlay (Header) * *  Last Update:      $Author: meichel $ *  Update Date:      $Date: 2005/12/08 16:48:01 $ *  CVS/RCS Revision: $Revision: 1.24 $ *  Status:           $State: Exp $ * *  CVS/RCS Log at end of file * */#ifndef DIOVLAY_H#define DIOVLAY_H#include "dcmtk/config/osconfig.h"#include "dcmtk/dcmdata/dctypes.h"#include "dcmtk/ofstd/ofcast.h"#include "dcmtk/dcmimgle/diobjcou.h"#include "dcmtk/dcmimgle/diovdat.h"#include "dcmtk/dcmimgle/diovpln.h"#include "dcmtk/dcmimgle/diutils.h"/*------------------------* *  forward declarations  * *------------------------*/class DiDocument;class DcmOverlayData;class DcmLongString;/*---------------------* *  class declaration  * *---------------------*//** Class to handle a set of overlay planes */class DiOverlay  : public DiObjectCounter{ public:    /** constructor     *     ** @param  docu   pointer to dataset (encapsulated)     *  @param  alloc  bits allocated for image pixel data     */    DiOverlay(const DiDocument *docu = NULL,              const Uint16 alloc = 0);    /** constructor, clip/scale     *     ** @param  overlay   pointer to reference overlay object     *  @param  left_pos  x-coordinate of new overlay origin (offset for all planes)     *  @param  top_pos   y-coordinate of new overlay origin (offset for all planes)     *  @param  xfactor   scaling factor in x-direction     *  @param  yfactor   scaling factor in y-direction     */    DiOverlay(const DiOverlay *overlay,              const signed long left_pos,              const signed long top_pos,              const double xfactor,              const double yfactor);    /** constructor, flip     *     ** @param  overlay  pointer to reference overlay object     *  @param  horz     flip horizontally if true     *  @param  vert     flip vertically if true     *  @param  columns  width of the surrounding image     *  @param  rows     height of the surrounding image     */    DiOverlay(const DiOverlay *overlay,              const int horz,              const int vert,              const Uint16 columns,              const Uint16 rows);    /** constructor, rotate     *     ** @param  overlay  pointer to reference overlay object     *  @param  degree   angle by which the overlayplanes should be rotated     *  @param  columns  width of the surrounding image     *  @param  rows     height of the surrounding image     */    DiOverlay(const DiOverlay *overlay,              const int degree,              const Uint16 columns,              const Uint16 rows);    /** destructor     */    virtual ~DiOverlay();    /** check whether specified plane is currently visible (not hidden)     *     ** @param  plane  index of plane (starting from 0) or group number (0x6000-0x60ff)     *     ** @return true if plane is visible, false otherwise     */    int isPlaneVisible(unsigned int plane);    /** make specified plane visible     *     ** @param  plane  index of plane (starting from 0) or group number (0x6000-0x60ff)     *     ** @return status, true if successful, false otherwise     */    int showPlane(unsigned int plane);    /** make specified plane visible and set parameters     *     ** @param  plane   index of plane (starting from 0) or group number (0x6000-0x60ff)     *  @param  fore    foreground color for overlay plane (in percent: 0.0-1.0)     *  @param  thresh  threshold value for overlay plane (0.0-1.0)     *  @param  mode    new overlay mode (EMO_Default for stored mode)     *     ** @return status, true if successful, false otherwise     */    int showPlane(unsigned int plane,                  const double fore,                  const double thresh,                  const EM_Overlay mode);    /** make specified plane visible and set p-value.     *  Only applicable for bitmap shutters.     *     ** @param  plane   index of plane (starting from 0) or group number (0x6000-0x60ff)     *  @param  pvalue  p-value to be used for the overlay plane (0..65535)     *     ** @return status, true if successful, false otherwise     */    int showPlane(unsigned int plane,                  const Uint16 pvalue);    /** make all planes visible     *     ** @return status, true if successful, false otherwise     */    int showAllPlanes();    /** make all planes visible     *     ** @param  fore    foreground color for overlay planes (in percent: 0.0-1.0)     *  @param  thresh  threshold value for overlay planes (in percent: 0.0-1.0)     *  @param  mode    new overlay mode (EMO_Default for stored mode)     *     ** @return status, true if successful, false otherwise     */    int showAllPlanes(const double fore,                      const double thresh,                      const EM_Overlay mode);    /** make specified plane invisible     *     ** @param  plane  index of plane (starting from 0) or group number (0x6000-0x60ff)     *     ** @return status, true if successful, false otherwise     */    int hidePlane(unsigned int plane);    /** make all planes invisible     *     ** @return status, true if successful, false otherwise     */    int hideAllPlanes();    /** move plane to a new place     *     ** @param  plane     index of plane (starting from 0) or group number (0x6000-0x60ff)     *  @param  left_pos  new x-coordinate of the overlay plane origin     *  @param  top_pos   new y-coordinate of the overlay plane origin     *     ** @return status, true if successful, false otherwise     */    int placePlane(unsigned int plane,                   const signed int left_pos,                   const signed int top_pos);    /** get group number of specified plane     *     ** @param  plane  index of plane (starting from 0) or group number (0x6000-0x60ff)     *     ** @return group number (0x6000-0x60ff) if successful, 0 otherwise     */    unsigned int getPlaneGroupNumber(unsigned int plane) const;    /** get label of specified plane     *     ** @param  plane  index of plane (starting from 0) or group number (0x6000-0x60ff)     *     ** @return plane label if successful, NULL otherwise     */    const char *getPlaneLabel(unsigned int plane) const;    /** get description of specified plane     *     ** @param  plane  index of plane (starting from 0) or group number (0x6000-0x60ff)     *     ** @return plane description if successful, NULL otherwise     */    const char *getPlaneDescription(unsigned int plane) const;    /** get overlay mode of specified plane     *     ** @param  plane  index of plane (starting from 0) or group number (0x6000-0x60ff)     *     ** @return overlay mode if successful, EMO_Default otherwise     */    EM_Overlay getPlaneMode(unsigned int plane) const;    /** get number of overlay planes     *     ** @return number of overlay planes     */    inline unsigned int getCount() const    {        return (Data != NULL) ? Data->Count : 0;    }    /** get current x-coordinate of overlay origin.     *  This value is added to the origin of all overlay planes.     *     ** @return x-coordinate of overlay origin     */    inline signed long getLeft() const    {        return Left;    }    /** get current y-coordinate of overlay origin.     *  This value is added to the origin of all overlay planes.     *     ** @return y-coordinate of overlay origin     */    inline signed long getTop() const    {        return Top;    }    /** check whether there are any overlay planes embedded in the pixel data     *     ** @return true if there are embedded planes, false otherwise     */    int hasEmbeddedData() const;    /** add plane to list of additional overlay planes     *     ** @param  group        group number of plane to be added (0x6000-0x60ff).     *                       If group number already exists in the list of additional planes     *                       the old one is replaced. If the number exists in the list of     *                       planes stored in the image dataset the new plane hides it.     *  @param  left_pos     x-coordinate of the plane origin     *  @param  top_pos      y-coordinate of the plane origin     *  @param  columns      width of the overlay plane (in pixels)     *  @param  rows         height of the overlay plane     *  @param  data         element where the plane data is stored     *  @param  label        element where the plane label is stored     *  @param  description  element where the plane description is stored     *  @param  mode         overlay plane mode     *     ** @return status, true if successful, false otherwise     */    int addPlane(const unsigned int group,                 const signed int left_pos,                 const signed int top_pos,                 const unsigned int columns,                 const unsigned int rows,                 const DcmOverlayData &data,                 const DcmLongString &label,

⌨️ 快捷键说明

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