Evaluation of cartesian coordinates and radiation doses in points determined with stereo X-ray techniques

Evaluation of cartesian coordinates and radiation doses in points determined with stereo X-ray techniques

Computer Programs in Biomedicine 9 (1979) 141-148 © Elsevier/North-Holland Biomedical Press EVALUATION OF CARTESIAN COORDINATES AND RADIATION DOSES ...

834KB Sizes 0 Downloads 59 Views

Computer Programs in Biomedicine 9 (1979) 141-148

© Elsevier/North-Holland Biomedical Press

EVALUATION OF CARTESIAN COORDINATES AND RADIATION DOSES IN POINTS DETERMINED WITH STEREO X-RAY TECHNIQUES P.R.M. STORCHI and H.J. VAN KLEFFENS Computer Department, Rotterdamsch Radio Therapeutisch Instituut, Dr. Daniel den Hoed Kliniek, Gr. Hilledijk 297, P.O. Box 5201, Rotterdam 3024, The Netherlands

A Fortran computer program STEV (stereo evaluation) is described. The principles of the stereo techniques together with the calculation method of the stereo coordinates are given briefly. The determination of the rectangular coordinates from mean stereo coordinates is described. Radiation doses in anatomical points, during intracavitary and interstitial radiation therapy, are calculated, taking into account a statistical evaluation of the measurement errors. Stereo

Radiation dosimetry

Fortran

metry will be given elsewhere [4]. The present paper describes a Fortran program which evaluates the coordinates measured with stereo techniques and calculates dose values taking into account the possible errors in the measurement.

1. Introduction Shortly after the discovery of X-rays by R6ntgen in 1895 the possibility of X-ray stereoscopy was demonstrated by Levy Dorn in 1897. Since that time attempts have been made to determine the position o f points in space from stereo X-ray photographs. The method of stereo X-ray photogrammetry was born. The development of the method has been well described by K6hnle [1] and Rosenow [2]. The principles of the method can be found in Hallert [3 ]. In the Rotterdamsch Radio Therapeutisch Instituut (RRTI) the method is employed for measuring anatomical points suspected of a high radiation dose during the treatment of carcinoma o f the cervix uteri by irradiation with intracavitary sources. The stereo technique uses two X-ray tubes with a base (distance between the focal spots) of 189 mm. The focus film distance is 1145 mm. A rapid change of the X-ray film cassettes is effectuated by a remotely controlled and pneumatically driven cassette changer, which has been developed in the RRTI for this purpose. A photograph of the X-ray equipment and cassette changer is shown in fig. 1. A photograph of the stereo X-ray comparator used for the measurements of the stereo coordinates is shown in fig. 2. A more extensive description of the method of stereo X-ray photograrn-

Fig. 1. Stereo X-ray equipment with remotely-controlled pneumatically-driven cassette changer. The shielding of one of the three cassettes is opened. 141

142

P.R.M. Storchi, H.J. van Kleffens, Cartesian coordinates and radiation doses in stereo X-ray --

Z

Fig. 2. Stereo X-ray comparator as manufactured by Zeiss.

2. Computational methods 2.1. Method o f calculation o f Cartesian coordinates from stereo coordinates

The calculation of Cartesian coordinates of a point P is explained referring to fig. 3. F1 and F 2 are the positions of the two focal spots. F'I, F~ a n d P ' are the projections ofF1, F2 and P upon the film plane. The stereo shift P1P2 is measured with the stereo X-ray comparator as well as the distances OPlx and OPl y. OC is a comparator constant: F~ C = CF~ = 1/2b. After some geometrical considerations one obtains for the Z coordinate (fig. 3a):

