Print Management SCU

The DICOM standard defines the Print Management Service Class to facilitate the printing of images and image related data. The functionality offered by the LEADDicomPrintSCU COM class simplifies the process of building a Print Management Service Class User (Print SCU). The COM Object can be used to handle all the Meta SOP Classes and all the SOP Classes defined by the Print Management Service Class.

In order to facilitate the handling of Print Management sessions, the functionality is divided among several COM objects, each of which is specialized in a set of related functions. Most of these objects are exposed directly by the LEADDicomPrintSCU coclass as properties on the ILEADDicomPrintSCU interface. The whole functionality can be divided into the following categories:

Association

The Association with the Print Management Service Class Provider (Print SCP) can be simply established by calling the Associate method. The SOP/Meta SOP Classes supported by the Print SCU itself are specified when calling this method. The following properties and methods are also related to Association handling:

image\sqrblit.gif AbortAssociation method: This method aborts the Association and closes the connection.

image\sqrblit.gif AbortReason property: This property specifies the reason for the Association aborting as specified in the Abort message received by the Print SCU.

image\sqrblit.gif AbortSource property: This property specifies the source of the Association aborting as specified in the Abort message received by the Print SCU.

image\sqrblit.gif Associated property: This property specifies whether the Association is established or not. The value of this property is VARIANT_TRUE only when the Association is established.

image\sqrblit.gif AssociateRejectReason property: This property specifies the reason for the Association rejection.

image\sqrblit.gif AssociateRejectResult property: This property specifies the type of the Association rejection (either PDU_REJECT_RESULT_PERMANENT or PDU_REJECT_RESULT_TRANSIENT)

image\sqrblit.gif AssociateRejectSource property: This property specifies the source of the Association rejection.

image\sqrblit.gif IsClassSupported method: This method determines whether the specified SOP/Meta SOP Class is supported on the Association.

image\sqrblit.gif ReleaseAssociation method: This method releases the Association and closes the connection.

Basic Print Management

image\sqrblit.gif The FilmSession property returns a reference to the LFilmSession object. This object exposes the ILFilmSession interface, which defines properties and methods to handle Film Sessions. For example, having the Association established, the Basic Print Management can be started by requesting the Print SCP to create a Film Session using the Create method of the ILFilmSession interface. For more information on the properties and methods available through this interface, refer to the Working with the LFilmSession Object.

image\sqrblit.gif The FilmBox property returns a reference to the LFilmBox object. This object exposes the ILFilmBox interface, which defines properties and methods to handle Film Boxes. For example, once the Film Session is created, the Print SCP can be requested to create one or more Film Boxes using the Create method of the ILFilmBox interface. For more information on the properties and methods available through this interface, refer to the Working with the LFilmBox Object.

image\sqrblit.gif The ImageBoxes property returns a reference to a collection of LImageBox objects. For more information on the properties and methods available to manage this collection, refer to the Working with the LImageBox Collection. When the Print SCP is requested to create a Film Box, it will also create one or more Image Boxes. For each Image Box created, an LImageBox object is added to the collection. The ILImageBox interface, which is exposed by the LImageBox object, defines members to handle the Image Box. For example, the image to be printed in the Image Box can be specified using the Update methodof the ILImageBox interface For more information on the properties and methods available through this interface, refer to the Working with the LImageBox Object.

image\sqrblit.gif The AnnotationBoxes property returns a reference to a collection of LAnnotationBox objects. For more information on the properties and methods available to manage this collection, refer to the Working with the LAnnotationBox Collection. When the Print SCP is requested to create a Film Box, it might also create one or more Annotation Boxes. For each Annotation Box created, an LAnnotationBox object is added to the collection. The ILAnnotationBox interface, which is exposed by the LAnnotationBox object, defines members to handle the Annotation Box. For example, the Update method of the ILAnnotationBox interface can be used to update the Annotation Box. For more information on the properties and methods available through this interface, refer to the Working with the LAnnotationBox Object.

