US 2006O197968A1 (19) United States (12) Patent Application Publication (10) Pub. No.: US 2006/0197968 A1 VanNOstrand (43) Pub. Date: Sep. 7, 2006

(54) DICOM PRINT DRIVER Publication Classification (76) Inventor: S. Lance VanNostrand, Plano, TX (51) Int. Cl. (US) G06F 3/12 (2006.01) Correspondence Address: (52)52) U.S. Cl...... 358/1.13 Pamela R. Crocker Patent Legal Staff Eastman Kodak Company 343 State Street (57) ABSTRACT Rochester, NY 14650-2201 (US) (21) Appl. No.: 11F355.432 A printing system includes a windows printing Subsystem 9 including an Application Programming Interface (API), and (22) Filed: Feb. 16, 2006 a driver. The is configured to receive an Related U.S. Application Data image from the windows printing Subsystem, render the .S. App image for printing, and send the rendered image to a Digital (60) Provisional application No. 60/657,571, filed on Mar. Imaging and Communications in Medicine (DICOM) 1, 2005. printer for printing.

JO2 O6 512

APPLICATION pRINTER GRAPHICS J22 DLL 32O DEMMODE EMF 326 RENDERING PRINTER Ud DLL SPOOLER SYSTEM

BTMAP

DEVMODE 3.32 31 O PRINT PROCESSOR 334 BITMAP + DEMMODE

EMF - TO DICOM CONVERTER

338 COMPUTER BOUNDARY DfCOM PROTOCOL

316 OCOM PRINTER

Patent Application Publication Sep. 7, 2006 Sheet 2 of 10 US 2006/O197968 A1

1 O2 MODALITY 12O AAPL/CATION V\ PROPRIETARY 1O6 INTERFACE 1O4 LAYOUT & /MAGE PROCESSING MODULE /N-122 PROPRIETARY 4:28: AP1 tos? INTERFACE 124 WINDOWS OS 110 5.35E. E. WINDOWS gas PRINTING AP/ 128 PRINTING 112 D/COM ARCH/TECTURE VN PROTOCOL 1

D/COM PROTOCOL

COMPUTER HOST-BASED BOUNDARY PRINTER POSTSCRIPT

PRINTER POSTSCRIPT FIG 2 PRINTER

Patent Application Publication Sep. 7, 2006 Sheet 4 of 10 US 2006/O197968 A1

"DH#12# 012

AJO1./NOW12/Od 99TZ

OOZ

Patent Application Publication Sep. 7, 2006 Sheet 5 of 10 US 2006/O197968 A1

OO s 3O2 3O6 312

APPL/CA 77ON ARINTER

32O 322 g; PH/CS DEMMODE EMF 326 RENDERING PRINTER 3O4. U/ DLL SPOOLER 3O8 SYSTEM

BITMAP - DEVMODE

3.32 31O PRINT PROCESSOR 334 B/7MAP -- DEMMODE

514 EMF - TO D/COM CONVERTER

338 COMPUTER BOUNDARY DICOM PROTOCOL

316 DICOM PRINTER FIG 5 Patent Application Publication Sep. 7, 2006 Sheet 6 of 10 US 2006/O197968 A1

34O s 5O2 3O6 312

APPLICATION PRINTER GRAPH/CS 322 DLL 32O DEVMODE EMF 3.26 RENDERING PRINTER 3O4 U/ DLL SAOOLER 3O8 SYSTEM

B/TMAP - DEVMODE 3.32 31 O PRINT PROCESSOR

BITMAP DEVMODE

542 PORT MONITOR

3.36 3.38 COMPUTER BOUNDARY D/COM AROTOCOL

DUMMY MED/CAL J44 /MAGE PRINTER FIG 6 Patent Application Publication Sep. 7, 2006 Sheet 7 of 10 US 2006/O197968 A1 4OO

FIELD NAME FIELD SIZE VALUE DATA TYPE DESCRIPTION IN BYTES

KWPD STRING version 2 gigeoSHORT SEREVERSION NUMBER

cows | 2 | | SHORTSiglio wolf wage UNSIGNED WHOLE IMAGE SHORT 2 BITS 2 UWSIGNED BITS USED PER ALLOCATED SHORT PIXEL. CAN CHANGE ON EACH IMAGE BITS USED 2 UWSIGNED SHORT PIXEL, DATA2 PV, OD, STRING MEDICAL GRAY SPACE LU SCALE IMAGES OW A PAGE MAY BE IN D/FFERENT PIXEL DATA SPACES. DRIVER WILL CONVERT TO TARGET SAACE. SOURCE X 2 UNSIGNED SOURCE ORIGIN SHORT RECTANGLE TO BE STRETCHED SOURCE Y 2 UNSIGNED SOURCE OR/GIN SHORT RECTANGLE TO BE STRETCHED SOURCE 2 UNSIGNED SOURCE WDTH SHORT RECTANGLE TO BE STRETCHED SOURCE UWSIGNED SOURCE HEIGHT SHORT RECTANGLE TO BE STRETCHED 24 FOR FUTURE USE Patent Application Publication Sep. 7, 2006 Sheet 8 of 10 US 2006/O197968 A1

5OO 5O2 6 504 YES

SWAP CCS AND Ros 5O6

ADD K MORE COLUMNS TO PRESERVE THE WPD HEADER

508 SET RWPD FRGS 51O. SET CWPD FC CS/3

512 /S REMAINDER OF CCS/3>O 2

OWPD CWPD + 1

TOTAL SIZE OF THE CONVERTED IMAGE IN WPD FORMAT IS CWPD - RWPD * 3 FIG 8 Patent Application Publication Sep. 7, 2006 Sheet 9 of 10 US 2006/0197968A1

6OO 6O2 6

FOR EACH PIXEL IN ORIGINAL GRAYSCALE IMAGE, PART/TION THE BITS INTO 3 SECTIONS 6O4

SAVE EACH SECTION OF BITS INTO ONE OF THE RGB COMPOWENTS OF THE CORRESPONDING PIXEL IN THE 24-B/T BITMAP

