Table C.29.1.2-1 defines the general Attributes of the Generic Implant Template 2D Drawings Module. This module contains all Attributes required for the inclusion of technical 2D drawings in an IOD, e.g. the Implant Template IOD. The module specification contains the definition of a subset of the HPGL plotter language that is used for the graphical definition of the drawings.
Table C.29.1.2-1 GENERIC IMPLANT TEMPLATE 2D DRAWINGS MODULE ATTRIBUTES
|Attribute Name||Tag||Type||Attribute Description|
|HPGL Document Sequence||(0068,62C0)||1||The 2D template representations of this implant. One or more Items shall be included in this sequence.|
|>HPGL Document ID||(0068,62D0)||1||Identification number of the HPGL Document. Uniquely identifies an HPGL Document within this SOP instance. The value shall start at 1, and increase monotonically by 1.|
|>HPGL Document Label||(0068,62D5)||3||Label describing the document.|
|>View Orientation Code Sequence||(0068,62E0)||1||Coded description of the direction of view represented by this 2D template. Only a single Item shall be included in this sequence.|
|>>Include ‘Code Sequence Macro’ Table 8.8-1||Baseline Context ID is 7302.|
|>View Orientation Modifier||(0068,62F0)||3||View Orientation Modifier.|
|>>Include ‘Code Sequence Macro’ Table 8.8-1||Baseline Context ID is 7303.|
|>HPGL Document Scaling||(0068,62F2)||1||Conversion factor (real world mm/printed mm) See C.184.108.40.206.1.|
|>HPGL Document||(0068,6300)||1||The HPGL document as a byte stream. See C.220.127.116.11.2.|
|>HPGL Contour Pen Number||(0068,6310)||1||Numeric ID of the pen used in the encapsulated HPGL document for outlines.|
|>HPGL Pen Sequence||(0068,6320)||1||Labels for each pen used in the encapsulated HPGL Document. One or more Items shall be included in this sequence. Shall contain one item per pen used in the HPGL document.|
|>>HPGL Pen Number||(0068,6330)||1||Numeric ID of the pen in the HPGL document|
|>>HPGL Pen Label||(0068,6340)||1||Label of the pen.|
|>>HPGL Pen Description||(0068,6345)||3||Description of the kind of information drawn with the pen.|
|>Recommended Rotation Point||(0068,6346)||1||Point around which the 2D template is rotated in manual planning, in HPGL coordinates.|
|>Bounding Rectangle||(0068,6347)||1||HPGL coordinates of the smallest rectangle parallel to the paper axes that contains the whole drawing.|
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.
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