How to use the pylinac.utilities.file_exists 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 / pylinac / py_gui.py View on Github external
def analyze_log():
            log = log_analyzer.load_log(self.log_file.get())
            name, _ = osp.splitext(self.log_file.get())
            fname = name + '.pdf'
            fname = utilities.file_exists(fname)
            log.publish_pdf(fname)
            self.log_pdf.set(fname)
            utilities.open_path(fname)
github jrkerns / pylinac / pylinac / py_gui.py View on Github external
def analyze_wl():
            if osp.isdir(self.wl_file.get()):
                wl = winston_lutz.WinstonLutz(self.wl_file.get())
                fname = osp.join(self.wl_file.get(), 'W-L Analysis.pdf')
            else:
                wl = winston_lutz.WinstonLutz.from_zip(self.wl_file.get())
                fname = self.wl_file.get().replace('.zip', '.pdf')
            fname = utilities.file_exists(fname)
            wl.publish_pdf(fname)
            self.wl_pdf.set(fname)
            utilities.open_path(fname)
github jrkerns / pylinac / pylinac / py_gui.py View on Github external
def analyze_phan():
            phantom = getattr(planar_imaging, self.phan_type.get())(self.phan_file.get())
            phantom.analyze()
            name, _ = osp.splitext(self.phan_file.get())
            fname = name + '.pdf'
            fname = utilities.file_exists(fname)
            phantom.publish_pdf(utilities.file_exists(fname))
            self.phan_pdf.set(fname)
            utilities.open_path(fname)
github jrkerns / pylinac / pylinac / py_gui.py View on Github external
def analyze_phan():
            phantom = getattr(planar_imaging, self.phan_type.get())(self.phan_file.get())
            phantom.analyze()
            name, _ = osp.splitext(self.phan_file.get())
            fname = name + '.pdf'
            fname = utilities.file_exists(fname)
            phantom.publish_pdf(utilities.file_exists(fname))
            self.phan_pdf.set(fname)
            utilities.open_path(fname)
github jrkerns / pylinac / pylinac / py_gui.py View on Github external
def analyze_star():
            star = starshot.Starshot(self.star_file.get(), sid=self.star_sid.get(),
                                     dpi=self.star_dpi.get())
            star.analyze(radius=self.star_radius.get(), tolerance=self.star_tolerance.get(),
                         recursive=self.star_recursive.get())
            name, _ = osp.splitext(self.star_file.get())
            fname = name + '.pdf'
            fname = utilities.file_exists(fname)
            star.publish_pdf(fname)
            self.star_pdf.set(fname)
            utilities.open_path(fname)
github jrkerns / pylinac / pylinac / py_gui.py View on Github external
def analyze_vmat():
            images = (self.vmat_openimg.get(), self.vmat_dmlcimg.get())
            if self.vmat_test.get() == 'DRGS':
                v = vmat.DRGS(image_paths=images)
            else:
                v = vmat.DRMLC(image_paths=images)
            v.analyze(tolerance=self.vmat_tol.get())
            fname = osp.join(self.vmat_dmlcimg.get().replace('.dcm', '.pdf'))
            fname = utilities.file_exists(fname)
            v.publish_pdf(fname)
            self.vmat_pdf.set(fname)
            utilities.open_path(fname)
github jrkerns / pylinac / pylinac / py_gui.py View on Github external
def analyze_cbct():
            if osp.isdir(self.ct_file.get()):
                cat = getattr(ct, self.ct_catphantype.get())(self.ct_file.get())
                fname = osp.join(self.ct_file.get(), 'CBCT Analysis.pdf')
            else:
                cat = getattr(ct, self.ct_catphantype.get()).from_zip(self.ct_file.get())
                fname = self.ct_file.get().replace('.zip', '.pdf')
            cat.analyze(hu_tolerance=self.ct_hu.get(), thickness_tolerance=self.ct_thickness.get(),
                        scaling_tolerance=self.ct_scaling.get())
            fname = utilities.file_exists(fname)
            cat.publish_pdf(fname)
            self.ct_pdf.set(fname)
            utilities.open_path(fname)