NOTIFY THE PRINTER DRIVER OF THE USAGE OF THE SPECIALLY FORMATTED 24-B/T BITMAP VIA AN ESCAPE SEQUENCE API DEFINED IN THE WINDOWS OPERATING SYSTEM BEFORE REWDERING THE SPECIALLY FORMA TTED 24-B/T B/TMAP TO THE PRINT JOB WTH ANY WINDOWS GD/ FUNCTIONS.

608

REFORMAT THE RENDERED 24-BIT RGB BITMAP BACK TO GRAYSCALE B/TMAP BY EXTRACTING THE BITS FROM EACH OF THE J RGB CHANNELS AND RECOMBINING THOSE BITS TO AN INTEGER IND/CATING THE PIXEL VALUE IN THE RESULTANT GRAYSCALE IMAGE 61O

FIG 9 Patent Application Publication Sep. 7, 2006 Sheet 10 of 10 US 2006/O197968 A1

7OO 7O2 6

AT THE BEGINNING OF A PAGE, INITIALIZE THE IMAGE LIST TO EMPTY 7O4

AT THE BEGINNING OF A BAND, INITIALIZE THE CL/PPING RECTANGLE LIST TO EMPTY. 7O6

FOR EACH STRETCH BLT CALL IN THE CURRENT BAND ON AN IMAGE IN WPD GRAYSCALE FORMAT, ADD AN ENTRY TO THE CLIPPING RECTANGLE LIST. IF IT IS A NEW IMAGE ENCOUNTERED, RESCALE THE IMAGE AND SAVE IT IN THE IMAGE LIST.

708 PASS EVERYTHING ELSE BACK TO UNIDRV FOR ITS DEFAULT RENDERING. 71O

A T THE END OF THE CURRENT AAGE THE DRIVER BUILDS A 1-UP IMAGE BASED ON THE PRINTERS CAPABILITY 712

CLEAN UP THE CLIPPING RECTANGLE LIST AT THE END OF THE CURRENT BAND. 714

FIG. IO US 2006/O 197968 A1 Sep. 7, 2006

DCOM PRINT DRIVER printer driver can print both medical images and medical data to a DICOM printer from Windows applications. The CROSS REFERENCE TO RELATED DICOM printer driver can print grayscale images up to APPLICATIONS 16-bits and also perform bilinear and cubic scaling, which 0001. This application claims priority from U.S. Provi are not possible with standard Windows drivers. sional Patent Application Ser. No. 60/657,571 entitled “DICOM WINDOWS PRINT DRIVER'', filed Mar. 1, BRIEF DESCRIPTION OF THE DRAWINGS 2005, which is incorporated herein by reference. 0009 FIG. 1 is a block diagram illustrating one embodi FIELD OF THE INVENTION ment of a prior art printing system. 0002 The present invention relates generally to the field 0010 FIG. 2 is a block diagram illustrating one embodi of medical printers, and more specifically to a WindowsTM ment of a printing system according to the present invention. driver for printing to Digital Imaging and Communications 0011 FIG. 3 is a table defining the functionality of in Medicine (DICOM) printers. printing components. 0012 FIG. 4 is a block diagram illustrating another BACKGROUND OF THE INVENTION embodiment of a printing system. 0003 Health care organizations transfer medical infor mation from one location to another. The medical informa 0013 FIG. 5 is a block diagram illustrating another tion can include medical images and medical data. Typically, embodiment of a printing system. the printing of medical images and the printing of medical 0014 FIG. 6 is a block diagram illustrating another data (i.e., office/consumer type printing) are performed embodiment of a printing system. using different protocols. In addition, the medical images and medical data are often printed to different types of 0015 FIG. 7 is a table illustrating one embodiment of a printers. windows print driver (WPD) header structure. 0004 Medical images are intended to be of high quality 0016 FIG. 8 is a flow diagram illustrating one embodi to provide predictable output for diagnostics purposes. Hos ment of a method for determining the size of an image in pitals typically print medical images in large Volumes and grayscale format. desire fast turn-around. As such, many medical image print 0017 FIG. 9 is a flow diagram illustrating another ers are of high printing quality, are capable of printing at embodiment of a method for passing grayscale data through high Volumes, and therefore are expensive. To ensure high the standard Windows printing API. quality printouts and device inter-operability, the Digital Imaging and Communications in Medicine (DICOM) pro 0018 FIG. 10 is a flow diagram illustrating one embodi tocol has become an industry standard for medical image ment of a method for rescaling an image. printing. DETAILED DESCRIPTION OF THE 0005. In contrast, office applications do not require diag INVENTION nostics-quality printouts. Due to the proliferation of the Operating System, printer manufactur 0019 FIG. 1 is a block diagram illustrating one embodi ers targeting office and consumer markets provide printer ment of a prior art printing system 100. Printing system 100 drivers for various versions of the Windows Operating includes modality application 102, layout and image pro System. Microsoft implemented the standard printing sub cessing module 106, Digital Imaging and Communications system and the associated Application Programming Inter in Medicine (DICOM) module 110, and DICOM printer 114. face (API). Any Windows application can print to any Modality application 102 is communicatively coupled to Windows compatible printer, regardless of the manufacturer layout and image processing module 106 through propri and model of the printer, by using the standard printing etary interface 104. Layout and image processing module APIs. Although standard, the Windows Printing APIs are 106 is communicatively coupled to DICOM module 110 different for 9x, NT, Win2K, and XP versions of Windows. through proprietary interface 108. DICOM module 110 is communicatively coupled to DICOM printer 114 through 0006. As such, there is a need for a Windows driver to DICOM protocol communication path 112. Modality appli enable printing to a DICOM printer using the standard cation 102, layout and image processing module 106, and printing Subsystem and the associated printing APIs. DICOM module 110 are part of a computer system desig nated by computer boundary 116. DICOM printer 114 is SUMMARY OF THE INVENTION external to the computer system. 0007 One embodiment of the present invention provides 0020 Modality application 102 includes any application, a printing system. The printing system includes a windows Such as a medical analysis, diagnostic, or other Suitable printing Subsystem including an Application Programming medical application that processes and/or generates DICOM Interface (API), and a printer driver. The printer driver is data. When modality application 102 prints a DICOM configured to receive an image from the windows printing image, modality application 102 passes information relating Subsystem, render the image for printing, and send the to the image to layout and image processing module 106 rendered image to a Digital Imaging and Communications in through proprietary interface 104. Layout and image pro Medicine (DICOM) printer for printing. cessing module 106 processes the image for printing and 0008 Embodiments of the present invention provide a generates the layout for the image. Once the image is Windows compatible DICOM print driver. The DICOM prepared for printing, layout and image processing module US 2006/O 197968 A1 Sep. 7, 2006

