pylinac icon indicating copy to clipboard operation
pylinac copied to clipboard

_plot_analyzed_subimage method returns an empty pyplot

Open bearner-hca opened this issue 2 years ago • 1 comments

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 download download (1)

Expected behavior Pyplot of the requested subimage. This method was working in version 2.3.2 download (2)

bearner-hca avatar Sep 10 '21 13:09 bearner-hca

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.

samaraprass avatar Jan 03 '22 18:01 samaraprass