1

I'm trying to get a private tag from a dicom file. It is an specific tag that only a model of CT has, which is the case, and the tag is:

(7005,xx40) 

I've tried to get it via

[0x7005xx40], ['7005','xx40']

but I can't get it anyway.
I could use some help.

4
  • Hi sergi. Could you add a MWE to your question? This would help others help you.
    – NOhs
    Commented Aug 9, 2017 at 12:27
  • I'm actually new here, how do you do this MWE you are talking about?
    – sergi
    Commented Aug 9, 2017 at 13:56
  • MWE just means "minimum working example" and is usually a code snippet that has the issue you are describing while being as short as possible so that others can just copy it and run it to investigate the issue you have. See also here: stackoverflow.com/help/mcve
    – NOhs
    Commented Aug 9, 2017 at 15:20
  • Please add your Python code to the question. Commented Aug 9, 2017 at 15:20

1 Answer 1

1

There should be a private creator tag before this one (7005,00xx) where 'xx' is some number. This will tell you what the actual 'xx' value is for your tag.

e.g.

7005,0010 = CT_VENDOR_PRIVATE

7005,1040 = the value you want

2
  • Thanks cneller, doing what you said i can get the hidden tag but now when asking for the value it looks like it is encoded and i can't find a way to decode it, i get this: b'\x9a\x99\x99\x99\x99\x89i@'
    – sergi
    Commented Aug 9, 2017 at 13:57
  • Unfortunately, you're going to need to learn a little more DICOM here. Your 7005,1040 attribute has a VR (basically a type; in this case, if it's a Toshiba scanner, it will be FD - a floating decimal). Don't get that as a string. I might suggest dicomiseasy.blogspot.com/p/introduction-to-dicom.html as a good intro that may help you.
    – cneller
    Commented Aug 9, 2017 at 18:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.