C.29.1.2.1 Generic Implant Template 2D Drawings Attribute Descriptions

C.29.1.2.1.1 HPGL Document Scaling and Coordinate System

HPGL Documents use integer coordinates based on a 25µm grid in the printing space – i.e. the paper to print on – rather than the object space. HPGL Document Scaling (0068,62F2) is used to scale the printed dimensions measured in millimeters to match the real dimensions of the implant measured in millimeters.

Notes: 1. For example, if HPGL Document Scaling is 2.5, then a line in HPGL that goes from (0,0) to (0,500) that is 12.5 mm long when printed represents 31.25 mm in the real world.

2. In HPGL, the origin of the printing space is placed in the lower left corner with the x-axis pointing to the right. No negative coordinates are allowed.

This Attribute does not compensate for any radiographic geometric magnification effect caused by the diverging X-ray beam in the projection patient images used for planning. Such compensation is the responsibility of the application based on calibration of the imaging process.

C.29.1.2.1.2 HPGL Document

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.

C.29.1.2.1.2.1 Scope

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.

C.29.1.2.1.2.2 Syntax

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

Command Parameter Meaning
IN - Initalize.
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.

[pic]

Figure C.29.1.2-1 DICOM-HPGL Document

[pic]

Figure C.29.1.2-2DICOM-HPGL Document – Example