Printing in DICOM is unlike any other printing system used in the world, with no relation to PDF, network print protocols etc. Not surprisingly, it uses standard DICOM mechanisms, and although it is one of the original 1993 services, it is probably one of the most complex services in the standard!

There are multiple steps, all using Normalised Operations

  1. A Normal DICOM Association is negotiated, but instead of standard SOP Classes, one or both of the special print Meta SOP Classes are negotiated
  2. A Basic Film Session object is created using N-CREATE
  3. A Basic Film Box is created within the context of that session (again using N-CREATE. As part of this step, the SCU specifies the Format COM/.NET of the images on that film, e.g. STANDARD\2,3 would mean 2x3 layout. The SCP then itself (without a further request from the SCU) creates the appropriate number of Image Boxes (which can be Colour or greyscale) and returns their details as part of the Basic Film Box N-CREATE response.
  4. The SCU “sets” the pixel data into the image boxes using the N-SET operation.
  5. The SCU sends an N-ACTION asking the SCP to print the films (this can be done either for the session as a whole or an individual film, but some printers (wrongly) only support one or the other)
  6. The SCU should then delete the objects it has created using N-DELETE, but in practice this is not necessary, as the SCP can delete any objects left over when the association is closed (this differs from all other DICOM services, where it is wrong to make any assumptions based on the closing of an association).

All this complexity is hidden from users of the DicomObjects DicomPrint (.NET / COM) ) Object for which the following code works:

DicomObjects.NET version

 DicomPrint printer = new DicomPrint()
 {
	Colour = True,
	Format = "STANDARD\1,1",
	Orientation = "PORTRAIT",
	FilmSize = "8INX10IN"
 };

 printer.Open("localhost", 104, "printSCP", "printSCU");
 printer.FilmBox.Add(Keyword.MagnificationType, "NONE");
            
 foreach (DicomImage img in Viewer.Images)
	printer.PrintImage(img, true, true);
	
 printer.Close();

DicomObjects.COM version

 Dim printer As New DicomPrint, Image As DicomImage
 printer.Colour = True
 printer.Node = "localhost"
 printer.Port = 104
 printer.CalledAE = "Server"
 printer.CallingAE = "Client"
 
 printer.Open

 printer.Format = "STANDARD\1,1"
 printer.Orientation = "PORTRAIT"
 printer.FilmSize = "8INX10IN"
 printer.FilmBox.Attributes.Add &H2010, &H60, "NONE"

 For Each Image In Viewer.Images
	printer.PrintImage Image, False, True
 Next
 
 printer.Close