How to use the pylinac.flatsym.FlatSym.from_demo_image function in pylinac

To help you get started, we’ve selected a few pylinac examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jrkerns / pylinac / tests_basic / test_flatsym.py View on Github external
def test_plot_fails_if_not_analysed(self):
        fs = FlatSym.from_demo_image()
        with self.assertRaises(NotAnalyzed):
            fs.plot_analyzed_image()
github jrkerns / pylinac / tests_basic / test_flatsym.py View on Github external
def create_instance():
    fs = FlatSym.from_demo_image()
    fs.analyze('varian', 'varian')
    return fs
github jrkerns / pylinac / tests_basic / test_flatsym.py View on Github external
def test_pdf_fails_if_not_analyzed(self):
        fs = FlatSym.from_demo_image()
        with self.assertRaises(NotAnalyzed):
            fs.publish_pdf('dummy.pdf')
github jrkerns / pylinac / tests_basic / test_flatsym.py View on Github external
def test_symmetry_methods(self):
        fs = FlatSym.from_demo_image()
        analyze = partial(fs.analyze, flatness_method='varian')
        for method in ('point difference', 'elekta', 'pdq iec'):
            analyze(symmetry_method=method)  # shouldn't raise
github jrkerns / pylinac / tests_basic / test_flatsym.py View on Github external
def test_profile_limits(self):
        """Extreme profile limits should not raise an error"""
        fs = FlatSym.from_demo_image()
        fs.analyze(flatness_method="varian", symmetry_method="varian", vert_position=0.5, horiz_position=0.5, vert_width=0, horiz_width=0)
        fs.analyze(flatness_method="varian", symmetry_method="varian", vert_position=0.0, horiz_position=0.0, vert_width=1, horiz_width=1)
        fs.analyze(flatness_method="varian", symmetry_method="varian", vert_position=1.0, horiz_position=1.0, vert_width=1, horiz_width=1)
github jrkerns / pylinac / tests_basic / test_flatsym.py View on Github external
def test_results_fails_if_not_analyzed(self):
        fs = FlatSym.from_demo_image()
        with self.assertRaises(NotAnalyzed):
            fs.results()