The DICOM standard defines the Print Management Service Class to facilitate the printing of images and image related data. The functionality of L_DicomPrintSCUXXX simplifies the process of building a Print Management Service Class User (Print SCU).
The functionality of L_DicomPrintSCUXXX can be divided into the following categories:
The Association with the Print Management Service Class Provider (Print SCP) can be simply established by calling the function L_DicomPrintSCUAssociate. The SOP/Meta SOP Classes supported by the Print SCU itself are specified when calling this function. The following functions are also related to Association handling:
Basic Print Management
Having the Association established, the Basic Print Management can be started by requesting the Print SCP to create a Film Session. This is done using the function L_DicomPrintSCUCreateFilmSession. The following functions are related to Film Session handling:
Once the Film Session is created, the Print SCP can be requested to create one or more Film Boxes. A Film Box can be created using the function L_DicomPrintSCUCreateFilmBox. The following functions are related to Film Box handling:
When the Print SCP is requested to create a Film Box, it will also create one or more Image Boxes. The function L_DicomPrintSCUGetImageBoxesCount returns the count of these Image Boxes, which can be handled using the following functions:
Similarly, when the Print SCP is requested to create a Film Box, it might also create one or more Annotation Boxes. The function L_DicomPrintSCUGetAnnotationBoxesCount returns the count of these Annotation Boxes, which can be handled using the following functions:
If the Presentation LUT SOP Class is supported on the Association, the Print SCP can be requested to create a Presentation LUT. Once a Presentation LUT is created, it can be referenced by the Film Boxes and Grayscale Image Boxes. The following functions handle Presentation LUTs:
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, which can then be referenced by the Image Boxes. The following functions handle Image Overlay Boxes:
Pull Stored Print Management
Having the Association established, the Pull Stored Print Management can be started by using the function L_DicomPrintSCUCreatePullPrintRequest to request the Print SCP to create a Pull Print Request SOP Instance. The following functions handle Pull Stored Print Management sessions:
The function L_DicomPrintSCUGetPrinterInfo can be used to query the Print SCP for information about the printer. Information that can be retrieved includes Printer Name, Printer Manufacturer, Printer Status, etc. The callback function PRINTSCUPRINTERREPORTCALLBACK will be called whenever a printer status report is received from the Print SCP.
The function L_DicomPrintSCUGetPrinterConfiguration can be used to query the Print SCP for the printer configuration information.
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 will create a Print Job SOP Instance for the new Print Job. The SOP Instance UID of that Instance is returned by the function L_DicomPrintSCUGetPrintJobInstanceUID. This SOP Instance UID can then be passed to the function L_DicomPrintSCUGetPrintJobInfo to query the Print SCP for information about the Print Job. The callback function PRINTSCUPRINTJOBREPORT will be called whenever a Print Job status report is received from the Print SCP.
In addition to the functions mentioned above:
The callback function PRINTSCUSTATUSCALLBACK can be used to monitor the status of the Print SCU itself.
The function L_DicomPrintSCUGetLastOperationStatus returns the status code specified in the response of the Print SCP.
The function L_DicomPrintSCUSetTimeout sets the timeout value for communicating with the Print SCP.
The following sample illustrates the simplicity of using the L_DicomPrintSCUXXX functionality to print a single DICOM image:
L_VOID PrintImage(L_CHAR* pszImageFilename)
// Startup the network
// Establish the Association
PrintSCU.Associate ("10.0.2.20", 7104, "PrintSCP", "PrintSCU",
// Create the Film Session
// Create the Film Box
PrintSCU.GetDefaultFilmBoxParameters (&FBParams, sizeof(FILMBOXPARAMETERS));
// Update the Image Box
PrintSCU.GetDefaultImageBoxParameters (&IBParams, sizeof(IMAGEBOXPARAMETERS));
PrintSCU.UpdateImageBox (PrintSCU.GetImageBoxInstanceUID(0), &Image,
// Print the Film Box
// Delete the Film Session
// Release the Association