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

📄 dcmqrdbi.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * *  Copyright (C) 1993-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:  dcmqrdb * *  Author:  Andrew Hewett, Marco Eichelberg * *  Purpose: class DcmQueryRetrieveIndexDatabaseHandle * *  Last Update:      $Author: meichel $ *  Update Date:      $Date: 2005/12/08 16:04:22 $ *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h,v $ *  CVS/RCS Revision: $Revision: 1.4 $ *  Status:           $State: Exp $ * *  CVS/RCS Log at end of file * */#ifndef DCMQRDBI_H#define DCMQRDBI_H#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */#include "dcmtk/dcmqrdb/dcmqrdba.h"    /* for class DcmQueryRetrieveDatabaseHandle */#include "dcmtk/dcmnet/dicom.h"#include "dcmtk/dcmnet/dimse.h"#include "dcmtk/ofstd/offname.h"struct StudyDescRecord;struct DB_Private_Handle;struct DB_SmallDcmElmt;struct IdxRecord;struct DB_ElementList;class DcmQueryRetrieveConfig;#define DBINDEXFILE "index.dat"#ifndef _WIN32/* we lock image files on all platforms except Win32 where it does not work * due to the different semantics of LockFile/LockFileEx compared to flock. */#define LOCK_IMAGE_FILES#endif/** enumeration describing the levels of the DICOM Q/R information model */enum DB_LEVEL{  /// DICOM Q/R patient level  PATIENT_LEVEL,  /// DICOM Q/R study level  STUDY_LEVEL,  /// DICOM Q/R series level  SERIE_LEVEL,  /// DICOM Q/R instance level  IMAGE_LEVEL};/** This enum describes the status of one entry in the database hierarchy. An  *  entry can describe a study, a series or an instance. A study or series is  *  new exactly if all subobjects (series and instances) are new. A study or  *  series contains new subobjecs as long as any subobject (series or instance)  *  has the status objectIsNew. Instances can never have the status  *  DVIF_objectContainsNewSubobjects.  */enum DVIFhierarchyStatus{  /// object (study, series or instance) in the database is not new  DVIF_objectIsNotNew,  /// object (study, series or instance) in the database is new  DVIF_objectIsNew,  /// object (study or series) in the database is not new but contains new subobjects  DVIF_objectContainsNewSubobjects};/// upper limit for the number of studies per storage area#define DB_UpperMaxStudies              500/// upper limit for the number bytes per study#define DB_UpperMaxBytesPerStudy        0x40000000L/** This class maintains database handles based on the classical "index.dat" file. *  A database handle maintains a connection to a database and encapsulates database support for *  store, find and move/get operations. */class DcmQueryRetrieveIndexDatabaseHandle: public DcmQueryRetrieveDatabaseHandle{public:  /** Constructor. Creates and initializes a index file handle for the given    *  database storage area (storageArea).   *  @param storageArea name of storage area, must not be NULL   *  @param maxStudiesPerStorageArea maximum number of studies for this storage area,   *    needed to correctly parse the index file.   *  @param maxBytesPerStudy maximum number of bytes per study, for quota mechanism   *  @param result upon successful initialization of the database handle,   *    EC_Normal is returned in this parameter, otherwise an error code is returned.   */  DcmQueryRetrieveIndexDatabaseHandle(    const char *storageArea,    long maxStudiesPerStorageArea,    long maxBytesPerStudy,    OFCondition& result);    /** Destructor. Destroys handle, cancels any ongoing   *  request if necessary, deletes temporary files used for C-STORE and   *  sub-operations of C-MOVE.   */   ~DcmQueryRetrieveIndexDatabaseHandle();    /** set the debug level.   *  @param debug level, zero or nonzero   */  void setDebugLevel(int debugLevel);      /** Configure the DB module to perform (or not perform) checking   *  of FIND and MOVE request identifiers. Default is no checking.   *  @param checkFind checking for C-FIND parameters   *  @param checkMove checking for C-MOVE parameters   */  void setIdentifierChecking(OFBool checkFind, OFBool checkMove);    /** create a filename under which a DICOM object that is currently   *  being received through a C-STORE operation can be stored.   *  @param SOPClassUID SOP class UID of DICOM instance   *  @param SOPInstanceUID SOP instance UID of DICOM instance   *  @param newImageFileName file name is returned in this parameter.   *    Memory must be provided by the caller and should be at least MAXPATHLEN+1    *    characters. The file name generated should be an absolute file name.   *  @return EC_Normal upon normal completion, or some other OFCondition code upon failure.   */  OFCondition makeNewStoreFileName(      const char *SOPClassUID,      const char *SOPInstanceUID,      char *newImageFileName);    /** register the given DICOM object, which has been received through a C-STORE    *  operation and stored in a file, in the database.   *  @param SOPClassUID SOP class UID of DICOM instance   *  @param SOPInstanceUID SOP instance UID of DICOM instance   *  @param imageFileName file name (full path) of DICOM instance   *  @param status pointer to DB status object in which a DIMSE status code         suitable for use with the C-STORE-RSP message is set.   *  @param isNew if true, the instance is marked as "new" in the database,   *    if such a flag is maintained in the database.      *  @return EC_Normal upon normal completion, or some other OFCondition code upon failure.   */  OFCondition storeRequest(      const char *SOPClassUID,      const char *SOPInstanceUID,      const char *imageFileName,      DcmQueryRetrieveDatabaseStatus  *status,      OFBool     isNew = OFTrue );    /** initiate FIND operation using the given SOP class UID (which identifies   *  the query model) and DICOM dataset containing find request identifiers.    *  @param SOPClassUID SOP class UID of query service, identifies Q/R model   *  @param findRequestIdentifiers dataset containing request identifiers (i.e., the query)   *    The caller retains responsibility for destroying the    *    findRequestIdentifiers when no longer needed.   *  @param status pointer to DB status object in which a DIMSE status code    *    suitable for use with the C-FIND-RSP message is set. Status will be   *    PENDING if any FIND responses will be generated or SUCCESS if no FIND responses will   *    be generated (SUCCESS indicates the completion of a operation), or   *    another status code upon failure.    *  @return EC_Normal upon normal completion, or some other OFCondition code upon failure.   */  OFCondition startFindRequest(      const char *SOPClassUID,      DcmDataset *findRequestIdentifiers,      DcmQueryRetrieveDatabaseStatus *status);                       /** return the next available FIND response as a new DICOM dataset.   *  @param findResponseIdentifiers DICOM dataset returned in this parameter.   *    The caller is responsible for destroying the findResponseIdentifiers   *    when no longer needed.   *  @param status pointer to DB status object in which a DIMSE status code    *    suitable for use with the C-FIND-RSP message is set. Status will be   *    PENDING if more FIND responses will be generated or SUCCESS if no more    *    FIND responses will be generated (SUCCESS indicates the completion of    *    a operation), or another status code upon failure.    *  @return EC_Normal upon normal completion, or some other OFCondition code upon failure.   */  OFCondition nextFindResponse(      DcmDataset **findResponseIdentifiers,      DcmQueryRetrieveDatabaseStatus *status);     /** cancel the ongoing FIND request, stop and reset every running operation   *  associated with this request, delete existing temporary files.   *  @param status pointer to DB status object in which a DIMSE status code    *    suitable for use with the C-FIND-RSP message is set.    *  @return EC_Normal upon normal completion, or some other OFCondition code upon failure.   */  OFCondition cancelFindRequest(DcmQueryRetrieveDatabaseStatus *status);            /** initiate MOVE operation using the given SOP class UID (which identifies   *  the retrieve model) and DICOM dataset containing move request identifiers.    *  @param SOPClassUID SOP class UID of retrieve service, identifies Q/R model   *  @param moveRequestIdentifiers dataset containing request identifiers (i.e., the query)   *    The caller retains responsibility for destroying the    *    moveRequestIdentifiers when no longer needed.   *  @param status pointer to DB status object in which a DIMSE status code    *    suitable for use with the C-MOVE-RSP message is set. Status will be   *    PENDING if any MOVE responses will be generated or SUCCESS if no MOVE responses will   *    be generated (SUCCESS indicates the completion of a operation), or   *    another status code upon failure.    *  @return EC_Normal upon normal completion, or some other OFCondition code upon failure.   */  OFCondition startMoveRequest(      const char *SOPClassUID,      DcmDataset *moveRequestIdentifiers,      DcmQueryRetrieveDatabaseStatus *status);    /** Constructs the information required for the next available C-MOVE    *  sub-operation (the image SOP class UID, SOP Instance UID and an   *  imageFileName containing the requested data).    *  @param SOPClassUID pointer to string of at least 65 characters into    *    which the SOP class UID for the next DICOM object to be transferred is copied.   *  @param SOPInstanceUID pointer to string of at least 65 characters into 

⌨️ 快捷键说明

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