pylinac
pylinac copied to clipboard
_plot_analyzed_subimage method returns an empty pyplot
Describe the bug
The _plot_analyzed_subimage
method returns an empty pyplot instead of the requested subimage.
(Same error for _save_analyzed_subimage
which uses _plot_analyzed_subimage
).
To Reproduce
pip install pylinac==3.0
import pylinac
drgs = pylinac.DRGS(image_paths=("rtimage_open.dcm","rtimage_drgs.dcm"))
drgs.analyze()
#Group image correct
drgs.plot_analyzed_image()
#Subimage empty
drgs._plot_analyzed_subimage(subimage="profile")
Screenshots
Expected behavior
Pyplot of the requested subimage. This method was working in version 2.3.2
Hi! I'm not sure if you still need help with this, but i went through the same issue. First, you need to import ImageType from vmat module. Then, you need to specify the subimage. Using your code, should look like this:
import pylinac
from pylinac.vmat import ImageType
drgs = pylinac.DRGS(image_paths=("rtimage_open.dcm","rtimage_drgs.dcm"))
drgs.analyze()
#Group image correct
drgs.plot_analyzed_image()
#Subimage
drgs._plot_analyzed_subimage(ImageType.PROFILE)
This is currently working for me.