Commit c7a8c7d0eca7189f0106c48faccb8f921bfd969f

Authored by Paulo Henrique Junqueira Amorim
1 parent b2d587c7

FIX: Fixed problem with empty field spacing

Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
invesalius/gui/dicom_preview_panel.py
... ... @@ -812,7 +812,11 @@ class SingleImagePreview(wx.Panel):
812 812 self.text_image_size.SetValue(value)
813 813  
814 814 ## Text related to slice position
815   - value1 = STR_SPC %(dicom.image.spacing[2])
  815 + if not(dicom.image.spacing):
  816 + value1 = ''
  817 + else:
  818 + value1 = STR_SPC %(dicom.image.spacing[2])
  819 +
816 820 if dicom.image.orientation_label == 'AXIAL':
817 821 value2 = STR_LOCAL %(dicom.image.position[2])
818 822 elif dicom.image.orientation_label == 'CORONAL':
... ...