From 5a0925ec9ef531b13ea75df95c5a281c911b9a05 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Wed, 9 Jan 2013 15:27:08 -0200 Subject: [PATCH] Set ImageType to empty when there is not this tag in dicom --- invesalius/reader/dicom.py | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/invesalius/reader/dicom.py b/invesalius/reader/dicom.py index 192ac90..ad80bf8 100644 --- a/invesalius/reader/dicom.py +++ b/invesalius/reader/dicom.py @@ -811,6 +811,10 @@ class Parser(): data = self.data_image[str(0x008)][str(0x008)] except(IndexError): return [] + # TODO: Check if set image type to empty is the right way of handling + # the cases where there is not this tag. + except KeyError: + return [] if (data): try: -- libgit2 0.21.2