Patent Number: 
Section: claims

1. A method comprising:delivering treatment radiation to a target;acquiring a portal image of the target;determining an image based on the portal image and on electron density values of structures represented in the portal image, the image representing the treatment radiation during delivery of the treatment radiation;determining a position of a leaf of a collimator during delivery of the treatment radiation based on the image; andpresenting a notification of an error during delivery of the treatment radiation based on the determined position. 2. A method according to claim 1, further comprising:suspending delivery of the treatment radiation based on the determined position. 3. A method according to claim 1, further comprising:comparing the determined position with a position specified by a treatment plan; anddetermining that the determined position is different from the specified position. 4. A method according to claim 1, further comprising:rotating the image based on a rotation of the collimator specified by a treatment plan; anddetermining if the collimator conforms to the specified rotation based on the rotated image. 5. A method according to claim 1, wherein determining the position of the leaf comprises:determining an image intensity profile representing an area of the image associated with the leaf;determining a second derivative of the image intensity profile; anddetermining the position of the leaf based on zero crossing of the determined second derivative. 6. A method according to claim 1, further comprising:determining a position of a plurality of leaves of the collimator based on the image;comparing the determined positions of the leaves specified by a treatment plan; anddetermining that a total difference between the determined positions and the specified positions exceeds a threshold value. 7. A method according to claim 1, further comprising:identifying each of a plurality of pixels of the image as a shadow pixel or an exposed pixel based on a treatment plan; anddetermining a plurality of the plurality of pixels which are incorrectly identified as a shadow pixel or an exposed pixel based on a threshold pixel value. 8. A method according to claim 7, further comprising:determining the threshold pixel value based on pixels identified as shadow pixels. 9. A method according to claim 1, further comprising:identifying a first area of the image associated with the leaf;identifying a second area of the image associated with a second leaf opposing the first leaf; andcomparing a statistical distribution of pixel values of the first area with a statistical distribution of pixel values of the second area. 10. An apparatus comprising:a linear accelerator to deliver treatment radiation to a target;a collimator comprising a plurality of leaves, the collimator to prevent a portion of the treatment radiation from reaching the target;an imaging device to acquire a portal image of the target;wherein the processor determinesa processor to determine an image based on the portal image and on electron density values of structures represented in the portal image, the image representing the treatment radiation during delivery of the treatment radiation and to determine a position of a leaf of a collimator based on the image and to generate a notification of an error during delivery of the treatment radiation based on the determined position. 11. An apparatus according to claim 10, the processor further to:suspend delivery of the treatment radiation based on the determined position. 12. An apparatus according to claim 10, the processor further to:compare the determined position with a position specified by a treatment plan; anddetermine that the determined position is different from the specified position. 13. An apparatus according to claim 10, the processor further to:rotate the image based on a rotation of the collimator specified by a treatment plan; anddetermine if the collimator conforms to the specified rotation based on the rotated image. 14. An apparatus according to claim 10, wherein determination of the position of the leaf comprises:determining an image intensity profile representing an area of the image associated with the leaf;determining a second derivative of the image intensity profile; anddetermining the position of the leaf based on a zero crossing of the determined second derivative. 15. An apparatus according to claim 10, the processor further to:determine a position of a plurality of leaves of the collimator based on the image;compare the determined positions with positions of the leaves specified by a treatment plan; anddetermine that a total difference between the determined positions and the specified positions exceeds a threshold value. 16. An apparatus according to claim 10, the processor further to:identify each of a plurality of pixels of the image as a shadow pixel or an exposed pixel based on a treatment plan; anddetermine a plurality of the plurality of pixels which are incorrectly identified as a shadow pixel or an exposed pixel based on a threshold pixel value. 17. An apparatus according to claim 16, the processor further to:determine the threshold pixel value based on pixels identified as shadow pixels. 18. An apparatus according to claim 10, the processor further to:identify a first area of the image associated with the leaf;identify a second area of the image associated with a second leaf opposing the first leaf; andcompare a statistical distribution of pixel values of the first area with a statistical distribution of pixel values of the second area.