Commit b2ea39287527fe984e18df481588043d1b55d9aa
1 parent
e7d8f798
Exists in
master
and in
68 other branches
FIX: Change function name of GetZSpacing to UpdateZSpacing, and fixed bug open dicom
Showing
1 changed file
with
5 additions
and
5 deletions
Show diff stats
invesalius/reader/dicom_grouper.py
@@ -92,7 +92,7 @@ class DicomGroup: | @@ -92,7 +92,7 @@ class DicomGroup: | ||
92 | list_ = sorted(list_, key = lambda dicom:dicom.image.position[axis]) | 92 | list_ = sorted(list_, key = lambda dicom:dicom.image.position[axis]) |
93 | return list_ | 93 | return list_ |
94 | 94 | ||
95 | - def GetZSpacing(self): | 95 | + def UpdateZSpacing(self): |
96 | list_ = self.GetSortedList() | 96 | list_ = self.GetSortedList() |
97 | 97 | ||
98 | if (len(list_) > 1): | 98 | if (len(list_) > 1): |
@@ -145,8 +145,8 @@ class PatientGroup: | @@ -145,8 +145,8 @@ class PatientGroup: | ||
145 | # TODO: Optimize recursion | 145 | # TODO: Optimize recursion |
146 | self.AddFile(dicom, index+1) | 146 | self.AddFile(dicom, index+1) |
147 | 147 | ||
148 | - #Getting the spacing in the Z axis | ||
149 | - group.GetZSpacing() | 148 | + #Getting the spacing in the Z axis |
149 | + group.UpdateZSpacing() | ||
150 | 150 | ||
151 | def Update(self): | 151 | def Update(self): |
152 | # Ideally, AddFile would be sufficient for splitting DICOM | 152 | # Ideally, AddFile would be sufficient for splitting DICOM |
@@ -237,14 +237,14 @@ class PatientGroup: | @@ -237,14 +237,14 @@ class PatientGroup: | ||
237 | group.AddSlice(current) | 237 | group.AddSlice(current) |
238 | dict_final[group_counter] = group | 238 | dict_final[group_counter] = group |
239 | #Getting the spacing in the Z axis | 239 | #Getting the spacing in the Z axis |
240 | - group.GetZSpacing() | 240 | + group.UpdateZSpacing() |
241 | else: | 241 | else: |
242 | group_counter +=1 | 242 | group_counter +=1 |
243 | group = DicomGroup() | 243 | group = DicomGroup() |
244 | group.AddSlice(current) | 244 | group.AddSlice(current) |
245 | dict_final[group_counter] = group | 245 | dict_final[group_counter] = group |
246 | #Getting the spacing in the Z axis | 246 | #Getting the spacing in the Z axis |
247 | - group.GetZSpacing() | 247 | + group.UpdateZSpacing() |
248 | 248 | ||
249 | 249 | ||
250 | return dict_final | 250 | return dict_final |