diff --git a/invesalius/data/mask.py b/invesalius/data/mask.py index e076d56..2a5457f 100644 --- a/invesalius/data/mask.py +++ b/invesalius/data/mask.py @@ -317,7 +317,6 @@ class Mask(): print "Creating mask at", self.temp_file shape = shape[0] + 1, shape[1] + 1, shape[2] + 1 self.matrix = numpy.memmap(self.temp_file, mode='w+', dtype='uint8', shape=shape) - proj.save_workdir() def clean(self): self.matrix[1:, 1:, 1:] = 0 diff --git a/invesalius/project.py b/invesalius/project.py index 73f468d..154cfc7 100644 --- a/invesalius/project.py +++ b/invesalius/project.py @@ -110,6 +110,7 @@ class Project(object): """ index = len(self.mask_dict) self.mask_dict[index] = mask + self.save_workdir() return index def RemoveMask(self, index): @@ -121,6 +122,7 @@ class Project(object): new_dict[i-1] = self.mask_dict[i] new_dict[i-1].index = i-1 self.mask_dict = new_dict + self.save_workdir() def GetMask(self, index): return self.mask_dict[index] @@ -129,6 +131,7 @@ class Project(object): #self.last_surface_index = surface.index index = len(self.surface_dict) self.surface_dict[index] = surface + self.save_workdir() return index def ChangeSurface(self, surface): @@ -144,6 +147,7 @@ class Project(object): new_dict[i-1] = self.surface_dict[i] new_dict[i-1].index = i-1 self.surface_dict = new_dict + self.save_workdir() def AddMeasurement(self, measurement): -- libgit2 0.21.2