{~l

IIX

[]'X

'X

%x

~X IIX

Fig. 3a. Three-dimensional geometry. z

F,

b

P1P2 * h OPz = - b + PIP2

For the abscissa one obtains (fig. 3b): Op x -

b * OPlx+PIP2(OCx - 1/2b b +PIP2

Similarly one finds for the ordinate (fig. 3c): OPy -

b * OP1,2y+P1P2 * OCy b + P1P2

2. 2. Computational method for absorbed dose evaluation

The method is based on an approximation of a linear radioactive source by a number of virtual radioactive

o

~P-

P,

P,~

~x

Fig. 3b. Projection of fig. 3a in XZ plane for calculation of coordinates Px and Pz

P.R.M. StorchL H.Z van Kleffens, Cartesian coordinates and radiation doses in stereo X-ray

143

/a

attenuation coefficient of the encapsulating material S(xi) correction factor for attenuation and scatter contribution at a distance xi from the source

3. P r o g r a m d e s c r i p t i o n

The program STEV (stereo e_valuation) has two tasks. The first task is to compute the Cartesian coordinates of and the distances between points from measured stereo coordinates in an interactive mode. The second task is to compute the absorbed radiation doses using a library of available radiation sources for intracavitary use. 3.1. Input mode

Fig. 3c. Projection of fig. 3a in YZ plane for calculation of ordinate Py.

point sources. This eliminates the time-consuming calculation with a Sievert integral. The contributions by the point sources to the dose at an anatomical point are added, taking into account the attenuation by encapsulating material, the scatter contribution in and the attenuation by - surrounding tissues. The absorbed dose value Dp in point P is expressed as" n

Patient information (name, status no., remarks), stereo coordinates and other variable data (origin, source name) are entered by keyboard. Different calculations and editing possibilities (functions) are selected through special keys on the keyboard, indicated by a keyboard overlay. For a list of these functions see section 3.6. Data needed for the computation of the absorbed radiation doses are retrieved from two files on diskette. The first file, INSOFILE, contains specific information on intracavitary radiation sources (see section

2.2). The second file, STEVFILE, contains less specific information such as - coordinates of points needed for the transformation (characteristic pointsXsee section 3.4) - standard treatment time and dosage - coordinates of one point (check-point) and the absorbed dose value in that point 3.2. Output mode

Dp = ~ K A---~.~exp(-/ax;) S(xi) i= 1

X i

with: K factor taking into account the nature and the absorption of the emitted radiation Ai activity of the virtual point source i xi distance from the virtual point source i to an anatomical point x~ path length through the encapsulating material

The entered and computed data are displayed on scope. Hard copies are retrievable by a hard copy unit and a matrix line printer. 3. 3. Measured statistics

The program assumes that a measurement of a vector (in the stereo coordinate system):

P.R.M. Storchi, H.Z van Kleffens, Cartesian coordinates and radiation doses in stereo X-ray

144

Ps = (xs, Ys, Px) t is represented by a random variable p~which is multinormally distributed with a known matrix ofcovariance Cs specific for the Zeiss stereo photocomparator. It is also assumed that after the conversion from stereo to Cartesian coordinates the vector p = (x, y, z)' is multinormaUy distributed with a matrix of covariance C c, given by [5]: Ce = TCsT t

where fro translates the Pi firstly to the space around the origin and after rotation ~R,frq translates them to the corresponding qi.

3.4.1. The translation The vectors of translation are chosen such that the centres of gravity of the two sets {Pi} and {qi} coincide after translation. That is~rp have translation vector: tl

where

qo :L n i=l

T=

ax

Ox

ax

~xs ay

ays ay

~Px ay

Oxs Oz

Oys Oz

aPx Oz

axs

ays

aPx

and ~q have translation vector: n

_gq

=--

n i=1

qi

The coincidence of the centres of gravity gives the minimum of the quantity: n

(qi - ~q" ~Oi) 2

3.4. The transformation i=1

In order to compute the absorbed dose at a certain point, the program must transform that point in the system of coordinates in which the radioactive source data are stored in the file. This transformation is calculated with the help of 'characteristic points' which are points on the contour of the radioactive source having an easily recognizable position (see fig. 4). Up to 6 characteristic points can be entered. The calculation uses a least-squares method, transforming the measurement characteristic points (Pt, i = 1 ..... n) to the corresponding characteristic points (qi, i = 1, ..., n) which are recorded in STEVFILE. It is assumed that all the random variables Pi, i = 1, ..., n, of the characteristic points have one and the same matrix of covariance C, for the characteristic points are located such, that the differences in C can be neglected. The transformation would be completely described by a rotation and a translation. A rotation performed by a matrix product however, has to take place around the origin. For this reason firstly a translation to the origin has to be carried out. So the transformation will be the product:

Further is go (random variable) such a linear combination of the Pi, i.e.: n

i =1

~iPi

with n

~Oti= l=l

I

that have the least variance in all its coordinates.

3. 4. 2. The rotation Let now pt=pi-go,

i = 1, ...,n

and qi - q i - - g q ,

i=

1,...,n

The rotation is defined by the rotation matrix R which minimizes : n

¢(R ) = ~

(Or - R q l ) C-I (Or - Rqr ) t

i=1

Let C = SS t (C is positive definite) then S -x (Pi - h i ) ,

145

P.R.M. Storchi, H.Z van Kleffens, Cartesian coordinates and radiation doses in stereo X-ray

where ni is the (unknown) mean of Pi, has a multinormal distribution with mean 0 (vector zero) and matrix of covariance I (unity matrix) [6]. Assuming that the same is valid for: 6i(R) = S -1 (p~ - Rq~), i = 1 .... ,n when Rq7 is close to pT, then: n

i=l

have a ×2 distribution with 3n - k degrees of freedom where k is the number of estimated parameters [5] : For n = 2 is k = 3 (vector gp) For n = 3 is k = 4 (vector gp and rotation angle) For n 2_ 4 is k = 6 (vector gp, two parameters defining the rotation axis and the rotation angle). The residue min{C(R)} is then tested for a one-sided critical region of size 0.01. If the residue is greater than the critical value a message is added to the output warning for a failure.

Enter stereo: Enter distance:

Enters stereo coordinates of a point Enters two point numbers between which the distance is to be computed List stereo: Provides a list of stereo coordinates List rectangular: Provides a list of computed rectangular coordinates of all entered points List distance: Gives a list of all the pairs of point numbers entered under 'enter distance' and the distance between these points Doses: Computes the absorbed radiation doses in the entered points Application time: Edits the treatment time Print-out: -Retrieves all the entered and computed data on printer Origin: Edits the origin of the rectangular coordinates The origin is set to (0, 0 , 0 ) when the program starts Display doses: Redisplays the computed doses

3.5. Computation o f absorbed dose values

After transformation the program computes the absorbed radiation dose (see section 2.2) in the transformed point and an estimate of the dose for possible statistical deviations. The possible statistical deviations are computed with the help of a virtual point h in which all the radioactivity is thought to be present: k i=1 h-

-

k

Atbi

S~,,

('~ !

V'

?, i i'

( i

t/

:~'\

P

-

t=1 where A i is the activity in the virtual point i, and b i is the location vector of the virtual point i, shifting the transformed point p along the line (p, h) by - 2 , - 1 , +1, +2 times the standard deviation of the distance between p and h. The dose in the check point is also computed and compared with the dose which is recorded in the file. If they are not equal, the program displays an error message and stops all output concerning the dose calculations. 3. 6. List and description o f the function keys

New patient: Return:

Re-initializes the program Edits entered patient information

H Fig. 4. Typical situation of characteristic and anatomical points.

146

P.R.M. Storchi, H.Z van Kleffens, Cartesian coordinates and radiation doses in stereo X-ray

4. Flowchart

N Y

NN



'Eb TER

N

OOE AND HAR. POINTS ~RS

I //o~e t 'NrRAcAvlFAr / rAD,OAcT source ATA FROM FILES POII~ TSNo. + STE EO

(

I,== I FROM POINT NUMBER 7

~AL~ EN ED + CO~

()

P.R.M. Storchi, H.Z van Kleffens, Cartesian coordinates and radiation doses in stereo X-ray

147

E'E X A M F " 1._. Ei~

DATE: '~:;T A ]I_I':-_'; N O PAl IENI NAME F'HYS I r: I AN METER: REMARKS:

1E:/ 2 / 7 7 w 9 "r.=,"-'9 F. XAMFILE X XXX X XXXXX XX X X X

FARGET-FILM DISTANiZ:E = 1 1 4 6 (3 MM SrEREO-SHIFT = 189. C) MM ORIGINE X= r ) r) Y = i) 0 Z--) 0 ***,~..-~

* N * * * . ~ . ~ ~ , ~ * ~ * . ~ . ~ ~.~ ~.~ • ~ * . ~ . ~ ~ * ~ * ~ * *

*

POINT *

* * * *

STEREO F_:OORD. (MM)



*

X



* • * * *

120. 107. 129. 98. 109.

*

Y

* * * * *

1/-.9. 122. 121 152. 169.

0 2 2 0 5

* * * • • •

79 26 26 75 34

X

* 107. 8 .w 97. 5 -* 1 1 7 . 2 ~ 91. 7 * 101. 7

*

Y

*

~ • • • *

172. 130. 129. 155. 172.

/-, * 7 • 5 * 9 ~ 2 •

*

9

*

125. 8 *

164. 7 *

17. 54

*

116. 1 •

* * *

10 11 12

* * *

136. I 17'0. 9 130. 6

173. 2 146. 0 172. 0

16. 6 8 14. 75 17. 4 9

* * *

126. 0 122. 2 i20. 5

* *l *

23. 21. 21. 14. 16

• • • .~.~ ~ * * ~ * - ~ * ~

1 2 3 7 8

* * *

2 9 6 5 8

PX

~.~

REr:TANL-< COORD

167. 7 •

• 175. 4 ~ • 1 4 9 . '.:7, -~ w 174. 4 •

~****

(MM) Z 128. 115. 115 8:3. 91.

1 9 9 0 2

*

97. 3 ~ 9 2 . 'P * 8:':: 0 97. I *

SOURCE: CSUA33 APPLICATION T I M E : 49 HR 2 9 MN 3 SC DOSAGE: 3000. RAD AT 2 CM CENTRAL FROM THE SOURCE CHAR POINT NO. : I 2 3 MEAN CORRECTION: O. I" MM

*

POINT *

* *

NO.

* * * * *

DOSES (RAD)

*********.N * MEAN

7 8 9 10 11 12

* * • * * *

POINTS

809. 1035. 1505. 850 841. 1136.

*****.K

* 9 I 6 1 4 3

* * ~ * * ~

DISTANCE

-1

:-:. D. 857. 1095. 1607. 889. 892. 1195.

(MM)

*

.~ *******

0 0 5 0 8 7

* * -I • * * •

+1

~ ********,~.*.w.***

* * * - N -~*,~ , ~ . * * *

S.D.



766. 980. 1412. 81:3. 794. 1081.

• 5 0 9 6 3 2

-N * ~ * * *

-2

908. 1160. 1719. 930. 94:2. 1259.

STANDARD DDVIATIrff~

1 1

--

"-: 2

45 44

E: 9

0 0

2

..

:-:

19

8

O. 4

S.D. :-: 0 8 6 9 8

• -N * ,~ • ~

+2

S.D.

726. 929. 1328. 779. 750. 1029.

* 4 0 2 4 9 9

* * -~ *

(MM)

6, 6

Fig. 5. STEV printout.

5. Example Figure 4 shows a case where stereo coordinates are measured with the stereocomparator in points of the rectum sigmoidei especially suspected of a high absorbed

dose value during the application. The stereo coordinates will be entered in STEV. 1,2, 3 characteristic points P measured point H holder for sources

148

P.R.M. StorchL H.Z van Kleffens, Cartesian coordinates and radiation doses in stereo X-ray

R radioactive charge U uterus Figure 5 shows an example o f the printout given by STEV. The intracavitary radioactive source used, is coded CSUA 33. This is a caesium, intra-uterine, a_fterloader applicator with an active length of 3__33mm The 'mean correction' is the mean of the distance between the measured characteristic points - after transformation - and the recorded distance between the characteristic points (see section 3.4).

authors at the Computer Department of the Rotterdam Radiotherapeutical Institute, P.O. Box 5201, Rotterdam 3024, The Netherlands.

Acknowledgement This work was financially supported by a grant from the Queen Wilhelrnina Fund for Cancer Research.

References 6. Hardware and software specifications The computer used is a special purpose system for radiotherapy treatment planning. The configuration consists of an Artronix PC 12 with 16 K words memory under OS-PC operating system. A keyboard is used as input device. For output a display with connected hard copy unit and/or a matrix line printer can be employed. Programs and data are stored on linc tapes and/or linc diskettes. The program is written in a limited version of FORTRAN IV and occupies 16 K words.

7. Mode of availability Copies of the program described in this report and additional user information are available from the

[1] H. K6hle, R6ntgenstereoverfahren, Handbuch Med. Radiol. 3 (1967) 220-361. [2] U. Rosenow, Untersuchungen fiber Grundlagen und Leistungsf'~higkeit einer neuen R6ntgen-stereofotogrammetrischen Messmethode, PhD thesis G6ttingen 1969. [3] B. Hallert, X-ray Photogrammetry (Elsevier, Amsterdam/ Condor, New York, 1970). [4] H.J. van Kleffens and W.M. Star, The application of stereo X-ray photogrammetry for the determination of absorbed dose values during intracavitary radiation therapy, Int. J. Rad. Oncol. Biol. Phys. (1978) submitted. [5 ] S. Brandt, Statistical Computational Methods in Data Analysis (North-Holland, Amsterdam, 1970). [6] R.V. Hogg, A.T. Craig, Introduction to Mathematical Statistics, (Macmillans, 3rd edn, 1970).