106 passes the image to DICOM module 110 through 0027 DICOM layer 110 receives processed images for proprietary interface 108. DICOM module 110 controls the printing from layout and image processing module 106 printing of the image on DICOM printer 114. In one through proprietary interface 108. DICOM layer 110 con embodiment, DICOM module 110 passes DICOM protocol trols the printing of the image on DICOM printer 114. In one commands to printer 114 to build each page of the image on embodiment, DICOM layer 110 passes DICOM protocol printer 114. In another embodiment, DICOM module 110 commands to printer 114 to build each page of the image on internally builds each page of the image and passes each printer 114. In another embodiment, DICOM layer 110 completed page to DICOM printer 114 for printing. internally builds each page of the image and passes each 0021 Digital Imaging and Communications in Medicine completed page to DICOM printer 114 for printing. (DICOM) protocol is an industry standard for medical image 0028 Windows OS 124 receives processed images for printing. To support DICOM printers, layered software printing from layout and image processing module 106 architecture is known, as indicated at 100. The layered through Windows Printing API 122 for printing on any architecture partitions modality application 102, layout and suitable type of printer. Printing architecture 128 receives image processing functionality 106, and DICOM layer 110 the processed images from Windows OS 124 through Win into independent modules to reduce software development dows Printing API 126 for preparing the images for printing and maintenance costs. on either DICOM printer 114, postscript printer 138, or 0022. The layered architecture has limitations. The pro host-based printer 136. prietary nature of the architecture forces each vender to 0029. The Printing Architecture is based on printing develop, test, and certify its own DICOM module 110. standards established by Microsoft and can be used with all Proprietary interface 108 between DICOM module 110 and suitable printers. The Printing Architecture is not a propri layout and image processing layer 106 is not standard and etary architecture specific to a particular printer. To Support may require additional software development by medical a printer or updates to existing printers, medical equipment equipment manufacturers to Support printing protocols other manufacturers install the new printer driver for the printer. than DICOM. For example, DICOM would be inappropriate There is no reason to modify or re-test printer communica for low volume printing applications from a personal com tions from modality applications because the print driver puter (PC). includes the software to communicate to the printer. 0023 To address these limitations, embodiments of the 0030) Due to the proliferation of Microsoft Windows present invention provide an image printing architecture, Operating Systems, all printers targeting office and con referred to as the “Printing Architecture.” The Printing Sumer markets provide printer drivers for Windows Oper Architecture is built upon the printing Subsystem in ating Systems. Inside each version of the Windows Operat MicrosoftM Windows 2000 and later Operating Systems. ing System, Microsoft implemented the Printing Subsystem The Printing Architecture provides benefits to both medical and the associated Application Programming Interface equipment manufacturers and end users. (API). Any suitable Windows application can print to any 0024 FIG. 2 is a block diagram illustrating one embodi suitable Windows-compatible printer by using the standard ment of a printing system 120 according to the present Windows Printing APIs. invention. Printing system 120 includes modality applica 0031. The Windows Printing Subsystem separates user tion 102, layout and image processing module 106, DICOM applications from printer drivers. The Windows Printing layer 110, Windows Operating System (OS) 124, printing Subsystem has standard interfaces on both the application architecture 128, DICOM printer 114, postscript printer 138, and printer driver sides to decouple printer drivers from and host-based printer 136. applications. The decoupling allows applications and printer 0.025 Modality application 102 is communicatively drivers to be developed separately and verified indepen coupled to layout and image processing module 106 through dently. The decoupling also increases the overall system proprietary interface 104. Layout and image processing stability. For example, software defects in a printer driver module 106 is communicatively coupled to DICOM layer would prevent user applications from printing to a specific 110 through proprietary interface 108 and to Windows OS printer, but would not impact any other functionality of the 124 through Windows Printing Application Programming applications. The Printing Architecture, built upon the Win Interface (API) 122. DICOM layer 110 is communicatively dows Operating System, can provide these same benefits. coupled to DICOM printer 114 through DICOM protocol 0032. The Printing Architecture provides a set of custom communication path 112 across computer boundary 116. ized components and printer drivers to the Windows Printing Windows OS 124 is communicatively coupled to printing Subsystem. From the Windows Operating Systems’ perspec architecture 128 through Windows Printing API 126. Print tive, the Printing Architecture implements print drivers that ing architecture 128 is communicatively coupled to DICOM follow all standards and guidelines specified by Microsoft. printer 114 through DICOM protocol communication path Therefore, the Printing Architecture is compatible with all 130, postscript printer 138 through postscript communica existing Windows applications that support Windows print tion path 132, and host-based printer 136 through commu ing. nication path 134. 0033. The Printer Driver renders pages on the host one at 0026 Modality application 102 is an application such as a time, and then sends them to the target printer in the a medical diagnostic imaging or other medical application printing protocol supported by the target printer. The Printer that processes and/or generates DICOM data. Layout and Driver maintains the same programming interface to modal image processing module 106 receives image data from ity applications regardless of the type of the target printer. modality application 102 through proprietary interface 104 By adopting the Printing Architecture, modality applications for processing images and generating layouts of images for can print to supported printers without any Software modi printing. fication. US 2006/O 197968 A1 Sep. 7, 2006

