@@ -88,7 +88,6 @@ def __init__(self, app):
88
88
self .ui .setupUi (self )
89
89
self .app = app
90
90
91
-
92
91
# Store app-specific data such as last directory browsed
93
92
self .app_data = AppData ()
94
93
self .opttab_populate_patterns ()
@@ -103,6 +102,7 @@ def __init__(self, app):
103
102
self .current_row = 0
104
103
# Set to "" or NA so that HARP can record in the log and GUI there is no data for these parameters. Will be
105
104
# updated later if parameters are identified.
105
+ self .input_folder = None
106
106
self .scan_folder = "NA"
107
107
self .recon_log_path = "NA"
108
108
self .f_size_out_gb = ""
@@ -660,16 +660,18 @@ def get_recon_man(self):
660
660
:func:`autofill.get_pixel()`,
661
661
"""
662
662
# Get the information from the dialog box
663
- file_dialog = QtGui .QFileDialog (self )
664
- file = file_dialog .getOpenFileName ()
663
+ if self .input_folder :
664
+ recon_log_path = QtGui .QFileDialog .getOpenFileName (self , 'Select recon log' , self .input_folder )
665
+ else :
666
+ recon_log_path = QtGui .QFileDialog .getOpenFileName (self , 'Select recon log' )
665
667
666
668
# If a file was chosen get pixel size and update paramaters
667
- if file :
669
+ if recon_log_path :
668
670
try :
669
671
# Set the text on the recon file box on the GUI
670
- self .ui .lineEditCTRecon .setText (file )
672
+ self .ui .lineEditCTRecon .setText (recon_log_path )
671
673
# Check it is an actual path (prob not required)
672
- self .recon_log_path = os .path .abspath (str (file ))
674
+ self .recon_log_path = os .path .abspath (str (recon_log_path ))
673
675
# Open the log file as read only
674
676
recon_log_file = open (self .recon_log_path , 'r' )
675
677
# Get pixel size from log file
0 commit comments