def test_save_image(self): """Test that saving an image does something.""" self.cbct.load_demo_images() self.cbct.analyze(hu_tolerance=10, scaling_tolerance=0.01) for method in ['save_analyzed_image', 'save_analyzed_subimage']: methodcall = getattr(self.cbct, method) save_file(methodcall)
def test_save_axes(self): for methodname in ('save_plot_actual', 'save_plot_expected', 'save_plot_difference'): # save matplotlib figures method = getattr(self.tlog.axis_data.gantry, methodname) save_file(method) # save MPLD3 HTML save_file(method, interactive=True, as_file_object='str')
def test_save_axes(self): for methodname in ('save_plot_actual', 'save_plot_expected', 'save_plot_difference'): # save matplotlib figures method = getattr(self.log.axis_data.mlc.leaf_axes[10], methodname) save_file(method) # save MPLD3 HTML save_file(method, interactive=True, as_file_object='str')
def test_save_to_csv(self): save_file('tester.csv', self.log.to_csv) # without filename should make one based off tlog name self.log.to_csv() time.sleep(0.1) name = self.log._filename_str.replace('.bin', '.csv') self.assertTrue(osp.isfile(name)) os.remove(name) self.assertFalse(osp.isfile(name))
def test_save_subimage(self): for subimage in (DMLC, OPEN, PROFILE): save_file(self.vmat.save_analyzed_subimage, subimage) save_file(self.vmat.save_analyzed_subimage, subimage, as_file_object='bytes') # also do interactive save_file(self.vmat.save_analyzed_subimage, PROFILE, interactive=True) save_file(self.vmat.save_analyzed_subimage, PROFILE, interactive=True, as_file_object='str')
def test_save_axes(self): for methodname in ('save_plot_actual', 'save_plot_expected', 'save_plot_difference'): method = getattr(self.log.axis_data.gantry, methodname) save_file('test.png', method)
def test_save_analyzed_image(self): # save as normal file save_file(self.vmat.save_analyzed_image) # save from buffer save_file(self.vmat.save_analyzed_image, as_file_object='b')
def test_save_image(self): """Test that saving an image does something.""" for method in ['save_analyzed_image', 'save_analyzed_subimage']: methodcall = getattr(self.cbct, method) save_file(methodcall)
def test_save(self): save_file(self.wl.save_summary) save_file(self.wl.save_images)
def test_save_tlog_to_csv(self): save_file(self.tlog.to_csv)
def test_save_analyzed_subimage(self): # save as normal file save_file(self.star.save_analyzed_subimage) # save into buffer save_file(self.star.save_analyzed_subimage, as_file_object='b')
def test_save_analyzed_image(self): """Test that saving an image does something.""" save_file(self.star.save_analyzed_image)
def test_saving_plots(self): self.log.fluence.gamma.calc_map() save_file('test.png', self.log.fluence.gamma.save_map)
def test_saving(self): self.instance.plot_analyzed_image() save_file(self.instance.save_analyzed_image)
def test_saving_image(self): save_file(self.pf.save_analyzed_image) save_file(self.pf.save_analyzed_image, interactive=True)
def test_pdf(self): save_file(self.cbct.publish_pdf, 'temp')
def test_saving_images(self): save_file('test.png', self.vmat.save_analyzed_image)
def test_pdf(self): save_file(self.instance.publish_pdf)
def test_saving_image(self): save_file(self.pf.save_analyzed_image)
def test_save_summary(self): self.log.fluence.gamma.calc_map() save_file(self.log.save_summary)
def test_saving_fluence_plots(self): self.dlog.fluence.gamma.calc_map() save_file(self.dlog.fluence.gamma.save_map) save_file(self.dlog.fluence.gamma.save_histogram)
def test_save(self): save_file(self.dcm.save)
def test_save_to_csv(self): save_file(self.log.to_csv)
def test_saving_fluence_plots(self): self.log.fluence.gamma.calc_map() save_file(self.log.fluence.gamma.save_map) save_file(self.log.fluence.gamma.save_histogram)
def test_save_summary(self): self.tlog.fluence.gamma.calc_map() save_file(self.tlog.save_summary)