Commit 914780e9d02918e506cdc49368354934c5f0fdd2

Authored by Thiago Franco de Moraes
1 parent dc3c7ce0

Created default values to the projections

invesalius/constants.py
... ... @@ -554,3 +554,7 @@ PROJECTION_MIDA=5
554 554 PROJECTION_CONTOUR_MIP=6
555 555 PROJECTION_CONTOUR_LMIP=7
556 556 PROJECTION_CONTOUR_MIDA=8
  557 +
  558 +#------------ Projections defaults ------------------
  559 +PROJECTION_BORDER_SIZE=1.0
  560 +PROJECTION_MIP_SIZE=2
... ...
invesalius/data/slice_.py
... ... @@ -86,7 +86,7 @@ class Slice(object):
86 86 self._matrix = None
87 87  
88 88 self._type_projection = const.PROJECTION_NORMAL
89   - self.n_border = 3.0
  89 + self.n_border = const.PROJECTION_BORDER_SIZE
90 90  
91 91 self.spacing = (1.0, 1.0, 1.0)
92 92  
... ...
invesalius/data/viewer_slice.py
... ... @@ -60,13 +60,15 @@ ORIENTATIONS = {
60 60 class ContourMIPConfig(wx.Panel):
61 61 def __init__(self, prnt, orientation):
62 62 wx.Panel.__init__(self, prnt)
63   - self.mip_size_spin = wx.SpinCtrl(self, -1, min=1, max=240, initial=1)
  63 + self.mip_size_spin = wx.SpinCtrl(self, -1, min=1, max=240,
  64 + initial=const.PROJECTION_MIP_SIZE)
64 65 w, h = self.mip_size_spin.GetTextExtent('M')
65 66 self.mip_size_spin.SetMinSize((4 * w + 10, -1))
66 67 self.mip_size_spin.SetMaxSize((4 * w + 10, -1))
67 68 self.border_spin = FS.FloatSpin(self, -1, min_val=0, max_val=10,
68   - increment=0.1, value=0.1, digits=1,
69   - agwStyle=FS.FS_LEFT)
  69 + increment=0.1,
  70 + value=const.PROJECTION_BORDER_SIZE,
  71 + digits=1, agwStyle=FS.FS_LEFT)
70 72 w, h = self.border_spin.GetTextExtent('M')
71 73 self.border_spin.SetMinSize((5 * w + 10, -1))
72 74 self.border_spin.SetMaxSize((5 * w + 10, -1))
... ... @@ -142,7 +144,7 @@ class Viewer(wx.Panel):
142 144 self.left_pressed = 0
143 145 self.right_pressed = 0
144 146  
145   - self._number_slices = 10
  147 + self._number_slices = const.PROJECTION_MIP_SIZE
146 148 self._mip_inverted = False
147 149  
148 150 self.spined_image = False #Use to control to spin
... ...