Photo-Digitizer user’s manual

Version 1.18 (2005/01/30) Tadeusz Jedynak

Working with the programme. 2

Functions of keys. 3

Introduction of contour 3

Introduction of PC.. 3

Introduction of a scaling segment 3

Measuring the distance. 3

Densitometer 4

Menu File. 5

Open photo image. 5

Save photo image. 5

Save as contour 5

Save as mantle field (Mantel) 6

Print 6

Printer Setup. 6

Menu Edit 6

Scaling Menu. 6

Check dimensions. 6

Introduce segment of 5 cm.. 6

Introduce arbitrary scaling segment 6

Tool balk icons explanation. 6

Introduction of contours. 7

Correcting contours. 7

Introduction of PC.. 8

 

Functionality of a computer is determined by the flexibility of its software. Almost equally essential, however, is the convenience of using it. A significant step towards improving this convenience of use is the programme presented below, which hopefully sets a new direction in programming and application of photography. I invite you to familiarize with the programme, as it can functionally replace an expensive and scarcely accessible engineer’s digitizer. The Photo-Digitizer programme helps to analyze:

·       Photographs from digital cameras

·       Bit maps from scanners

·       Other images.

The purpose is to introduce to the computer scaled information on geometrical dimensions of  objects. Currently, they may be introduced in the form of:

·       P points presented as coordinates (x,y)

·       Lines in form of vectors (P1,P2)

·       Broken lines as sequences of segments (p1, p2, p3,……., pN).

At present, the programme is able to read non-compressed bit maps BMP and packed JPEG files, it recognizes also ICO, EMF and WMF files. Important feature of the programme is that the introduced objects may be very large (buildings, planes) as well as very small- taken with camera lenses designed for macro type photography (ants, insects or flowers).

Further in the description we will focus on a narrow application of this programme for introduction of patient’s contours or irradiation field in radiotherapy planning.

 

Working with the programme

Explaining the way of working with the programme will facilitate evaluation of programme’s applicability and help to learn its operation. I invite you therefore to read this short chapter.

Our task is to introduce the patient’s contour in 1:1 scale. We have at our disposal the film of tomographic image with the 5 cms segment marked on it. At the very beginning we have to copy this file into the computer. The simplest way to do this is to make a photograph of the film illuminated on negatoscope with a digital camera. After connecting the camera to computer the photograph may be copied to hard disc. A default folder for the programme to search for image files is: “Installation place\photo\”. Installation place is usually located at: “C:\Program files\ALFARD\”.

Now, we open the file PhotoDigitizer.exe and proceed according to a sequence set by the sequence of icons in the tool balk:

·       Introduction of contours

·       Introduction of PC workstation

·       Introduction of a scaling segment

·       Checking dimensions

·       Saving results to a file in hard disc as patient’s contours

That is a concise way of describing the actions that should be taken. There are also some issues that are in a way hidden and unnecessary in programme’s exploitation but serve as documentation of principles of its operation. In this respect, it should be stressed that scaling takes place only when we:

·       Check dimensions

·       Save contours.

All the introduced points, those forming vertexes of broken lines and those as PC are remembered by the programme as numbers being screen coordinates for the analyzed image. Introduction of a scaling segment does not change these coordinates, but only determines a scaling multiplier that is displayed in the left bottom corner of a programme’s format.

 

Functions of keys

Working with the menu and windows is typical for the Windows application and therefore will not be explained. The main subject of explanation will be functions of keys when mouse cursor is on surface of the image. 

 

Introduction of contour

Left button of the mouse introduces the point, that may be a vertex of broken line or the PC point. Pressing the left button starts and releasing it ends the positioning of the point. The right button ends (closes) the introduced contour at the moment of pressing it.

 

Introduction of PC

Entry into the mode of introduction of PC points is possible in two ways: first is pressing the proper key in the tool balk, second- pressing and holding CTRL key on the keyboard.

Left button of the mouse introduces PC. The first introduced PC point is always a starting point (0,0) of coordinates system, marked by two lines forming a cross. Pressing and holding the SHIFT key causes moving of the offset point.

 

Introduction of a scaling segment

