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