0034) To preserve equipment manufacturers’ existing DICOM printer for medical images and the other for Win printing design, the Printing Architecture 128 coexists and dows Applications. One printer for both purposes reduces enhances equipment manufacturers’ existing printing archi the customer's production and maintenance costs. tecture. Equipment manufacturers can maintain the existing design and implementation of both modality applications 0041 Embodiments of the present invention provide for 102 and layout and image processing layer 106. Through the a printer that can be used for both purposes. In general, the standard Windows Printing API, the layout and image pro DICOM image is sent directly to the printer whereas the cessing layer 106 sends the generated image to Printing non-DICOM image is converted to DICOM prior to being Architecture 128. Equipment manufacturers have the choice sent to the printer. of using either proprietary image processing algorithms, or 0042. To make these two scenarios possible, a Windows image-processing algorithms developed and certified by printer driver that sends the print job to DICOM printers is Kodak. used. The printer driver follows all design constraints and 0035) Printing Architecture 128 interfaces to medical guidelines published by Microsoft. The printer driver con printers of various protocols, while presenting the same verts Windows Printing API calls to DICOM protocols and programming interface to modality applications 102. The sends the generated DICOM commands to a remote DICOM equipment manufacturer can therefore concentrate on the printer. development of modality applications 102, instead of con 0043 Regarding a low cost “dummy’ medical printer nectivity to various medical printers. under Windows, small clinics have limited budgets and 0036) To adopt the Printing Architecture, medical equip printing Volumes. Such customers may desire a printer ment manufacturers modify layout and image processing having a lower cost and Smaller physical size without layer 106 in the following areas: (a) Sending the generated sacrificing the printing quality or printing speed. A bitmap to the Printer Driver, instead of to the DICOM “dummy’ printer can reduce both the cost and physical size. module, through the Windows programming interface; and A “dummy’ printer refers to a printer that has no, or very (b) Querying the Printer Driver, instead of the DICOM few, on-board processing capabilities, connects to the host module, about the printer status and printer capability. computer through a parallel, serial, or USB port; and Existing layered printing architectures from medical equip depends on the host computer to control the printing activity. ment manufacturers should readily accommodate these 0044) With the reliability of Windows 2000 and later changes. operating systems, and the performance of Intel x86 com 0037 To adopt the Printing Architecture, medical equip patible CPUs, a PC running Windows 2000 OS or a later ment manufacturers have two options regarding user inter operating system is a candidate to control "dummy’ medical face changes. The first option includes no change on the printers. A printer driver is the software that allows the OS typical user interface. Medical equipment manufacturers do to control the printing process of the connected printers. not have to modify the modality applications user interface 0045 Aprinter driver for dummy medical image printers when adopting the Printing Architecture. By keeping current addresses the following issues: First, many diagnostics user interfaces, medical equipment manufacturers can keep quality images are up to 16-bit gray level. Most, if not all, the transition to Printing Architectures transparent to the end existing printer drivers for commercial office/consumer users as much as possible. printers do not support up to 16-bit gray level printing at all. 0038. The second option includes minimum changes to Second, medical images use special rendering algorithms to follow the standard Windows common look-and-feel. The process the images before printing to physical media. Stan Printing Architecture supports user interfaces that allow end dard rendering algorithms supported by Windows Operating users to select target printer, printing media, printer settings, Systems are fine-tuned toward general business or consumer etc. These user interface elements follow the Windows printing. Therefore, the algorithms are not suitable for common look-and-feel. Equipment manufacturers can adopt medical image printing. Third, the printer driver follows all these user interface elements whenever appropriate. The constraints, guidelines, and programming API specified by Windows common look-and-feel reduces the end users the Windows Printing Architecture so that any existing learning curve and enhances the users overall experience Windows applications can print to the medical image print with modality applications. ers without modifications. Fourth, to ensure the inter-oper ability with other medical imaging equipment, the printer 0039) Regarding printing to a DICOM Printer from a driver supports the DICOM protocol “out-of-the-box.’ typical Windows Application, the following two scenarios are discussed to more particularly describe aspects of the 0046) The Windows Printing Subsystem includes the present invention: The first scenario includes a Web-based following major components: printer graphics Dynamic Diagnostics station, a doctor loads a CR image inside the Link Library (DLL), printer User Interface (UI) DLL, web browser, exams the image, and prints the image to a spooler, and port monitor. In many publications, the printer DICOM printer. The second scenario includes a doctor graphics DLL and printer UI DLL together are referred to as preparing a diagnostics report using Microsoft Word. Within the “printer driver.” The table in FIG. 3 illustrates the the report, the doctor inserts a couple of diagnostics images. finctionality of each component. The printer graphics DLL renders a print job and sends the rendered data stream to the The doctor then prints the entire report to a DICOM printer. print spooler. The printer UI DLL provides a user interface 0040. In each of these two scenarios, the customers have so that the user can modify the printer's configuration the freedom to use any Windows applications to manipulate parameters. The printer UI DLL also notifies the user of any medical images and print those medical images in diagnostic print related system events. The spooler manages and sends quality. The customers do not need to buy two printers, one print jobs to the intended print devices. The port monitor US 2006/O 197968 A1 Sep. 7, 2006

