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

📄 dvpssp.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 4 页
字号:
   *  @param studyUID Study UID of the image   *  @param seriesUID series UID of the image   *  @param instanceUID instance UID of the image   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition getImageReference(size_t idx, const char *&studyUID, const char *&seriesUID, const char *&instanceUID)  {    return imageBoxContentList.getImageReference(idx, studyUID, seriesUID, instanceUID);  }  /** returns a description of the currently activated Presentation LUT (if   *  any) in terms of the Presentation LUT matching rule (see description   *  of enum type for details).   *  @return Presentation LUT alignment   */  DVPSPrintPresentationLUTAlignment getReferencedPresentationLUTAlignment() { return referencedPresentationLUTAlignment; }  /** Requests the properties of the printer (Printer SOP Instance N-GET).   *  The properties are not returned, but if the message handler is switched to "dump mode",   *  the DIMSE communication will be printed.   *  @param printHandler print communication handler, association must be open.   *  @return EC_Normal upon success, an error code otherwise.   */  OFCondition printSCUgetPrinterInstance(DVPSPrintMessageHandler& printHandler);  /** checks whether a presentation LUT or LUT shape is active in this stored print object.   *  In this case, if the printer supports the Presentation LUT SOP class,   *  a Presentation LUT SOP Instance is created in the printer.   *  @param printHandler print communication handler, association must be open.   *  @param printerRequiresMatchingLUT true if printer requires presentation LUTs matching the image depth   *  @param printerLUTRenderingPreferred true if SCP side presentation LUTs should be preferred   *    even if printer supports 12-bit image transmission.   *  @param printerSupports12Bit true if printer supports 12 bit transmission   *  @return EC_Normal upon success, an error code otherwise.   */  OFCondition printSCUpreparePresentationLUT(     DVPSPrintMessageHandler& printHandler,     OFBool printerRequiresMatchingLUT,     OFBool printerLUTRenderingPreferred,     OFBool printerSupports12Bit);  /** Creates a DICOM Basic Film Session SOP Instance in the printer.   *  @param printHandler print communication handler, association must be open.   *  @param dset DICOM dataset containing all Basic Film Session attributes managed outside this class   *  @param plutInSession true if printer expects referenced presentation LUT sequence, illumination   *    and reflected ambient light in basic film session, false if it expects them in basic film box.   *  @return EC_Normal upon success, an error code otherwise.   */  OFCondition printSCUcreateBasicFilmSession(    DVPSPrintMessageHandler& printHandler,    DcmDataset& dset,    OFBool plutInSession);  /** Creates a DICOM Basic Film Box SOP Instance in the printer.   *  This method only allows one basic film box to exist at any time -   *  collation is not supported.   *  @param printHandler print communication handler, association must be open.   *  @param plutInSession true if printer expects referenced presentation LUT sequence, illumination   *    and reflected ambient light in basic film session, false if it expects them in basic film box.   *  @return EC_Normal upon success, an error code otherwise.   */  OFCondition printSCUcreateBasicFilmBox(DVPSPrintMessageHandler& printHandler, OFBool plutInSession);  /** Transmits a DICOM image to the printer (Basic Grayscale Image Box N-SET).   *  @param printHandler print communication handler, association must be open.   *  @param idx index of the image reference from which the Image Box settings are taken,   *     must be < getNumberOfImages().   *  @param image DICOM image to be printed   *  @param useMonochrome1 if true, the image is transmitted in MONOCHROME1 photometric interpretation.   *    Default is false, image is transmitted in MONOCHROME2 in this case.   *  @return EC_Normal upon success, an error code otherwise.   */  OFCondition printSCUsetBasicImageBox(    DVPSPrintMessageHandler& printHandler,    size_t idx,    DicomImage& image,    OFBool useMonochrome1=OFFalse);  /** Transmits a DICOM annotation to the printer (Basic Annotation Box N-SET).   *  @param printHandler print communication handler, association must be open.   *  @param idx index of the annotation from which the settings are taken,   *     must be < getNumberOfAnnotations().   *  @return EC_Normal upon success, an error code otherwise.   */  OFCondition printSCUsetBasicAnnotationBox(    DVPSPrintMessageHandler& printHandler,    size_t idx);  /** Prints the current DICOM Basic Film Box SOP Instance.   *  @param printHandler print communication handler, association must be open.   *  @return EC_Normal upon success, an error code otherwise.   */  OFCondition printSCUprintBasicFilmBox(DVPSPrintMessageHandler& printHandler);  /** Prints the current DICOM Basic Film Session.   *  @param printHandler print communication handler, association must be open.   *  @return EC_Normal upon success, an error code otherwise.   */  OFCondition printSCUprintBasicFilmSession(DVPSPrintMessageHandler& printHandler);  /** Deletes all objects currently present in the print association.   *  @param printHandler print communication handler, association must be open.   *  @return EC_Normal upon success, an error code otherwise.   */  OFCondition printSCUdelete(DVPSPrintMessageHandler& printHandler);  /** sets the illumination to be used   *  with the print Presentation LUT SOP Class.   *  @param value new attribute value, in cd/m2.   *    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 setPrintIllumination(Uint16 value);  /** gets the current illumination setting   *  used with the print Presentation LUT SOP Class.   *  @return illumination in cd/m2   */  Uint16 getPrintIllumination();  /** sets the reflected ambient light to be used   *  with the print Presentation LUT SOP Class.   *  @param value new attribute value, in cd/m2.   *    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 setPrintReflectedAmbientLight(Uint16 value);  /** gets the current reflected ambient light setting   *  used with the print Presentation LUT SOP Class.   *  @return reflected ambient light in cd/m2   */  Uint16 getPrintReflectedAmbientLight();  /** performs a Print SCP Basic Film Box N-CREATE operation on a newly   *  created instance of this class. The results of the operation are   *  stored in the objects passed as rsp, rspDataset and   *  globalPresentationLUTList.   *  @param cfg config file facility   *  @param cfgname symbolic printer name in config file   *  @param rqDataset N-CREATE request dataset, may be NULL   *  @param rsp N-CREATE response message   *  @param rspDataset N-CREATE response dataset passed back in this parameter   *  @param presentationLUTnegotiated   *    OFTrue if support for the Presentation LUT SOP class   *    has been negotiated at association negotiation and is supported on   *    Basic Film Box level   *  @param globalPresentationLUTList   *    list of presentation LUTs managed by the Print SCP.   *    If a SCP default Presentation LUT needs to be created as the result   *    of the N-CREATE operation, it is stored in this list.   *  @param filmSessionUID   *    SOP instance UID of the Basic Film Session object   *  @param study study UID to be used when storing Stored Print or image objects   *  @param psSeries series UID to be used when storing Stored Print objects   *  @param imgSeries series UID to be used when storing image objects (Hardcopy Grayscale)   *  @return OFTrue if N-CREATE was successful, OFFalse otherwise.   */  OFBool printSCPCreate(    DVConfiguration& cfg,    const char *cfgname,    DcmDataset *rqDataset,    T_DIMSE_Message& rsp,    DcmDataset *& rspDataset,    OFBool presentationLUTnegotiated,    DVPSPresentationLUT_PList& globalPresentationLUTList,    const char *filmSessionUID,    DcmUniqueIdentifier& study,    DcmUniqueIdentifier& psSeries,    DcmUniqueIdentifier& imgSeries);  /** performs a Print SCP Basic Film Box N-SET operation on an instance of   *  this class. The results of the N-SET operation are stored in the   *  objects passed as rsp and rspDataset.   *  @param cfg config file facility   *  @param cfgname symbolic printer name in config file   *  @param rqDataset N-SET request dataset   *  @param rsp N-SET response message   *  @param rspDataset N-SET response dataset passed back in this parameter   *  @param presentationLUTnegotiated   *    OFTrue if support for the Presentation LUT SOP class   *    has been negotiated at association negotiation and is supported on   *    Basic Film Box level   *  @param globalPresentationLUTList   *    list of presentation LUTs managed by the Print SCP   *  @return OFTrue if N-SET was successful, OFFalse otherwise.   */  OFBool printSCPSet(    DVConfiguration& cfg,    const char *cfgname,    DcmDataset *rqDataset,    T_DIMSE_Message& rsp,    DcmDataset *& rspDataset,    OFBool presentationLUTnegotiated,    DVPSPresentationLUT_PList& globalPresentationLUTList);  /** checks whether the given UID string matches the film box UID.   *  @param c uid to be compared   *  @return OFTrue if equal, OFFalse otherwise   */  OFBool isFilmBoxInstance(const char *c) { if (c && (filmBoxInstanceUID == c)) return OFTrue; else return OFFalse; }  /** checks whether the Presentation LUT with the given UID   *  is referenced by this Stored Print object on the film box level.   *  Presentation LUT references on Image Box level are ignored.   *  @param c uid to be compared   *  @return OFTrue if equal, OFFalse otherwise   */  OFBool usesPresentationLUT(const char *c);  /** looks up the image box with the given SOP instance UID in the image box list   *  and returns a pointer to a new object containing a copy of this   *  image box. If the object is not found, NULL is returned.   *  @param uid SOP instance UID of the image box to be looked up   *  @return pointer to copied image box object, may be NULL.   */  DVPSImageBoxContent *duplicateImageBox(const char *uid) { return imageBoxContentList.duplicateImageBox(uid); }  /** checks whether any of the image boxes managed by the image box list   *  has the same position as the given one, but a different   *  SOP instance UID.  This is used during a Print SCP basic grayscale   *  image box N-SET operation to check whether an image position clash exists.   *  @param uid SOP instance UID of the image box to be looked up   *  @param position image position to be looked up   */  OFBool haveImagePositionClash(const char *uid, Uint16 position)  { return imageBoxContentList.haveImagePositionClash(uid, position); }  /** adds the given image box object to the image box list.   *  Any other object existing in the list with the same SOP instance UID is removed.   *  Used during a Print SCP basic grayscale image box N-SET operation.   *  @param newImageBox new image box object to be added to the list.   */  void replaceImageBox(DVPSImageBoxContent *newImageBox) { imageBoxContentList.replace(newImageBox); }  /** updates the list of Presentation LUTs managed by the Stored Print object   *  from a global list. If a Presentation LUT is active on Film Box level, the corresponding   *  LUT is copied from the global presentation LUT list.   *  Presentation LUT references on Image Box level are ignored.   *  Used during a Print SCP N-ACTION operation.   *  @param globalPresentationLUTList list of presentation LUTs managed by the Print SCP   */  void updatePresentationLUTList(DVPSPresentationLUT_PList& globalPresentationLUTList);  /** sets a new log stream   *  @param stream new log stream, NULL for default logstream   *  @param verbMode verbose mode flag   *  @param dbgMode debug mode flag   */  void setLog(OFConsole *stream, OFBool verbMode, OFBool dbgMode);  /** checks whether the given Presentation LUT type could be used together   *  with all image boxes in this film box on a Print SCP that requires a matching   *  alignment between a Presentation LUT and the image pixel data.   *  @param align LUT alignment type   *  @return OFTrue if matching, OFFalse otherwise   */  OFBool matchesPresentationLUT(DVPSPrintPresentationLUTAlignment align) const  {    return imageBoxContentList.matchesPresentationLUT(align);  }  /** replaces the settings for illumination, reflected ambient light and   *  referenced Presentation LUT in this film box.   *  Used by a Print SCP if Presentation LUT is implemented on Film Session   *  level.   *  @param newIllumination new value for illumination   *  @param newReflectedAmbientLight new value for reflectedAmbientLight   *  @param newReferencedPLUT new value for referenced presentation LUT instance UID   *  @param newAlignment new alignment type of active presentation LUT   */  void overridePresentationLUTSettings(      DcmUnsignedShort& newIllumination,      DcmUnsignedShort& newReflectedAmbientLight,      DcmUniqueIdentifier& newReferencedPLUT,      DVPSPrintPresentationLUTAlignment newAlignment);  /** checks whether any of the image boxes has an image box position   *  assigned. If no image box position is assigned, the stored print object   *  cannot be written and a Print SCP should return a warning   *  status upon receipt of an N-ACTION request.   *  @return OFTrue if empty page (no image box position assigned), OFFalse otherwise.   */  OFBool emptyPageWarning() { return imageBoxContentList.emptyPageWarning(); } private:  /// private undefined assignment operator  DVPSStoredPrint& operator=(const DVPSStoredPrint&);  /* checks if given SOP class UID is an image storage SOP class   * @return OFTrue if image SOP class, OFFalse otherwise.   */  OFBool isImageStorageSOPClass(OFString& sopclassuid);  /** create default values for all missing type 1 elements.   *  Called before a stored print object is written.   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition createDefaultValues();  /** writes a Referenced Presentation LUT SQ to the given   *  dataset. Helper function used in the more general write() method.   *  @param dset the dataset to which the data is written   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition addReferencedPLUTSQ(DcmItem &dset);  /** writes a Referenced Presentation LUT SQ, Illumination and   *  reflected ambient light to the given dataset.   *  Helper function used when creating Basic Film Session or   *  Basic Film Box.   *  @param dset the dataset to which the data is written   *  @return EC_Normal if successful, an error code otherwise.   */  OFCondition addPresentationLUTReference(DcmItem& dset);  /** invalidates the cached number of columns and rows   */  void invalidateCache();

⌨️ 快捷键说明

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