diff --git a/invesalius/control.py b/invesalius/control.py index 40c4b7d..84a0f08 100644 --- a/invesalius/control.py +++ b/invesalius/control.py @@ -630,4 +630,4 @@ class Controller(): def ShowBooleanOpDialog(self, pubsub_evt): dlg = dialogs.MaskBooleanDialog(prj.Project().mask_dict) - dlg.ShowModal() + dlg.Show() diff --git a/invesalius/data/cursor_actors.py b/invesalius/data/cursor_actors.py index 5dba5f9..657de4b 100644 --- a/invesalius/data/cursor_actors.py +++ b/invesalius/data/cursor_actors.py @@ -312,8 +312,6 @@ class CursorCircle(CursorBase): y,x = numpy.ogrid[yi:yf, xi:xf] - print "AREA", x - index = (y*sy)**2 + (x*sx)**2 <= r**2 self.points = index diff --git a/invesalius/data/slice_.py b/invesalius/data/slice_.py index b3b3008..4101cbb 100644 --- a/invesalius/data/slice_.py +++ b/invesalius/data/slice_.py @@ -370,7 +370,6 @@ class Slice(object): # "if" is necessary because wx events are calling this before any mask # has been created print "__show_mask" - print "self.current_mask", self.current_mask if self.current_mask: index, value = pubsub_evt.data self.ShowMask(index, value) @@ -805,7 +804,6 @@ class Slice(object): """ self.current_mask.was_edited = False thresh_min, thresh_max = threshold_range - print "Threshold" if self.current_mask.index == index: # TODO: find out a better way to do threshold @@ -817,7 +815,6 @@ class Slice(object): m[m == 1] = 255 self.current_mask.matrix[n+1, 1:, 1:] = m else: - print "Only one slice" slice_ = self.buffer_slices[orientation].image self.buffer_slices[orientation].mask = (255 * ((slice_ >= thresh_min) & (slice_ <= thresh_max))).astype('uint8') @@ -873,7 +870,6 @@ class Slice(object): #--------------------------------------------------------------------------- def CreateSurfaceFromIndex(self, pubsub_evt): - print pubsub_evt.data surface_parameters = pubsub_evt.data proj = Project() @@ -1112,7 +1108,6 @@ class Slice(object): else: thresh_min, thresh_max = self.current_mask.threshold_range - print ">>>> THreshold", thresh_min, thresh_max m = (((slice_matrix >= thresh_min) & (slice_matrix <= thresh_max)) * 255) m[mask == 1] = 1 m[mask == 2] = 2 @@ -1380,8 +1375,6 @@ class Slice(object): for buffer_ in self.buffer_slices.values(): buffer_.discard_buffer() - print type(self.matrix) - def OnExportMask(self, pubsub_evt): pass ##imagedata = self.current_mask.imagedata diff --git a/invesalius/data/styles.py b/invesalius/data/styles.py index 3200f67..4c7c13a 100644 --- a/invesalius/data/styles.py +++ b/invesalius/data/styles.py @@ -1381,9 +1381,6 @@ class WaterShedInteractorStyle(DefaultInteractorStyle): ##tmp_image = ndimage.morphological_gradient((image - image.min()).astype('uint16'), self.config.mg_size) #tmp_mask = watershed_ift(tmp_image, markers.astype('int8'), bstruct) - print "mask.max >>>", tmp_mask.max() - print "mask.min >>>", tmp_mask.min() - if self.viewer.overwrite_mask: mask[:] = 0 mask[tmp_mask == 1] = 253 diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py index a2ade53..2952694 100755 --- a/invesalius/data/viewer_slice.py +++ b/invesalius/data/viewer_slice.py @@ -1228,7 +1228,6 @@ class Viewer(wx.Panel): "Inserting actors" actors, n = pubsub_evt.data pos = self.scroll.GetThumbPosition() - print actors #try: #renderer = self.renderers_by_slice_number[n] #for actor in actors: diff --git a/invesalius/gui/data_notebook.py b/invesalius/gui/data_notebook.py index 31f9de3..63a7df5 100644 --- a/invesalius/gui/data_notebook.py +++ b/invesalius/gui/data_notebook.py @@ -433,7 +433,6 @@ class MasksListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): self.SetItemImage(key, 0) def __hide_current_mask(self, pubsub_evt): - print self.mask_list_index.keys() self.SetItemImage(self.current_index, 0) def __init_columns(self): diff --git a/invesalius/gui/default_viewers.py b/invesalius/gui/default_viewers.py index c31f801..948cb75 100644 --- a/invesalius/gui/default_viewers.py +++ b/invesalius/gui/default_viewers.py @@ -457,7 +457,6 @@ class VolumeToolPanel(wx.Panel): self.id_cutplane = None submenu = wx.Menu() for name in const.RAYCASTING_TOOLS: - print name id = wx.NewId() if not(self.id_cutplane): self.id_cutplane = id diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py index a1e40a9..8142501 100644 --- a/invesalius/gui/dialogs.py +++ b/invesalius/gui/dialogs.py @@ -1489,7 +1489,10 @@ class WatershedOptionsDialog(wx.Dialog): class MaskBooleanDialog(wx.Dialog): def __init__(self, masks): - wx.Dialog.__init__(self, wx.GetApp().GetTopWindow(), -1, _(u"Boolean operations")) + pre = wx.PreDialog() + pre.Create(wx.GetApp().GetTopWindow(), -1, _(u"Boolean operations"), style=wx.DEFAULT_DIALOG_STYLE|wx.FRAME_FLOAT_ON_PARENT|wx.STAY_ON_TOP) + self.PostCreate(pre) + self._init_gui(masks) self.CenterOnScreen() diff --git a/invesalius/gui/frame.py b/invesalius/gui/frame.py index 6538c28..895beb0 100644 --- a/invesalius/gui/frame.py +++ b/invesalius/gui/frame.py @@ -475,7 +475,6 @@ class Frame(wx.Frame): Publisher.sendMessage('Show import directory dialog') def ShowRetrieveDicomPanel(self): - print "teste.............." Publisher.sendMessage('Show retrieve dicom panel') def ShowOpenProject(self): @@ -506,15 +505,12 @@ class Frame(wx.Frame): Publisher.sendMessage('Reload actual slice') def OnUndo(self): - print "Undo" Publisher.sendMessage('Undo edition') def OnRedo(self): - print "Redo" Publisher.sendMessage('Redo edition') def OnMaskBoolean(self): - print "Mask boolean" Publisher.sendMessage('Show boolean dialog') def OnCleanMask(self): @@ -1376,7 +1372,6 @@ class SliceToolBar(AuiToolBar): for item in self.enable_items: state = self.GetToolToggled(item) if state and (item != id): - print ">>>>", item self.ToggleTool(item, False) #self.ToggleTool(const.SLICE_STATE_SCROLL, self.GetToolToggled(const.SLICE_STATE_CROSS)) #self.Update() @@ -1691,11 +1686,9 @@ class HistoryToolBar(AuiToolBar): self.SetToolNormalBitmap(ID_LAYOUT,self.BMP_WITH_MENU) def OnUndo(self, event): - print "Undo" Publisher.sendMessage('Undo edition') def OnRedo(self, event): - print "Redo" Publisher.sendMessage('Redo edition') def OnToggle(self, event): diff --git a/invesalius/gui/task_exporter.py b/invesalius/gui/task_exporter.py index afd143d..ec3f5c5 100644 --- a/invesalius/gui/task_exporter.py +++ b/invesalius/gui/task_exporter.py @@ -257,7 +257,6 @@ class InnerTaskPanel(wx.Panel): menu.Bind(wx.EVT_MENU, self.OnMenuPicture) def OnMenuPicture(self, evt): - print "OnMenuPicture" id = evt.GetId() value = dlg.ExportPicture(self.id_to_name[id]) if value: @@ -273,7 +272,6 @@ class InnerTaskPanel(wx.Panel): def OnLinkExportMask(self, evt=None): project = proj.Project() - print "OnLinkEportMask" if sys.platform == 'win32': project_name = project.name else: @@ -290,7 +288,6 @@ class InnerTaskPanel(wx.Panel): if dlg.ShowModal() == wx.ID_OK: filename = dlg.GetPath() - print "filename", filename extension = "vti" if sys.platform != 'win32': if filename.split(".")[-1] != extension: diff --git a/invesalius/gui/task_slice.py b/invesalius/gui/task_slice.py index 780dc5c..41d3ebf 100644 --- a/invesalius/gui/task_slice.py +++ b/invesalius/gui/task_slice.py @@ -305,7 +305,6 @@ class InnerFoldPanel(wx.Panel): self.__bind_pubsub_evt() def __calc_best_size(self, panel): - print "Best size", self.GetSize() parent = panel.GetParent() q = panel.Reparent(self) @@ -335,8 +334,6 @@ class InnerFoldPanel(wx.Panel): #if self.last_size is None or self.last_size.GetHeight() < size.GetHeight(): #self.SetInitialSize(size) - print "Best size", size, self.GetSize(), self.GetClientSize(), q - def __bind_evt(self): self.fold_panel.Bind(fpb.EVT_CAPTIONBAR, self.OnFoldPressCaption) @@ -494,7 +491,6 @@ class MaskProperties(wx.Panel): self.combo_thresh.Delete(i) def OnRemoveMasks(self, pubsub_evt): - print "OnRemoveMasks" list_index = pubsub_evt.data for i in list_index: self.combo_mask_name.Delete(i) diff --git a/invesalius/gui/task_surface.py b/invesalius/gui/task_surface.py index 64a87d7..a830436 100644 --- a/invesalius/gui/task_surface.py +++ b/invesalius/gui/task_surface.py @@ -512,7 +512,6 @@ class SurfaceProperties(wx.Panel): name = pubsub_evt.data[1] colour = [value*255 for value in pubsub_evt.data[2]] i = 0 - print name, index, self.surface_list try: i = self.surface_list.index([name, index]) overwrite = True diff --git a/invesalius/gui/widgets/gradient.py b/invesalius/gui/widgets/gradient.py index 5b581c9..e93dd95 100755 --- a/invesalius/gui/widgets/gradient.py +++ b/invesalius/gui/widgets/gradient.py @@ -475,7 +475,6 @@ class GradientCtrl(wx.Panel): def ChangeMinValue(self, e): # Why do I need to change slide min value if it has been changed for # the user? - print "ChangeMinValue", self.slided if not self.slided: self.gradient_slider.SetMinValue(int(self.spin_min.GetValue())) self._GenerateEvent(myEVT_THRESHOLD_CHANGE) @@ -496,10 +495,8 @@ class GradientCtrl(wx.Panel): def _GenerateEvent(self, event): if event == myEVT_THRESHOLD_CHANGING: self.changed = True - print 'changing' elif event == myEVT_THRESHOLD_CHANGED : self.changed = False - print 'changed' evt = SliderEvent(event, self.GetId(), self.min_range, self.max_range, self.minimun, self.maximun) diff --git a/invesalius/gui/widgets/slice_menu.py b/invesalius/gui/widgets/slice_menu.py index 0b8656c..8dccc38 100644 --- a/invesalius/gui/widgets/slice_menu.py +++ b/invesalius/gui/widgets/slice_menu.py @@ -258,7 +258,6 @@ class SliceMenu(wx.Menu): Publisher.sendMessage('Update slice viewer') elif key in PROJECTIONS_ID: - print 'Key', key pid = PROJECTIONS_ID[key] Publisher.sendMessage('Set projection type', pid) Publisher.sendMessage('Reload actual slice') -- libgit2 0.21.2