Skip to content

Commit

Permalink
Removed eval from dicom.py (invesalius#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
tfmoraes authored Aug 5, 2024
1 parent d1d62f7 commit 020cd60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions invesalius/reader/dicom.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def GetImagePosition(self):
except KeyError:
return ""
if data:
return [eval(value) for value in data.split("\\")]
return [float(value) for value in data.split("\\")]
return ""

def GetImageLocation(self):
Expand All @@ -455,7 +455,7 @@ def GetImageLocation(self):
"""
data = self.data_image[str(0x020)][str(0x1041)]
if data:
return eval(data)
return float(data)
return ""

def GetImageOffset(self):
Expand Down

0 comments on commit 020cd60

Please sign in to comment.