def OpenDialog(self, textparam): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog fileName, _ = QFileDialog.getOpenFileName( self, "QFileDialog.getOpenFileName()", "", "All Files (*);;DICOM Files (*.dcm)", options=options) if fileName: leeds = LeedsTOR(fileName) leeds.analyze(low_contrast_threshold=0.01, hi_contrast_threshold=0.5) leeds.plot_analyzed_image(low_contrast=True) leeds.publish_pdf(fileName.title() + '.pdf', metadata={ "name": textparam, "unit": "TrueBeam STX" })
def HightContrast(self): leeds = LeedsTOR(d.pathDir) leeds.plot_analyzed_image(low_contrast=False) leeds.publish_pdf(d.pathDir + '\\resultHightContrast.pdf')