directs a print data stream from the print spooler to an UI DLL 204. Printer manufacturers can optionally provide appropriate communication port connecting to the intended customized spooler components 208 and port monitors 210 print devices. to enhance the standard functionality provided by the Microsoft components. 0047 FIG. 4 is a block diagram illustrating another embodiment of a printing system 200. Printing system 200 0051. The Medical Imaging Printing Architecture in includes application 202, printer UI DLL 204, Graphics accordance with the present invention provides a set of Device Interface (GDI) 206, printer graphics DLL 212, customized components and printer drivers to the Windows spooler 208, port monitor 210, and printer 214. Application Printing Subsystem. It includes the following major com 202 is communicatively coupled to printer UI DLL 204 ponents: print driver; printing processor; and EMF-to-DI through query DEVMODE communication path 220. Appli COM Converter. cation 202 is communicatively coupled to GDI 206 through 0.052 Printing to a DICOM printer from a typical Win send print commands communication path 222. GDI 206 is dows Application is more particularly described with refer communicatively coupled to printer graphics DLL 212 ence to FIG. 5. FIG. 5 is a block diagram illustrating through rendering result communication path 230 and ren another embodiment of a printing system 300. dering communication path 228. GDI 206 is communica tively coupled to spooler 208 through Enhanced Meta File 0053 Printing system 300 includes application 302, (EMF) file communication path 224, play back communi printer UI DLL 304, GDI 306, printer graphics DLL 312, cation path 226, and rendered print job communication path spooler system 308, print processor 310, EMF-to-DICOM 232. Spooler 208 is communicatively coupled to port moni converter 314, and DICOM printer 316. Application 302 is tor 210 through rendered print job communication path 234. communicatively coupled to printer UI DLL 304 through Port monitor 210 is communicatively coupled to printer 214 DEVMODE communication path 322 and communication through communication path 236. path 320. Application 302 is communicatively coupled to GDI 306 through print communication path 324. GDI306 is 0048. Application 202 queries printer UI DLL 204 communicatively coupled to printer graphics DLL 312 through query DEVMODE communication path 220 to through communication path 330. GDI 306 is communica determine the printer capabilities for determining how to tively coupled to spooler system 308 through EMF commu format the document to be printed. DEVMODE is a data nication path 326 and rendering communication path 328. structure containing information concerning the environ Spooler system 308 is communicatively coupled to print ment of a printer. Application 202 then calls the standard processor 310 through bitmap plus DEVMODE communi Windows Printing API implemented by GDI subsystem 206 cation path 332. Print processor 310 is communicatively in the OS through send print commands communication path coupled to EMF-to-DICOM converter 314 through bitmap 222. GDI 206 is a dynamic link library that processes plus DEVMODE communication path 334. EMF-to-DI graphics function calls from a Windows based application COM converter 314 is communicatively coupled to DICOM and passes them to the appropriate graphics device driver. printer 316 through DICOM protocol communication path Spooler subsystem 208 spools the print job in the EMF 336 across computer boundary 338. format through EMF file communication path 224 and “plays back” the spooled print job through play back com 0054 The printer driver implements both printer graphics munication path 226 when the printer is not busy. EMF is a DLL 312 and printer UI DLL.304. Printer graphics DLL 312 device independent type of spool file that allows control to renders up to 16-bit gray level medical images with render be returned to the application more quickly after the print ing algorithms fine-tuned for medical images. The printer request by delaying the rendering of the GDI functions. GDI driver is also capable of rendering 8-bits per channel RGB 206, with the help of the printer graphics DLL 212, renders medical images for ultrasound applications or reports. the print job into a format that the target print device 0055) Printer UI DLL 304 maintains the same look-and understands. The rendered print job is passed to spooler feel for the following categories of printers: Dummy medi subsystem 208 through rendered print job communication cal printers connected to the host PC with parallel, USB, or path 232, and is directed to print device 214 by port monitor Firewire. Postscript printers connected to the PC with par 210. Port monitor 210 is a user mode DLL that is responsible allel, USB, Firewire, or Ethernet. Remote DICOM printers for providing a communications path between the user mode connected to the PC with Ethernet. The same look-and-feel print spooler and the printing device. greatly reduces the users training time, therefore enhancing 0049. The spooler subsystem 208 includes one or more the users overall experiences with the Medical Image print processors. The print processors read the spooled file, Printing Software. perform conversion operations on the data stream and write 0056 Print processor 310 co-exists with the standard the converted data to the spooler. The conversion operations Microsoft print processors. It has two major functionalities. controlled by the print processors are the play backs as First, the print processor re-directs print jobs to EMF-to indicated at 226, the renderings as indicated at 228, the DICOM converter 314 and sends the generated DICOM rendering results as indicated at 230, and the rendered print commands to a remote DICOM printer 316. Second, the jobs as indicated at 232. print processor re-directs print jobs to applications that apply 0050. Within each release of the Windows Operating “final-touch' to the printing jobs. Kodak Medpage and Print System, Microsoft provides standard components as illus Composer are two examples of such “final touch' applica trated in FIG. 4 except printer graphics DLL 212 and printer tions. UI DLL 204. Printer graphics DLL 212 and printer UI DLL 0057 When a Windows application creates a print job 204 are hardware specific. Therefore, each printer manufac using the standard Windows API, the Windows OS collects turer provides its own printer graphics DLL 212 and printer all the printing commands into a print job file in the US 2006/O 197968 A1 Sep. 7, 2006

