Commit d0d68211fc18b167018c447c5c30300b29be2f34

Authored by Thiago Franco de Moraes
1 parent b2cca5d6

Replacing , to . in some dicom fields

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
invesalius/reader/dicom.py
@@ -443,7 +443,7 @@ class Parser(): @@ -443,7 +443,7 @@ class Parser():
443 DICOM standard tag (0x0020, 0x0032) was used. 443 DICOM standard tag (0x0020, 0x0032) was used.
444 """ 444 """
445 try: 445 try:
446 - data = self.data_image[str(0x020)][str(0x032)] 446 + data = self.data_image[str(0x020)][str(0x032)].replace(",", ".")
447 except(KeyError): 447 except(KeyError):
448 return "" 448 return ""
449 if (data): 449 if (data):
@@ -509,7 +509,7 @@ class Parser(): @@ -509,7 +509,7 @@ class Parser():
509 DICOM standard tag (0x0028, 0x0030) was used. 509 DICOM standard tag (0x0028, 0x0030) was used.
510 """ 510 """
511 try: 511 try:
512 - data = self.data_image[str(0x0028)][str(0x0030)] 512 + data = self.data_image[str(0x0028)][str(0x0030)].replace(",", ".")
513 except(KeyError): 513 except(KeyError):
514 return "" 514 return ""
515 if (data): 515 if (data):
@@ -886,7 +886,7 @@ class Parser(): @@ -886,7 +886,7 @@ class Parser():
886 Critical DICOM tag (0x0020,0x0037). Cannot be edited. 886 Critical DICOM tag (0x0020,0x0037). Cannot be edited.
887 """ 887 """
888 try: 888 try:
889 - data = self.data_image[str(0x0020)][str(0x0037)] 889 + data = self.data_image[str(0x0020)][str(0x0037)].replace(",", ".")
890 except(KeyError): 890 except(KeyError):
891 return [1.0, 0.0, 0.0, 0.0, 1.0, 0.0] 891 return [1.0, 0.0, 0.0, 0.0, 1.0, 0.0]
892 892
@@ -1352,7 +1352,7 @@ class Parser(): @@ -1352,7 +1352,7 @@ class Parser():
1352 DICOM standard tag (0x0018,0x0050) was used. 1352 DICOM standard tag (0x0018,0x0050) was used.
1353 """ 1353 """
1354 try: 1354 try:
1355 - data = self.data_image[str(0x0018)][str(0x0050)] 1355 + data = self.data_image[str(0x0018)][str(0x0050)].replace(",", ".")
1356 except(KeyError): 1356 except(KeyError):
1357 return 0 1357 return 0
1358 if (data): 1358 if (data):