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

📄 dviface.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 5 页
字号:
/* * *  Copyright (C) 1998-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: dcmpstat * *  Author: Marco Eichelberg, Joerg Riesmeier * *  Purpose: *    classes: DVInterface * *  Last Update:      $Author: meichel $ *  Update Date:      $Date: 2005/12/08 16:03:31 $ *  CVS/RCS Revision: $Revision: 1.91 $ *  Status:           $State: Exp $ * *  CVS/RCS Log at end of file * */#ifndef DVIFACE_H#define DVIFACE_H#include "dcmtk/config/osconfig.h"   /* make sure OS specific configuration is included first */#include "dcmtk/ofstd/ofstream.h"#include "dcmtk/dcmdata/dctk.h"#include "dcmtk/dcmpstat/dvpscf.h"     /* for class DVConfiguration */#include "dcmtk/dcmpstat/dvpstat.h"    /* for class DVPresentationState */#include "dcmtk/dcmqrdb/dcmqridx.h"   /* for struct IdxRecord */#include "dcmtk/ofstd/ofstring.h"   /* for class OFString */#include "dcmtk/dcmpstat/dvcache.h"    /* for index file caching */class OFLogFile;class DicomImage;class DiDisplayFunction;class DVPSStoredPrint;class DVPSPrintMessageHandler;class DSRDocument;class DVSignatureHandler;/** Interface class for the Softcopy Presentation State viewer. *  This class manages the database facilities, allows to start and stop *  network transactions and gives access to images and presentation states. */class DVInterface: public DVConfiguration{ public:   /** constructor.    *  @param config_file filename (path) of the config file to be used    *     by the interface object. The caller should make sure that the config file    *     really exists because the constructor cannot return an error status.    *     If a non-existing filename (or NULL) is passed, an empty configuration file    *     is assumed.    *  @param useLog (optional) flag specifying whether a general log file should be used    *     (config entry GENERAL\APPLICATION\LOGFILE).    */    DVInterface(const char *config_file = NULL, OFBool useLog = OFFalse);    /** destructor.     */    virtual ~DVInterface();    /* load images, presentation states and structured reports */    /** loads an image which is contained in the database     *  and creates a default presentation state for the image.     *  This method acquires a database lock which must be explicitly freed by the user.     *  @param studyUID study instance UID of the image     *  @param seriesUID series instance UID of the image     *  @param instanceUID SOP instance UID of the image     *  @param changeStatus if true the image file is marked 'reviewed' (not new)     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition loadImage(const char *studyUID, const char *seriesUID, const char *instanceUID, OFBool changeStatus = OFFalse);    /** loads an image (which need not be contained in the database)     *  and creates a default presentation state for the image.     *  This method does not acquire a database lock.     *  @param filename path and filename of the image to be loaded     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition loadImage(const char *filename);    /** loads an image which referenced by the current presentation     *  state and needs to be contained in the database.     *  This method acquires a database lock which must be explicitly freed by the user.     *  @param idx index of the image to be loaded (< getNumberOfImageReferences())     *  @param changeStatus if true the image file is marked 'reviewed' (not new)     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition loadReferencedImage(size_t idx, OFBool changeStatus = OFFalse);    /** loads a presentation state which is contained in the database.     *  The first image referenced in presentation state is also looked up in the     *  database, loaded, and attached to the presentation state.     *  This method acquires a database lock which must be explicitly freed by the user.     *  @param studyUID study instance UID of the presentation state     *  @param seriesUID series instance UID of the presentation state     *  @param instanceUID SOP instance UID of the presentation state     *  @param changeStatus if true the pstate and (first) image file is marked 'reviewed' (not new)     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition loadPState(const char *studyUID, const char *seriesUID, const char *instanceUID, OFBool changeStatus = OFFalse);    /** loads a presentation state and an image (which need not be contained in the database)     *  and attaches the image to the presentation state (if specified, otherwise the current     *  image will be used).     *  This method does not acquire a database lock.     *  @param pstName path and filename of the presentation state to be loaded     *  @param imgName path and filename of the image to be loaded     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition loadPState(const char *pstName, const char *imgName = NULL);    /** loads a structured report which is contained in the database.     *  This method acquires a database lock which must be explicitly freed by the user.     *  @param studyUID study instance UID of the structured report     *  @param seriesUID series instance UID of the structured report     *  @param instanceUID SOP instance UID of the structured report     *  @param changeStatus if true the structured report file is marked 'reviewed' (not new)     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition loadStructuredReport(const char *studyUID, const char *seriesUID, const char *instanceUID, OFBool changeStatus = OFFalse);    /** loads a structured report (which need not be contained in the database).     *  This method does not acquire a database lock.     *  @param filename path and filename of the structured report to be loaded     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition loadStructuredReport(const char *filename);    /** loads a structured reporting "template".     *  This "template" is just a DICOM Structured Reporting file which resides in a     *  special sub-folder and is referenced by the configuration file.  This meachanism     *  should facilitate the creation of new reports since one does not have to start     *  with a completely empty report.     *  Please note that the current structured report is replaced by the specified     *  "template".  New study/series/instance UIDs are generated automatically for the     *  new report.     *  This method does not acquire a database lock.     *  @param reportID report identifier, as returned by getReportID().     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition loadSRTemplate(const char *reportID);    /** saves the current presentation state in the same directory     *  in which the database index file resides. The filename is generated automatically.     *  A new SOP Instance UID is assigned whenever a presentation state is saved.     *  After successfully storing the presentation state, the database index is updated     *  to include the new object.     *  This method releases under any circumstances the database lock if it exists.     *  @param replaceSOPInstanceUID flag indicating whether the     *    SOP Instance UID should be replaced by a new UID.     *    If true, a new UID is always generated. If false, a new     *    UID is generated only if no UID has been assigned before.     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition savePState(OFBool replaceSOPInstanceUID);    /** saves the current presentation state in a file with the given path and filename.     *  A new SOP Instance UID is assigned whenever a presentation state is saved.     *  This method does not acquire a database lock and does not register     *  the saved presentation state in the database.     *  @param filename path and filename under which the presentation state is to be saved     *  @param replaceSOPInstanceUID flag indicating whether the     *    SOP Instance UID should be replaced by a new UID.     *    If true, a new UID is always generated. If false, a new     *    UID is generated only if no UID has been assigned before.     *  @param explicitVR selects the transfer syntax to be written. True (the default) selects     *    Explicit VR Little Endian, False selects Implicit VR Little Endian.     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition savePState(const char *filename, OFBool replaceSOPInstanceUID, OFBool explicitVR=OFTrue);    /** saves the DICOM image that is currently attached to the presentation state     *  in a file with the given path and filename.     *  This method does not acquire a database lock and does not register     *  the saved presentation state in the database.     *  @param filename path and filename under which the image is to be saved     *  @param explicitVR selects the transfer syntax to be written. True (the default) selects     *    Explicit VR Little Endian, False selects Implicit VR Little Endian.     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition saveCurrentImage(const char *filename, OFBool explicitVR=OFTrue);    /** saves the current structured report in the same directory in which the database index     *  file resides.  The filename is generated automatically.  A new SOP Instance UID is not     *  assigned automatically unless the method getStructuredReport().createRevisedVersion()     *  is called (see documentation in file dcmsr/dsrdoc.h).  This is not required for the     *  first version of a document (i.e. directly after program start or calling the method     *  getStructuredReport().createNewDocument()).     *  After successfully storing the structured report, the database index is updated     *  to include the new object.     *  This method releases under any circumstances the database lock if it exists.     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition saveStructuredReport();    /** saves the current structured report in a file with the given path and filename.     *  A new SOP Instance UID is not assigned automatically unless the method     *  getStructuredReport().createRevisedVersion() is called (see documentation in file     *  dcmsr/dsrdoc.h).  This is not required for the first version of a document (i.e.     *  directly after program start or calling the method getStructuredReport().createNewDocument()).     *  This method does not acquire a database lock and does not register the saved structured     *  report in the database.     *  @param filename path and filename under which the structured report is to be saved     *  @param explicitVR selects the transfer syntax to be written. True (the default) selects     *    Explicit VR Little Endian, False selects Implicit VR Little Endian.     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition saveStructuredReport(const char *filename, OFBool explicitVR=OFTrue);    /** adds an image which is contained in the database     *  to the list of referenced images of the current presentation state.     *  This method acquires a database lock which must be explicitly freed by the user.     *  @param studyUID study instance UID of the image     *  @param seriesUID series instance UID of the image     *  @param instanceUID SOP instance UID of the image     *  @return EC_Normal upon success, an error code otherwise.     */    OFCondition addImageReferenceToPState(const char *studyUID, const char *seriesUID, const char *instanceUID);    /** gets the number of image references contained in the current presentation state.     *  @return number of image references, 0 if an error occurred.     */    size_t getNumberOfImageReferences();    /** returns a reference to the current presentation state.     *  This reference will become invalid when the DVInterface object is deleted,

⌨️ 快捷键说明

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