Enhanced Metadata Format (EMF). To send the print job to 0064 Regarding print management software, MedPage is a DICOM printer, EMF-to-DICOM converter 314 converts software that allows the user to combine multiple print jobs the printing commands in the EMF file into a sequence of together into one print job, and apply the following process DICOM commands. EMF-to-DICOM converter 314 allows ing to the generated print job before sending it to the print any Windows applications to print to any DICOM printers device: without any modifications. 0065 N-up printer The MedPage can print multiple 0058. The Medical Image Printer Architecture has a pages in the original print jobs into one sheet. modular structure. Various components can “mix-and match' to Support medical image printers of various char 0066 Layout modification. The MedPage allows the acteristics. The following description illustrates how the user to set the position and size of each page in the final Medical Image Printing Architecture Supports the typical printout. scenarios discussed above. 0067 General Image Processing algorithm. 0059) To allow regular Windows applications to print to 0068 Add header or footer to each sheet in the generated a DICOM printer, elements needed include printer graphics print job. DLL 312, printer UI DLL 304, print processor 310, and EMF-to-DICOM converter 314 from the Medical Image 0069. There are three pixel data spaces defined in medical Printing Architecture. grayscale imaging including Presentation Value (P-Value), Linear Optical Density (LIN OD), and luminance. The 0060 FIG. 6 is a block diagram illustrating another luminance space is the oldest technology in the pixel data embodiment of a printing system 340. Printing system 340 representation. Most printing and displaying devices Support includes application 302, printer UI DLL 304, GDI 306, the luminance space. The P-Value is the most advanced pixel printer graphics DLL 312, spooler system 308, print pro data representation in medical imaging applications. It rep cessor 310, port monitor 342, and dummy medical image printer 344. Application 302 is communicatively coupled to resents high-quality printing and displaying with the help of printer UI DLL 304 through communication path 320 and extra attributes Such as illumination, reflected ambient light, DEVMODE communication path 322. Application 302 is DMin, and DMax. LIN OD can also take advantage of DMin communicatively coupled to GDI 306 through print com and DMax to improve the image quality in printing and munication path 324. GDI 306 is communicatively coupled displaying. It is advantageous for a medical imaging appli to printer graphics DLL 312 through communication path cation to present the pixel data in P-Value for printing and/or 330. GDI306 is communicatively coupled to spooler system displaying. LIN OD is supported by most printing and 308 through EMF communication path 326 and rendering displaying devices. P-Value, however, is not supported by all communication path 328. Spooler system 308 is communi devices. catively coupled to print processor 310 through bitmap plus 0070. In grayscale printing, typical Windows applica DEVMODE communication path 332. Print processor 310 tions generate print jobs in the luminance space. Medical is communicatively coupled to port monitor 342 through imaging applications, however, can generate grayscale bitmap plus DEVMODE communication path 334. Port images in any one of the three pixel spaces described above. monitor 342 is communicatively coupled to dummy medical To Support the printing of grayscale images in non-standard image printer 344 through DICOM protocol communication spaces a high-depth grayscale interface extension to the path 336 across computer boundary 338. Windows GDI is provided. The extension provides a mecha 0061. To control a low-cost, “dummy’ medical image nism for the application to tell the driver what space the printer from a Windows Operating System, elements needed Source pixel data is in. include printer graphics DLL 312, printer UI DLL 304, and 0071. With typical applications, the user has no control of print processor 310. In this embodiment, printer graphics the pixel space when a grayscale print job is Submitted. In DLL 312 renders the entire print job into bitmaps and sends medical applications, displays and display Software may be each generated bitmap to dummy printer 344 through port calibrated for the GSDF (P-values), and/or applications may monitor 342. Port monitor 342 allows printer 344 to connect receive images in raw form from Sources that are natively in to the host PC through a parallel, USB, USB 2.0, or Firewire various image spaces. In these cases, applications will want port. to pass the data to the driver in its native space (preferred) 0062) The Windows Operating System allows multiple or in its display space (which may not be luminance). The PCs to share the same print device. The “printer sharing target printer, however, may not Support the native image requires no modification at the printer driver level. There space. Therefore the windows print driver (WPD) of the fore, Windows applications running on other PCs can print present invention provides a UI element for the user to select to the dummy medical image printer through the Windows the target printer pixel space. The selection directs the WPD printer sharing. to convert all data on a page to the target space. The printer image space UI element is applied to grayscale pages and is 0063) To allow other medical equipment to print to ignored by color pages. The number of available selections dummy printer 344 through the DICOM protocol, a user in the UI element varies based on the target printers level application receives the incoming DICOM connec capability of Supporting pixel spaces. tions, converting the DICOM print job into a standard Windows print job with Windows printing APIs. A simpli 0072 Medical grayscale images use up to 16 bits per fied version of MIM is provided by replacing application pixel in high resolution and may be printed on large films. 302 in FIG. 6 with MIM. The dummy medical image printer Therefore, the size of a medical image may be up to 200 MB. will be exposed to other equipment as a fully functional Medical images often require some special rendering. In DICOM printer. order to support up to 16-bit grayscale printing, all printers US 2006/O 197968 A1 Sep. 7, 2006