image\sqrblit.gif The PresentationLUT property returns a reference to the LPresentationLUT object. This object exposes the ILPresentationLUT interface, which defines members to handle Presentation LUTs. For example, if the Presentation LUT SOP Class is supported on the Association, the Create method of the ILPresentationLUT interface can be used to request the Print SCP to create a Presentation LUT. Once created, the Presentation LUT can be referenced by Film Boxes and Grayscale Image Boxes. For more information on the properties and methods available through this interface, refer to the Working with the LPresentationLUT Object.

image\sqrblit.gif The ImageOverlayBox property returns a reference to the LImageOverlayBox object. This object exposes the ILImageOverlayBox interface, which defines properties and methods to handle Image Overlay Boxes. For example, if the Basic Print Image Overlay Box SOP Class is supported on the Association, the Print SCP can be requested to create an Image Overlay Box using the Create method of the ILImageOverlayBox interface. Once created, the Image Overlay Box can be referenced by Image Boxes. For more information on the properties and methods available through this interface, refer to the Working with the LImageOverlayBox Object.

Pull Stored Print Management

The PullPrintRequest property returns a reference to the LPullPrintRequest object. This object exposes the ILPullPrintRequest interface, which defines properties and methods to handle Pull Stored Print Management sessions. For example, having the Association established, the session can be started by using the Create method to create a Pull Print Request SOP Instance. For more information on the properties and methods available through this interface, refer to the Working with the LPullPrintRequest Object.

Printer

image\sqrblit.gif The Printer property returns a reference to the LPrinter object. This object exposes the ILPrinter interface and it can be used to query the Print SCP for information about the printer. For more information on the properties and methods available through this interface, refer to the Working with the LPrinter Object.

image\sqrblit.gif The OnPrinterReport event will be fired whenever a printer status report is received from the Print SCP.

image\sqrblit.gif The PrinterConfiguration property returns a reference to the LPrinterConfiguration object. This object exposes the ILPrinterConfiguration interface and it can be used to query the Print SCP for the printer configuration information. For more information on the properties and methods available through this interface, refer to the Working with the LPrinterConfiguration Object.

Print Jobs

image\sqrblit.gif The PrintJob property returns a reference to the LPrintJob object which expose the ILPrintJob interface, which defines properties and a method that can be used to query the Print SCP: For more information on the properties and methods available through this interface, refer to the Working with the LPrintJob Object.When a printing request is sent to the Print SCP, and if the Print Job SOP Class is supported on the Association, the Print SCP is supposed to create a Print Job SOP Instance for the new Print Job. The SOP Instance UID of that Instance is specified by the PrintJobSOPInstanceUID property of the LFilmSession object, the LFilmBox object, or the LPullPrintRequest object, depending on the method that sent the printing request. This SOP Instance UID can then be passed to the GetInfo method of the ILPrintJob interface to query the Print SCP for information about the Print Job.

image\sqrblit.gif The OnPrintJobReport event will be fired whenever a Print Job status report is received from the Print SCP.

In addition to the properties, methods, and events mentioned above:

image\sqrblit.gif The OnStatus event can be used to monitor the status of the Print SCU itself.

image\sqrblit.gif The LastOperationStatus property specifies the status code returned in the response of the Print SCP.

image\sqrblit.gif The Timeout property specifies the timeout value for communicating with the Print SCP.

image\sqrblit.gif The EnableMethodErrors property specifies whether runtime exceptions should be generated when a method error occurs.

While a huge number of features are supported by the LEADDicomPrintSCU coclass, the common tasks are made easy. The following VB sample procedure illustrates the simplicity when printing a single DICOM image:

Private Sub PrintImage(sImageFilename As String)
   Dim objPrintSCU As New LEADDicomPrintSCU
   
   With objPrintSCU
      .Associate "10.0.2.20", 7104, "PrintSCP", "PrintSCU"
      .FilmSession.Create
      .FilmBox.Create
      .ImageBoxes(0).Update sImageFilename
      .FilmBox.PrintBox
      .FilmSession.Delete
      .ReleaseAssociation
   End With
End Sub