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

📄 dvpsibl.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * *  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 * *  Purpose: *    classes: DVPSImageBoxContent_PList * *  Last Update:      $Author: meichel $ *  Update Date:      $Date: 2005/12/08 16:03:51 $ *  CVS/RCS Revision: $Revision: 1.23 $ *  Status:           $State: Exp $ * *  CVS/RCS Log at end of file * */#ifndef __DVPSIBL_H__#define __DVPSIBL_H__#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */#include "dcmtk/ofstd/oflist.h"#include "dcmtk/dcmdata/dctk.h"#include "dcmtk/dcmpstat/dvpstyp.h"     /* for enum types */class DVPSImageBoxContent;class DVPSPresentationLUT_PList;/** the list of Image Boxes contained in a stored print object. *  This class manages the data structures comprising one complete *  Image Box Content Sequence in a Stored Print object. */class DVPSImageBoxContent_PList{public:  /// default constructor  DVPSImageBoxContent_PList();    /// copy constructor  DVPSImageBoxContent_PList(const DVPSImageBoxContent_PList& copy);  /** clone method.   *  @return a pointer to a new DVPSImageBoxContent_PList object containing   *  a deep copy of this object.   */  DVPSImageBoxContent_PList *clone() { return new DVPSImageBoxContent_PList(*this); }  /// destructor  virtual ~DVPSImageBoxContent_PList();  /** reads a list of image boxes (ImageBoxContentSequence) from a DICOM dataset.   *  The DICOM elements of the image boxes are copied from the dataset to this object.   *  The completeness of all items (presence of all required elements,   *  value multiplicity) is checked.   *  If this method returns an error code, the object is in undefined state afterwards.   *  @param dset the DICOM dataset from which the sequence is to be read   *  @param presentationLUTList list of presentation LUTs which may be referenced   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition read(DcmItem &dset, DVPSPresentationLUT_PList& presentationLUTList);    /** writes the list of image boxes managed by this object to a DICOM dataset.   *  Copies of the DICOM element managed by this object are inserted into   *  the DICOM dataset.   *  @param dset the DICOM dataset to which the ImageBoxContentSequence is written   *  @param writeRequestedImageSize if false, the Requested Image Size attributes are not written,   *    e.g. because they are not supported by the target printer.   *  @param numItems the number of items (from the beginning of the list) to be written.   *    Default: all items are written.   *  @param ignoreEmptyImages if true, all image boxes without image box position are ignored   *    when writing.   *  @param writeReferencedPLUTSQ if false, the Referenced Presentation LUT Sequence is not written,   *    e.g. because a "general" presentation LUT is used instead of those referenced by the image boxes.   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition write(    DcmItem &dset,    OFBool writeRequestedImageSize,    size_t numItems,    OFBool ignoreEmptyImages,    OFBool writeReferencedPLUTSQ = OFTrue);  /** reset the object to initial state.   *  After this call, the object is in the same state as after   *  creation with the default constructor.   */  void clear();  /** gets the number of image boxes in this list.   *  @return the number of image boxes.   */  size_t size() const { return list_.size(); }  /** create default values for all missing type 1 elements.   *  Called before a stored print object is written.   *  @param renumber if true, new imageBoxPosition values are created    *  @param ignoreEmptyImages if true, an empty image box position does not cause an error.   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition createDefaultValues(OFBool renumber, OFBool ignoreEmptyImages);    /** adds all image SOP classes referenced in the image box list to   *  the given sequence. Duplicate entries are suppressed.   *  @param seq sequence to be added to, should be a PrintManagementCapabilitiesSequence.   *  @param numItems number of items of this list to be taken into account.   *    Default: all items.   *  @return EC_Normal if successful, an error code otherwise.   */     OFCondition addImageSOPClasses(DcmSequenceOfItems& seq, size_t numItems=0);    /** creates a new image box object and sets the content of this image box object.   *  @param instanceuid SOP instance UID of this image box   *  @param retrieveaetitle retrieve AETITLE of the referenced image   *  @param refstudyuid study instance UID of the referenced image   *  @param refseriesuid series instance UID of the referenced image   *  @param refsopclassuid SOP class UID of the referenced image   *  @param refsopinstanceuid SOP instance UID of the referenced image   *  @param requestedimagesize requested images size for this image, default: absent   *  @param patientid patient ID for the referenced image, default: absent   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition addImageBox(    const char *instanceuid,    const char *retrieveaetitle,    const char *refstudyuid,    const char *refseriesuid,    const char *refsopclassuid,    const char *refsopinstanceuid,    const char *requestedimagesize,    const char *patientid,    const char *presentationlutuid);  /** adds the given image box object to the list managed by this object.   *  @param box image box object to be added.   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition addImageBox(DVPSImageBoxContent *box);    /** sets the (optional) requested decimate/crop behaviour   *  for all image boxes managed by this object.   *  @param value new enumerated value. The caller is responsible for   *    making sure that the selected printer supports decimate/crop   *    if a non-default value is set.   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition setRequestedDecimateCropBehaviour(DVPSDecimateCropBehaviour value);   /** deletes one of the registered images.   *  @param idx index, must be < size()   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition deleteImage(size_t idx);    /** deletes multiple of the registered images, starting with the first one.   *  @param number number of images to delete, must be <= size()   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition deleteMultipleImages(size_t number);  /** checks if one of the registered images has additional settings that are not   *  default values on the image box level.   *  @param idx index, must be < getNumberOfImages()   *  @return EC_Normal if successful, an error code otherwise.   */  OFBool imageHasAdditionalSettings(size_t idx);  /** sets the polarity for the given registered image box.   *  @param idx index, must be < getNumberOfImages()   *  @param value new attribute value (NORMAL or REVERSE), may be NULL.   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition setImagePolarity(size_t idx, const char *value);    /** sets the requested size for the given registered image box.   *  @param idx index, must be < getNumberOfImages()   *  @param value new attribute value, may be NULL.   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition setImageRequestedSize(size_t idx, const char *value);    /** sets the (optional) magnification type for the given registered image box.   *  @param idx index, must be < getNumberOfImages()   *  @param value new attribute value, may be NULL.   *    The caller is responsible for making sure   *    that the value is valid for the selected printer.   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition setImageMagnificationType(size_t idx, const char *value);    /** sets the (optional) smoothing type for the given registered image box.   *  @param idx index, must be < getNumberOfImages()   *  @param value new attribute value, may be NULL.   *    The caller is responsible for making sure   *    that the value is valid for the selected printer.   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition setImageSmoothingType(size_t idx, const char *value);    /** sets the (optional) configuration information for the given registered image box.   *  @param idx index, must be < getNumberOfImages()   *  @param value new attribute value, may be NULL.   *    The caller is responsible for making sure   *    that the value is valid for the selected printer.   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition setImageConfigurationInformation(size_t idx, const char *value);  /** sets the SOP instance UID for the given image box.   *  @param idx index, must be < getNumberOfImages()   *  @param value new attribute value, must not be NULL.   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition setImageSOPInstanceUID(size_t idx, const char *value);  /** sets magnification type, smoothing type and configuration information back to default   *  for all registered images.   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition setAllImagesToDefault();  /** gets the polarity for the given registered image box.   *  @param idx index, must be < getNumberOfImages()   *  @return polarity, may be NULL.   */  const char *getImagePolarity(size_t idx);  /** gets the requested size for the given registered image box.   *  @param idx index, must be < getNumberOfImages()   *  @return requested size, may be NULL.   */  const char *getImageRequestedSize(size_t idx);

⌨️ 快捷键说明

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