supported by the driver are advertised to Windows as color of columns in the WPD image is incremented by one. The printers. So all images submitted to the driver are always in number of columns in the WPD image is incremented by one 24-bit RGB format. This allows medical grayscale images to until the remainder is equal to zero. At 516, the total size of pass through the Windows printing channel for special the converted image in WPD format is equal to the number rendering. In general, data in WPD grayscale format cannot of columns in the WPD format times the number of rows in be rendered directly. This custom format embeds a header the WPD format times three. into the pixel data that describes features of the image that 0078 Method 500 guarantees that the columns and rows cannot be supplied in the Windows GDI functions. In of the imaginary 24-bit RGB image are less than or equal to addition, the pixel organization in memory is optimized by the columns and rows of the original grayscale image allowing 16-bit gray data to be stored in 16 bits, and not respectively. forced into a 24-bit Windows format. This saves memory and improves performance. 0079. To print medical grayscale images with the driver, application developers convert the original grayscale image 0073. The WPD grayscale format is the image pixel data to WPD grayscale format that can be presented to Windows format to present medical grayscale images up to 16 bits per GDI functions as a 24-bit RGB color image. Next, the pixel to Windows printer drivers in 24-bit RGB format. The application calls GDI functions on this 24-bit color image. data format includes three components including a WPD Finally, the application calls GDI Stretch Blt to put the whole header, the original grayscale pixel data stream, and a image on the page to be printed. The real source rectangle is minimal number of padding bytes to make the total data specified in the WPD header. The StretchBlt function is used length divisible by three. It is noted that the WPD header can to send the medical grayscale image in WPD grayscale be, for example, 48 bytes (2 RGB pixels) or 64 bytes. format for printing. The driver will intercept the StretchBlt 0074 FIG. 7 is a table 400 illustrating one embodiment calls for the special rendering on data in WPD grayscale of a WPD header structure. The remaining space in the format. header is reserved for expansion. The header clearly iden 0080 FIG. 9 is a flow diagram 600 illustrating another tifies the WPD grayscale format with a unique signature and embodiment of a method for generating an imaginary 24-bit defines the pixel data organization. The header also defines color image using grayscale data to pass through a Windows the source rectangle for a specific Stretch Blt operation. This printing API. At 602, the bits for each pixel in the original definition is updated for every Stretch Blt call. The WPD grayscale image are partitioned into three sections. At 604, grayscale format can be used for 8-bit and up to 16-bit each section of bits is saved into one of the RGB compo grayscale images. nents of the corresponding pixel in the 24-bit bitmap. At 606, the printer driver is notified of the usage of the specially 0075 FIG. 8 is a flow diagram 500 illustrating one formatted 24-bit bitmap via an escape sequence API defined embodiment of a method for determining the total size of a in the Windows operating system before rendering the converted image in WPD format. The size of the image is specially formatted 24-bit bitmap to the print job with any divisible by three so that the data of this size can be Windows GDI finctions. At 608, the rendered 24-bit bitmap presented to Windows GDI functions as a 24-bit RGB color is reformatted back to the grayscale bit map by extracting the image. The general idea is to construct an imaginary 24-bit bits from each of the three RGB channels and recombining RGB color image of columns by rows by padding data to the those bits to an integer indicating the pixel value in the original grayscale image of cxr in the direction of longer resultant grayscale image. At 610, the rendered data is sent dimension. For instance, if the image has longer rows than to a print engine. columns, more columns will be padded in the construction. 0081 Rescaling of an image in cubic or bilinear magni 0076. At 502 it is determined whether the number of fication types will cause problems in banding mode render columns in the grayscale image (Cs) is greater than the ing. To resolve this problem, the driver rescales the whole number of rows in the grayscale image (Rs). If the number image at once and saves it aside when it is encountered by of columns in the grayscale image is greater than the number the driver the first time. Then different portions of the of rows in the grayscale image, the number of columns in the rescaled data are used in Successive bands in the page. The grayscale image is Swapped with the number of rows in the driver uses an image list to keep the rescaled data for each grayscale image at 504. If the number of columns in the of the grayscale images in WPD grayscale format on the grayscale image is not greater than the number of rows in the page. The data is saved with information of bits allocated, grayscale image, or after block 504, at 506, K more columns bits used, and data space for further rendering later. An are added to preserve the WPD header space (i.e., K times image on the list is identified by the destination rectangle on the number of rows in the grayscale image is greater than or the final surface that it is rescaled into. The image list is equal to 64). Therefore, the number of columns in the initialized at the beginning of a page and cleaned up at the grayscale image equals the number of columns in the end of the page. The driver also maintains a list of clipping grayscale image plus K. rectangles for the rendered data on the current band. The 0077. At 508, the number of rows in the WPD image clipping rectangle on the list is also identified by the (Rw) is set equal to the number of rows in the grayscale destination rectangle on the final Surface to which it belongs. image. At 510, the number of columns in the WPD image The driver allows a clipping rectangle to reference back to (Cwb) is set equal to the number of columns in the an entry in the image list. The clipping rectangle represents grayscale image divided by three. At 512, it is determined the overlapped area between the destination rectangle and whether the remainder of the number of columns in the the current band. The detailed rendering of a page in the grayscale image divided by three is greater than Zero. If the banding mode is illustrated in FIG. 10. remainder of the number of columns in the grayscale image 0082 FIG. 10 is a flow diagram 700 illustrating one divided by three is greater than Zero, then at 514 the number embodiment of the detailed rendering of a page in a banding US 2006/O 197968 A1 Sep. 7, 2006

mode. At 702, at the beginning of a page the image list is format before the saved images are merged into the stream. initialized to empty. At 704, at the beginning of a band, the If there is no regular object on the final Surface, the con clipping rectangle list is initialized to empty. At 706, for each version can be avoided and the driver can directly put saved StretchBlt call in the current band on an image in WPD images in the final data stream. This may be achieved if the grayscale format, an entry is added to the clipping rectangle driver intercepts all GDI calls just to set a flag on the band list. If a new image is encountered, the image is rescaled and to signify that. Application developers may also issue saved in the image list. At 708, everything else is passed another ExtEscape command to signify if there is any back to wUnidrv for its default rendering. Unidrv is a regular object on the page. Microsoft based printing architecture for non-PostScript 0090. A computer program product may include one or printers. more storage medium, for example; magnetic storage media 0083. At 710, at the end of the current page, the driver Such as magnetic disk (such as a floppy disk) or magnetic builds a 1-up image based on the printer's capability. If the tape; optical storage media Such as optical disc, optical tape, printer is a color printer, the driver further converts all saved or machine readable bar code; Solid-state electronic storage images in the clipping rectangle list to color images and then devices Such as random access memory (RAM), or read merges them into the final surface to form the final color data only memory (ROM); or any other physical device or media stream. During the conversion, a grayscale image is first employed to store a computer program having instructions converted to luminance space and then optionally to 8-bits for controlling one or more computers to practice the before finally to color. Otherwise, the driver converts the method according to the present invention. color final Surface to grayscale format before merging the saved images into the final data stream after necessary 0091 Embodiments of the present invention provide a conversion in bit depth and/or data space. During the con Windows compatible DICOM print driver. The DICOM version, the color Surface is first converted to grayscale in printer driver can print both medical images and medical luminance space and then to the application selected bit data to a DICOM printer from Windows applications. The depth and data space. The color to grayscale conversion may DICOM printer driver can print grayscale images up to be optimized out if the driver knows there is no color objects 16-bits and also perform bilinear and cubic scaling, which on the surface for the band. Now it is ready to send the final are not possible with standard Windows drivers. data stream to the DICOM SCU unit. 0092. The invention has been described in detail with particular reference to certain preferred embodiments 0084. At 712, the clipping rectangle list is cleaned up at thereof, but it will be understood that variations and modi the end of the current band. Note that step 710 can occur fications can be effected within the spirit and scope of the after step 712. invention. 0085. At 714, the image list is cleaned up at the end of the page. Parts List 0.086 The use of destination rectangle as image ID dis 0093. 100 Printing System ables the possibility of putting more than one image onto the same rectangle on the final Surface. In addition, since the 0094) 102 Modality Application driver patches the data that was originally a WPD grayscale 0.095) 104 Proprietary Interface format onto the final surface after other normal objects on the final Surface have been finalized, anything in rectangles 0096. 106 Layout and Image Processing Module for images that were originally in WPD grayscale format are 0097. 108 Propriety Interface wiped out. 0.098 110 DICOM Module 0087 Windows will potentially optimize out the Stretch Blt callback into the driver rendering unit and directly put 0099) 112 DICOM Protocol Communication Path images on the final Surface if source and destination rect angles are exactly the same. It is expected to be really rare 0100 114 DICOM Printer to have the dimension of the converted color image match 0101) 116 Computer Boundary the destination rectangle because of the way of figuring out 0102 120 Printing System the dimension. If this does occur, the columns and rows can be reversed or the destination rectangle can be changed by 0103) 122 Windows Printing API reducing columns or rows by one pixel. 0104 124 Windows OS 0088. During image rendering, the driver needs to know the bit depth to which the data is to be rendered. For this 0105 126 Windows Printing API purpose, the driver requires application developers to issue 0106 128 Printing Architecture an ExtEscape command with the parameter of bpp:nn on the page where nn is 1-16, if there is at least one image in WPD 0107 130 DICOM Protocol Communication Path grayscale format on the page. The default value is 8-bits 0108) 132 Postscript Communication Path used per pixel. 0109) 134 Communication Path 0089. In one embodiment, in image rendering of replicate type, the driver can still render the data band by band to save 0110 136 Host Based Printer memory. In another embodiment, as a last step in the image rendering for a band, if the target printer is grayscale, the 0111) 138 Postscript Printer final Surface is converted to the final data stream in grayscale 0112 200 Printing System US 2006/O 197968 A1 Sep. 7, 2006

