Commit e0a046a8152f83c94c9b8bd75733a25ca9b42bda
1 parent
3aa03487
Exists in
workdir
saving working dir after creating a new mask or surface
Showing
2 changed files
with
4 additions
and
1 deletions
Show diff stats
invesalius/data/mask.py
... | ... | @@ -317,7 +317,6 @@ class Mask(): |
317 | 317 | print "Creating mask at", self.temp_file |
318 | 318 | shape = shape[0] + 1, shape[1] + 1, shape[2] + 1 |
319 | 319 | self.matrix = numpy.memmap(self.temp_file, mode='w+', dtype='uint8', shape=shape) |
320 | - proj.save_workdir() | |
321 | 320 | |
322 | 321 | def clean(self): |
323 | 322 | self.matrix[1:, 1:, 1:] = 0 | ... | ... |
invesalius/project.py
... | ... | @@ -110,6 +110,7 @@ class Project(object): |
110 | 110 | """ |
111 | 111 | index = len(self.mask_dict) |
112 | 112 | self.mask_dict[index] = mask |
113 | + self.save_workdir() | |
113 | 114 | return index |
114 | 115 | |
115 | 116 | def RemoveMask(self, index): |
... | ... | @@ -121,6 +122,7 @@ class Project(object): |
121 | 122 | new_dict[i-1] = self.mask_dict[i] |
122 | 123 | new_dict[i-1].index = i-1 |
123 | 124 | self.mask_dict = new_dict |
125 | + self.save_workdir() | |
124 | 126 | |
125 | 127 | def GetMask(self, index): |
126 | 128 | return self.mask_dict[index] |
... | ... | @@ -129,6 +131,7 @@ class Project(object): |
129 | 131 | #self.last_surface_index = surface.index |
130 | 132 | index = len(self.surface_dict) |
131 | 133 | self.surface_dict[index] = surface |
134 | + self.save_workdir() | |
132 | 135 | return index |
133 | 136 | |
134 | 137 | def ChangeSurface(self, surface): |
... | ... | @@ -144,6 +147,7 @@ class Project(object): |
144 | 147 | new_dict[i-1] = self.surface_dict[i] |
145 | 148 | new_dict[i-1].index = i-1 |
146 | 149 | self.surface_dict = new_dict |
150 | + self.save_workdir() | |
147 | 151 | |
148 | 152 | |
149 | 153 | def AddMeasurement(self, measurement): | ... | ... |