Commit b37597e7670d8dfcff54b0d722be852b3329bdab
Exists in
master
and in
54 other branches
Merge remote-tracking branch 'upstream/master'
Showing
4 changed files
with
11 additions
and
70 deletions
Show diff stats
invesalius/constants.py
invesalius/control.py
| ... | ... | @@ -523,7 +523,8 @@ class Controller(): |
| 523 | 523 | if resolution_percentage < 1.0: |
| 524 | 524 | re_dialog = dialog.ResizeImageDialog() |
| 525 | 525 | re_dialog.SetValue(int(resolution_percentage*100)) |
| 526 | - re_dialog_value = re_dialog.ShowModal() | |
| 526 | + re_dialog_value = re_dialog.ShowModal() | |
| 527 | + re_dialog.Close() | |
| 527 | 528 | |
| 528 | 529 | if re_dialog_value == wx.ID_OK: |
| 529 | 530 | percentage = re_dialog.GetValue() | ... | ... |
invesalius/gui/dialogs.py
| ... | ... | @@ -98,7 +98,7 @@ class NumberDialog(wx.Dialog): |
| 98 | 98 | class ResizeImageDialog(wx.Dialog): |
| 99 | 99 | |
| 100 | 100 | def __init__(self):#, message, value=0): |
| 101 | - pre = wx.PreDialog() | |
| 101 | + pre = self.pre = wx.PreDialog() | |
| 102 | 102 | pre.Create(None, -1, "InVesalius 3", size=wx.DefaultSize, |
| 103 | 103 | pos=wx.DefaultPosition, |
| 104 | 104 | style=wx.DEFAULT_DIALOG_STYLE) |
| ... | ... | @@ -149,6 +149,8 @@ class ResizeImageDialog(wx.Dialog): |
| 149 | 149 | def GetValue(self): |
| 150 | 150 | return self.num_ctrl_porcent.GetValue() |
| 151 | 151 | |
| 152 | + def Close(self): | |
| 153 | + self.pre.Destroy() | |
| 152 | 154 | |
| 153 | 155 | def ShowNumberDialog(message, value=0): |
| 154 | 156 | dlg = NumberDialog(message, value) |
| ... | ... | @@ -698,8 +700,8 @@ def ShowAboutDialog(parent): |
| 698 | 700 | |
| 699 | 701 | info = wx.AboutDialogInfo() |
| 700 | 702 | info.Name = "InVesalius" |
| 701 | - info.Version = "3.0 - Beta 4" | |
| 702 | - info.Copyright = _("(c) 2007-2012 Renato Archer Information Technology Center - CTI") | |
| 703 | + info.Version = "3.0 - Beta 5" | |
| 704 | + info.Copyright = _("(c) 2007-2013 Renato Archer Information Technology Center - CTI") | |
| 703 | 705 | info.Description = wordwrap(_("InVesalius is a medical imaging program for 3D reconstruction. It uses a sequence of 2D DICOM image files acquired with CT or MRI scanners. InVesalius allows exporting 3D volumes or surfaces as STL files for creating physical models of a patient's anatomy using rapid prototyping technologies. The software is supported by CTI, CNPq and the Brazilian Ministry of Health.\n\n Contact: invesalius@cti.gov.br"), 350, wx.ClientDC(parent)) |
| 704 | 706 | |
| 705 | 707 | # _("InVesalius is a software for medical imaging 3D reconstruction. ")+\ |
| ... | ... | @@ -707,15 +709,15 @@ def ShowAboutDialog(parent): |
| 707 | 709 | # _("The software also allows generating correspondent STL files,")+\ |
| 708 | 710 | # _("so the user can print 3D physical models of the patient's anatomy ")+\ |
| 709 | 711 | # _("using Rapid Prototyping."), 350, wx.ClientDC(parent)) |
| 710 | - info.WebSite = ("http://svn.softwarepublico.gov.br/trac/invesalius") | |
| 712 | + info.WebSite = ("http://www.cti.gov.br/invesalius") | |
| 711 | 713 | info.License = _("GNU GPL (General Public License) version 2") |
| 712 | 714 | |
| 713 | 715 | info.Developers = ["Paulo Henrique Junqueira Amorim", |
| 714 | 716 | "Thiago Franco de Moraes", |
| 715 | - "Guilherme Cesar Soares Ruppert", | |
| 716 | - "Fabio de Souza Azevedo", | |
| 717 | 717 | "Jorge Vicente Lopes da Silva", |
| 718 | 718 | "Tatiana Al-Chueyr (former)", |
| 719 | + "Guilherme Cesar Soares Ruppert (former)", | |
| 720 | + "Fabio de Souza Azevedo (former)", | |
| 719 | 721 | "Bruno Lara Bottazzini (contributor)"] |
| 720 | 722 | |
| 721 | 723 | info.Translators = ["Alex P. Natsios", | ... | ... |
invesalius/update.py
| ... | ... | @@ -1,62 +0,0 @@ |
| 1 | -#!/usr/local/bin/python | |
| 2 | -#-------------------------------------------------------------------------- | |
| 3 | -# Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas | |
| 4 | -# Copyright: (C) 2001 Centro de Pesquisas Renato Archer | |
| 5 | -# Homepage: http://www.softwarepublico.gov.br | |
| 6 | -# Contact: invesalius@cti.gov.br | |
| 7 | -# License: GNU - GPL 2 (LICENSE.txt/LICENCA.txt) | |
| 8 | -#-------------------------------------------------------------------------- | |
| 9 | -# Este programa e software livre; voce pode redistribui-lo e/ou | |
| 10 | -# modifica-lo sob os termos da Licenca Publica Geral GNU, conforme | |
| 11 | -# publicada pela Free Software Foundation; de acordo com a versao 2 | |
| 12 | -# da Licenca. | |
| 13 | -# | |
| 14 | -# Este programa eh distribuido na expectativa de ser util, mas SEM | |
| 15 | -# QUALQUER GARANTIA; sem mesmo a garantia implicita de | |
| 16 | -# COMERCIALIZACAO ou de ADEQUACAO A QUALQUER PROPOSITO EM | |
| 17 | -# PARTICULAR. Consulte a Licenca Publica Geral GNU para obter mais | |
| 18 | -# detalhes. | |
| 19 | -#------------------------------------------------------------------------- | |
| 20 | - | |
| 21 | - | |
| 22 | -import wx | |
| 23 | -import urllib2 | |
| 24 | -import sys | |
| 25 | -import platform | |
| 26 | -import i18n | |
| 27 | - | |
| 28 | - | |
| 29 | -if (len(sys.argv)>2): | |
| 30 | - print "Usage: python update.py <language>" | |
| 31 | - sys.exit() | |
| 32 | - | |
| 33 | -if (len(sys.argv)==1): | |
| 34 | - print "No language specified. Assuming english (en)." | |
| 35 | - lang = 'en' | |
| 36 | -else: | |
| 37 | - lang = sys.argv[1] | |
| 38 | - | |
| 39 | -print lang | |
| 40 | -# Check if there is a language set (if session file exists | |
| 41 | -_ = i18n.InstallLanguage(lang) | |
| 42 | - | |
| 43 | -print "Checking updates..." | |
| 44 | -URL = "http://www.cti.gov.br/dt3d/invesalius/update/checkupdate_"+sys.platform+"_"+platform.architecture()[0]+".php" | |
| 45 | -#URL = "http://home.ruppert.com.br/aaa.php" | |
| 46 | -response = urllib2.urlopen(URL,timeout=5) | |
| 47 | -last = response.readline().rstrip() | |
| 48 | -url = response.readline().rstrip() | |
| 49 | -if (last!="3.0 beta 3"): | |
| 50 | - print " ...New update found!!! -> version:", last #, ", url=",url | |
| 51 | - from time import sleep | |
| 52 | - sleep(1) | |
| 53 | - app=wx.App() | |
| 54 | - msg=_("A new version of InVesalius is available. Do you want to open the download website now?") | |
| 55 | - title=_("Invesalius Update") | |
| 56 | - msgdlg = wx.MessageDialog(None,msg,title, wx.YES_NO | wx.ICON_INFORMATION) | |
| 57 | - if (msgdlg.ShowModal()==wx.ID_YES): | |
| 58 | - wx.LaunchDefaultBrowser(url) | |
| 59 | - msgdlg.Destroy() | |
| 60 | - app.MainLoop() | |
| 61 | - | |
| 62 | - |