Use the left mouse button to introduce the beginning and end of the segment. There will be drawn a line described by a model distance of 5 cm or any other introduced distance.

 

Measuring the distance

Press the left mouse button at the starting point of the measurement and after moving it to the ending point release the button. Measurement displays the real distance taking into account a scaling factor. After the mouse button is released, description of the segment remains on the screen.

 

Densitometer

In version 1.16 under measurement of distance, a densitometer function was concealed. Simultaneously with distance measurement colour intensity measurement is performed. This is done in a RGB standard (red, green, blue) in selected points of the measurement section. Results of the measurement are saved to hiding box in form of a text formatted into columns. In the first column there are abscissas scaled according to calibration distances, 3 successive columns are RGB intensities. The content of hiding box is prepared to be saved to a DVPP programme (editor of measurement data), that will create measurement scans. The text formatted into columns may be also saved to other programmes of data edition e.g. Excel, which will also enable drawing a profile or a drop with depth.

Fig. 1

Course of action should be as follows:

We perform measurements using a film

After developing, we transmit the image to computer:

A digital image (Fig. 1) should be saved to PhotoDigitizer programme and scaled. Scaling requires the user to introduce the beginning and ending of a segment, with the known length- here, it is 15 cm. The next step is measuring the distance, which is 229 mm in our example. Underneath the segment blackening is read-out in over 100 points and information about this has been put into a hiding box. After copying it to the measurement edition programme we will obtain a proper measurement scan (Fig. 2).    

Fig. 2

Menu File

The general look of the programme is presented on Fig.3.

 

Open photo image

It enables access to photography files or other bit map pictures. It is based on a typical dialog box concept for opening and reading files, marking files interesting for the user and introducing them to an image window. It results in deleting a previous image but any contours that were made remain.

 

Save photo image

It enables saving an existing image with contours as a compressed bit map. JPG file is created and its name is given automatically according to current date and hour, for example “Pic04-09-02-125900.jpg”. After saving, the name of the saved file will appear on the status balk.

 

Save as contour

The introduced contours will be saved in ALFARD outlines format.

 

Save as mantle field (Mantel)

The introduced contours will be saved in ALFARD mantle fields format.

 

Print

Prints the current bitmap image.

 

Printer Setup

Activates a typical dialog window for setting the printer settings.

 

Menu Edit

Scaling Menu

Check dimensions

Searches for the smallest rectangle comprising all the introduced data and after taking into account the scaling coefficient it shows dimensions of this rectangle on the status balk.

 

Introduce segment of 5 cm

Enables introduction of two points determining the beginning and the end of a scaling segment, the length of which is set on 5 cm. Subsequently the scaling coefficient is computed on the basis of pixel distance.

 

Introduce arbitrary scaling segment

Enables introduction of two points determining the beginning and the end of a scaling segment, the length of which is set earlier. Subsequently the scaling coefficient is computed on the basis of pixel distance.

 

Tool balk icons explanation

Application of a tool balk should facilitate understanding and operation of the programme. Succeeding icons determine successive actions that should be undertaken. The sequence is not obligatory but strongly recommended by  the author.

Fig. 3

Introduction of contours

The first icon that is active after initiating the programme serves for activating introduction of contours mode.

 

Correcting contours

The second icon permits to correct existing contours. There are two modifying algorithms:  the first shifts the point, the second generates a new point and permits for its arbitrary location. In order to shift a point (left side of Fig. 4) set the mouse cursor as close as possible to the point, press the button and hold it while shifting the cursor to a new position. The second, more interesting way of correcting a contour requires the user to set the mouse cursor in the middle of a segment that connects points A and B (red area on Fig. 4) and by pressing the mouse button create a new point C, that may be arbitrarily placed but which, in sequence,  will always be between points A and B.

Fig. 4

 Introduction of PC

The third icon activates PC introduction mode. These are the points that in planning have the function of Centering Points and in mantle fields- of points where the dose will be computed. The first point has a special meaning- it is a starting or offset point. This kind of point determines in planning coordinates (0,0) for outlines and constitutes a beam axis for Mantles. The Offset Point is marked by lines forming a cross. In order to shift it, the user should press the SHIFT key on the keyboard, set the mouse cursor on a new offset position and press the left mouse button.