Commit effbb9a2aa1544431774c17b256fffff9cfdd9f2

Authored by tfmoraes
1 parent 0bdbe4a2

FIX: fixed opening by the command line. Related to #132

Showing 1 changed file with 7 additions and 10 deletions   Show diff stats
invesalius/control.py
... ... @@ -107,8 +107,6 @@ class Controller():
107 107  
108 108 # Import project
109 109 dirpath = dialog.ShowImportDirDialog()
110   - ###
111   - print dirpath
112 110 if dirpath and not os.listdir(dirpath):
113 111 dialog.ImportEmptyDirectory(dirpath)
114 112 elif dirpath:
... ... @@ -149,28 +147,27 @@ class Controller():
149 147  
150 148  
151 149 def ShowDialogCloseProject(self):
152   - print "ShowDialogCloseProject"
  150 + utils.debug("ShowDialogCloseProject")
153 151 session = ses.Session()
154 152 st = session.project_status
155   - print "* st", st
156 153 if st == const.PROJ_CLOSE:
157 154 return -1
158 155 filename = session.project_path[1]
159 156 if (st == const.PROJ_NEW) or (st == const.PROJ_CHANGE):
160 157 answer = dialog.SaveChangesDialog(filename)
161 158 if not answer:
162   - print "Close without changes"
  159 + utils.debug("Close without changes")
163 160 self.CloseProject()
164 161 ps.Publisher().sendMessage("Enable state project", False)
165 162 ps.Publisher().sendMessage('Set project name')
166 163 elif answer == 1:
167 164 self.ShowDialogSaveProject()
168   - print "Save changes and close"
  165 + utils.debug("Save changes and close")
169 166 self.CloseProject()
170 167 ps.Publisher().sendMessage("Enable state project", False)
171 168 ps.Publisher().sendMessage('Set project name')
172 169 elif answer == -1:
173   - print "Cancel"
  170 + utils.debug("Cancel")
174 171 else:
175 172 self.CloseProject()
176 173 ps.Publisher().sendMessage("Enable state project", False)
... ... @@ -301,7 +298,7 @@ class Controller():
301 298  
302 299 if len(patients_groups):
303 300 group = dcm.SelectLargerDicomGroup(patients_groups)
304   - imagedata, dicom = self.OpenDicomGroup(group, gui=True)
  301 + imagedata, dicom = self.OpenDicomGroup(group, 0, gui=True)
305 302 self.CreateDicomProject(imagedata, dicom)
306 303 # OPTION 2: ANALYZE?
307 304 else:
... ... @@ -310,7 +307,7 @@ class Controller():
310 307 self.CreateAnalyzeProject(imagedata)
311 308 # OPTION 3: Nothing...
312 309 else:
313   - print "No medical images found on given directory"
  310 + utils.debug("No medical images found on given directory")
314 311 return
315 312 self.LoadProject()
316 313 ps.Publisher().sendMessage("Enable state project", True)
... ... @@ -395,7 +392,7 @@ class Controller():
395 392 interval += 1
396 393 filelist = dicom_group.GetFilenameList()[::interval]
397 394 if not filelist:
398   - print ">Not used the IPPSorter"
  395 + utils.debug("Not used the IPPSorter")
399 396 filelist = [i.image.file for i in dicom_group.GetHandSortedList()[::interval]]
400 397  
401 398  
... ...