Commit e63ef4f415f088a735d690c21910a80e653fa6ea

Authored by Thiago Franco de Moraes
1 parent 1619d3f2
Exists in master

Mask.was_edited was not being copied

invesalius/data/mask.py
@@ -425,6 +425,7 @@ class Mask(): @@ -425,6 +425,7 @@ class Mask():
425 new_mask.threshold_range = self.threshold_range 425 new_mask.threshold_range = self.threshold_range
426 new_mask.edition_threshold_range = self.edition_threshold_range 426 new_mask.edition_threshold_range = self.edition_threshold_range
427 new_mask.is_shown = self.is_shown 427 new_mask.is_shown = self.is_shown
  428 + new_mask.was_edited = self.was_edited
428 429
429 new_mask.create_mask(shape=[i-1 for i in self.matrix.shape]) 430 new_mask.create_mask(shape=[i-1 for i in self.matrix.shape])
430 new_mask.matrix[:] = self.matrix[:] 431 new_mask.matrix[:] = self.matrix[:]
invesalius/reader/dicom_grouper.py
@@ -131,6 +131,7 @@ class DicomGroup: @@ -131,6 +131,7 @@ class DicomGroup:
131 filelist = [dicom.image.file for dicom in 131 filelist = [dicom.image.file for dicom in
132 self.slices_dict.values()] 132 self.slices_dict.values()]
133 133
  134 + print(f"\n\n\n{filelist=}\n\n\n")
134 # Sort slices using GDCM 135 # Sort slices using GDCM
135 #if (self.dicom.image.orientation_label != "CORONAL"): 136 #if (self.dicom.image.orientation_label != "CORONAL"):
136 #Organize reversed image 137 #Organize reversed image
@@ -139,7 +140,8 @@ class DicomGroup: @@ -139,7 +140,8 @@ class DicomGroup:
139 sorter.SetZSpacingTolerance(1e-10) 140 sorter.SetZSpacingTolerance(1e-10)
140 try: 141 try:
141 sorter.Sort([utils.encode(i, const.FS_ENCODE) for i in filelist]) 142 sorter.Sort([utils.encode(i, const.FS_ENCODE) for i in filelist])
142 - except TypeError: 143 + except TypeError as e:
  144 + print(f"\n\n\nError: {e=}\n\n\n")
143 sorter.Sort(filelist) 145 sorter.Sort(filelist)
144 filelist = sorter.GetFilenames() 146 filelist = sorter.GetFilenames()
145 147
@@ -147,6 +149,7 @@ class DicomGroup: @@ -147,6 +149,7 @@ class DicomGroup:
147 if list(self.slices_dict.values())[0].parser.GetManufacturerName() == "Koning": 149 if list(self.slices_dict.values())[0].parser.GetManufacturerName() == "Koning":
148 filelist.sort() 150 filelist.sort()
149 151
  152 + print(f"\n\n\n{filelist=}\n\n\n")
150 return filelist 153 return filelist
151 154
152 def GetHandSortedList(self): 155 def GetHandSortedList(self):