0113 202 Application 0156 700 Process Flow Diagram 0114) 204 Printer UI DLL O157 702-714 Process Procedures 0115, 206 GDI What is claimed is: 0116 208 Spooler 1. A printing system comprising: 0117) 210 Port Monitor a windows printing Subsystem including an Application 0118 214 Printer Programming Interface (API); and 0119) 212 Printer Graphics DLL a printer driver configured to receive an image from the 0120) 220 Query DEVMODE windows printing Subsystem, render the image for printing, and send the rendered image to a Digital 0121 222 Send Print Commands Imaging and Communications in Medicine (DICOM) 0122) 224 EMF File printer for printing. 2. The system of claim 1, wherein the printer driver is 0123 226 Play Back configured to receive up to a 16-bit grayscale image through 0124) 228 Rendering the windows printing Subsystem. 3. The system of claim 2, wherein the printer driver is 0125 230 Rendering Result configured to receive an encoded image including a header, 0126. 232 Rendered Print Job a grayscale pixel data stream, and padding bytes Such that the printer driver can reconstruct the image and extract 0127 234 Rendered Print Job information from the header. 0128 236 Communication Path 4. The system of claim 2, wherein the printer driver is 0129 300 Print System configured to receive the 16-bit grayscale image encoded into a 24-bit RGB bitmap such that the printer driver can 0130 302 Application reconstruct the up to 16-bit grayscale image. 0131 304 Printer UI DLL 5. The system of claim 1, wherein the printer driver is configured to receive an image having pixel data in presen 0132) 306 GDI tation value. 0.133 308 Spooler System 6. The system of claim 1, wherein the image includes 8-bit RGB data and greater than 8-bit grayscale data. 0134) 310 Print Processor 7. The system of claim 1, wherein the printer driver is 0135) 312 Printer Graphics DLL configured to render each page of the image one at a time and send each page to the DICOM printer. 0136 314 EMF-to-DICOM Converter 8. The system of claim 1, wherein the printer driver is 0137 316 DICOM Printer configured to render the image in greater than 8-bit resolu 0138 320 Communication Path tion. 9. The system of claim 1, wherein the image includes a 0139 322 DEVMODE Communication Path digital image. 0140) 324 Print Communication Path 10. The system of claim 9, wherein the printer driver is configured to scale the digital image. 0141. 326 EMF Communication Path 11. The system of claim 10, wherein the printer driver is 0142 328 Rendering Communication Path configured to scale the digital image using one of cubic Scaling and bilinear Scaling. 0143) 330 Communication Path 12. The system of claim 1, wherein the printer driver is 0144) 332 Bitmap plus DEVMODE Communication Path configured to send the image to a postscript printer. 13. The system of claim 1, wherein the printer driver is 0145 334 Bitmap plus DEVMODE Communication Path configured to send the image to a dummy printer. 0146) 336 DICOM Protocol Communication Path 14. A printing system comprising: 0147 338 Computer Boundary means for printing a document on a Digital Imaging and Communications in Medicine (DICOM) printer 0148 340 Printing System through a windows printing Subsystem including an 0149 342 Port Monitor Application Programming Interface (API). 15. The system of claim 14, wherein the means for 0150) 344 Dummy Medical Image Printer printing comprises means for rendering the document for 0151 400 WPD Header Structure printing on the DICOM printer. 16. The system of claim 15, wherein the means for 0152 500 Process Flow Diagram rendering the document comprises means for rendering the 0153. 502-516 Process Procedures document with up to 16-bit resolution. 17. The system of claim 14, wherein the document 0154 600 Process Flow Diagram comprises a digital image and wherein the means for print 0155 602–610 Process Procedures ing comprising means for Scaling the digital image. US 2006/O 197968 A1 Sep. 7, 2006

18. The system of claim 17, wherein the means for scaling wherein sending the document comprises sending each the digital image comprises means for scaling the digital rendered page to the DICOM printer one at a time. image using one of cubic scaling and bilinear Scaling. 21. The method of claim 19, wherein the document 19. A method of printing a document comprising: comprises a digital image, the method further comprising: Selecting a Digital Imaging and Communications in Medi cine (DICOM) printer through a windows printing Scaling the digital image. Subsystem including an Application Programming 22. The method of claim 21, wherein scaling the digital Interface (API) for printing a document; image comprises scaling the digital image using one of cubic rendering the document for printing on the DICOM Scaling and bilinear Scaling. printer; and 23. The method of claim 19, wherein rendering the sending the document to the DICOM printer for printing. document comprises rendering the document with greater 20. The method of claim 19, wherein rendering the than 8-bit resolution. document comprises rendering each page of the document one at a time; and