Dicom tags

Hi,

I am trying to get the dicom tags from the file that is currently open in Mimics. However, not all the tags seem to come up. For example, I use the following command:

tags = mimics.get_dicom_tags()
print(tags.keys())

and obtain this:
image

while the image in Mimics shows this information:
dicom_tags_2

We can see that the tags id number don’t correspond and I am not sure why? That means I cannot get some information about my image.

In addition, if I use these lines to get the value of the tags:

IO = tags[0x0020, 0x0037] #-Here I am getting Image Orientation (Patient)
print("{}: {}".format(IO.description, IO.value))

IO.value is a string. Is there a way to get a float right away? I could convert the string to float but it because more complicated if the value is negative (i.e. -1) and was hoping to just directly the value as a float?

Thank you!

Hi Erica,

The reason why the DICOM tags from your script and the image information are not the same is because Mimics works with Decimal numbers while DICOM tags are hexadecimal. In order to link your script to the DICOM information, you will need to convert the numbers.

A free tool that can be used for this is the following: https://www.rapidtables.com/convert/number/decimal-to-hex.html?x=4144

Hope this helps!

Kind regards,

Marnic

1 Like