This article demonstrates how to use DicomObjects.NET and Core version to perform FilmBox printing and Session Printing.

For more general information on DICOM Printing please check DICOM-Print-Service

The main difference between Filmbox printing and Session Printing is the result can be one print per filmbox for FilmBox printing and one single print (such as multi-page PDF) for the entire session. How the Print SCP handles Session Printing is application specific and out of the scope of this article.

Filmbox Printing (Default)

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

 printer.Open("localhost", 104, "printSCP", "printSCU");
 printer.FilmBox.Add(Keyword.MagnificationType, "NONE");

 // When a filmbox is filled up with Imageboxes, PrintImage call will fire N-ACTION for that Filmbox            
 foreach (DicomImage img in Viewer.Images)
	printer.PrintImage(img, true, true);
 
 // any pending imageboxes on the last filmbox, we will fire another N-ACTION to print that filmbox	
 printer.Close();

Session Printing

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

 printer.Open("localhost", 104, "printSCP", "printSCU"); 
            
 foreach (DicomImage img in Viewer.Images)
 {
	printer.FilmBox.Add(Keyword.MagnificationType, "NONE");
	// this adds the Image to Imagebox, but does not fire N-ACTION as we are in Session printing mode
	printer.PrintImage(img, false, true);
 }

 // fires a single N-ACTION request and asks the Print SCP to print the entire session
 // no need to call printer.Close() in this case
 printer.PrintSession();