The HPGL files encapsulated in the Attribute HPGL Document (0068,6300) is restricted to a subset of HPGL commands called DICOM-HPGL specified in this section.
The aim of DICOM-HPGL is to facilitate the storage of 2D template graphics in DICOM implant objects. DICOM-HPGL is a subset of HPGL-2 that is kept as minimal as possible to comply with the needs of 2D implant templates.
DICOM-HPGL documents consist of valid HPGL commands terminated by a semicolon. Commands consist of a two-letter mnemonic and zero or more numeric parameters separated by commas. To separate between commands, line breaks (x0D, x0A or x0Dx0A) or whitespaces (x20) may be used but are not mandatory.
Only the following commands shall be used in a DICOM-HPGL document
|PA||[X,Y]||Plot Absolute. The optional parameter assigns an initial position for the pen.|
|PC||Pen Number, Red, Green, Blue||Set Color of Pen with the given Pen Number. Colors are in RGB, intensities are encoded 0..255. The colors for pen number 0 shall be white and the color for pen number 1 shall be black. It is recommended to use only the pen numbers up to 255 to ensure compatibility with older HPGL-Viewers.|
|SP||Pen Number||Select Pen It is recommended to use only the pen numbers up to 255 to ensure compatibility with older HPGL-Viewers. Only pen numbers shall be used to which a color has been specified in a precedent PC command.|
|PU||[X,Y,…[,X,Y]]||Pen Up. The optional sequence of paired parameters describe subsequent pen motions after lifting the pen.|
|PD||[X,Y,…[,X,Y]]||Pen Down. The optional sequence of paired parameters describe subsequent pen motions after lowering the pen.|
According to the parameter definition in HPGL,  indicate optional parameters. The expression [X,Y,…[,X,Y]] indicates a sequence of arbitrary length of paired parameters X and Y. The commands and their parameters shall be interpreted as specified in the HP PCL/PJL Reference.
Note: This document can be obtained fromURL: http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl13211/bpl13211.pdf
The coordinates in a DICOM-HPGL document are absolute values with respect to the lower left corner of the drawing space. The units of length within HPGL are 25 µm with respect to pen movements in the drawing space.
The DICOM-HPGL Document shall be structured as shown in Figure C.29.1.2-1.
Figure X-1.2 shows an example for a DICOM-HPGL Document in plain text, (as byte stream) and plotted.
Figure C.29.1.2-1 DICOM-HPGL Document
Figure C.29.1.2-2DICOM-HPGL Document – Example