Problem with LeedTOR

I have a problem while using LeedsTOR: when I run the leeds.analyze() function, the regions of interest are not positioned in the right place. I tried with the parameter invert=true but I still have the same problem. Does anyone have a solution?

Thanks in advance,


This looks like a scaling issue. Is your phantom sitting on the EPID or at isocenter?

The large noise and vertical banding could be affecting the ring detection. I would try applying a gaussian filter first to see if that fixes it.

leeds = LeedsTOR(…)
leeds.image.filter(size=3, kind=‘gaussian’)

There is one other more involved option but let’s see if that fixes it first.

I am using the phantom to evaluate the performances of a conventional radiology imaging. Is pylinac not compatible with this kind of tests?

The Gaussian filter is working but my ftm values are affecting by it size.

I don’t know if others have used it for conventional radiology. In theory, as long as the phantom is at isocenter then it should work. If applying the gaussian filter results in a correct detection then the issue is indeed about the large noise in the image. There is a workaround, which is to override the size of the phantom:

perform the gaussian filter like earlier to get a valid analysis

leeds = LeedsTOR(…)

now take the phantom center location value and pass it to a new analysis

size = leeds.phantom_radius

leeds2 = LeedsTOR(…) # load the same image, but we don’t filter this one
leeds2.analyze(…, size_override=size)

Let me know how it works out.

Thanks! I have good results changing the size.

I’m not using it for conventional radiology but I tried for this use.

With the phantom on top of the detector and using raw images here is the analysis for two images (with or without Cu filter).

The code i used:

from pylinac import LeedsTOR
leeds = LeedsTOR(‘TOR18FG.dcm’)
leeds.analyze(low_contrast_threshold=0.05, high_contrast_threshold=0.5)

Captura de pantalla de 2021-05-12 19-45-52.png

Captura de pantalla de 2021-05-12 19-44-28.png

I think that the only issue is with the High-frequency rMTF because the 9 ROIs used is not enough for the resolution of conventional radiology images.

Good to know, thanks! For my linac kV imaging 9 was more than enough :grin: I can work on including the other ROIs.


It would be fine if you can include more ROIs !

One question: Is there any way to change the estimator for the relative mtf to be the standard deviation of the ROI.

Thanks ?

If you can find a paper or source that uses the standard deviation as the metric for calculating MTF then I will consider adding it. Up to now, I’ve not heard of doing such a thing.