示例#1
0
 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)
示例#2
0
 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)
示例#3
0
    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')
示例#4
0
    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')
示例#5
0
    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))
示例#6
0
 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')
示例#7
0
 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')
示例#8
0
 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)
示例#9
0
 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')
示例#10
0
 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)
示例#11
0
 def test_save(self):
     save_file(self.wl.save_summary)
     save_file(self.wl.save_images)
示例#12
0
 def test_save_tlog_to_csv(self):
     save_file(self.tlog.to_csv)
示例#13
0
 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')
示例#14
0
 def test_save_analyzed_image(self):
     """Test that saving an image does something."""
     save_file(self.star.save_analyzed_image)
示例#15
0
 def test_saving_plots(self):
     self.log.fluence.gamma.calc_map()
     save_file('test.png', self.log.fluence.gamma.save_map)
示例#16
0
 def test_saving(self):
     self.instance.plot_analyzed_image()
     save_file(self.instance.save_analyzed_image)
示例#17
0
 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')
示例#18
0
 def test_saving_image(self):
     save_file(self.pf.save_analyzed_image)
     save_file(self.pf.save_analyzed_image, interactive=True)
示例#19
0
 def test_pdf(self):
     save_file(self.cbct.publish_pdf, 'temp')
示例#20
0
 def test_saving_images(self):
     save_file('test.png', self.vmat.save_analyzed_image)
示例#21
0
 def test_saving_image(self):
     save_file(self.pf.save_analyzed_image)
     save_file(self.pf.save_analyzed_image, interactive=True)
示例#22
0
 def test_saving(self):
     self.instance.plot_analyzed_image()
     save_file(self.instance.save_analyzed_image)
示例#23
0
 def test_pdf(self):
     save_file(self.instance.publish_pdf)
示例#24
0
 def test_save_analyzed_image(self):
     """Test that saving an image does something."""
     save_file(self.star.save_analyzed_image)
示例#25
0
 def test_save(self):
     save_file(self.wl.save_summary)
     save_file(self.wl.save_images)
示例#26
0
 def test_saving_image(self):
     save_file(self.pf.save_analyzed_image)
示例#27
0
 def test_save_summary(self):
     self.log.fluence.gamma.calc_map()
     save_file(self.log.save_summary)
示例#28
0
 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')
示例#29
0
 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)
示例#30
0
 def test_save(self):
     save_file(self.dcm.save)
示例#31
0
 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)
示例#32
0
 def test_save_to_csv(self):
     save_file(self.log.to_csv)
示例#33
0
 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)
示例#34
0
 def test_save_summary(self):
     self.tlog.fluence.gamma.calc_map()
     save_file(self.tlog.save_summary)
示例#35
0
 def test_pdf(self):
     save_file(self.instance.publish_pdf)