KitwareMedical / dicom-anonymizer

Tool to anonymize DICOM files according to the DICOM standard
BSD 3-Clause "New" or "Revised" License
104 stars 47 forks source link

Is it possible to process the nested tags inside of DICOM sequences? #88

Closed kirbyju closed 1 week ago

kirbyju commented 3 months ago

See title. If not, any future plans to support this?

Thanks!

pchoisel commented 3 months ago

Hi @kirbyju,

Normally this is already supported.

There is a caveat: the anonymization method that has been selected for the sequence element will be applied to all the sub-elements of the sequences, regardless of the any specific rule that might have been set for a specific sub-element of the sequence.

For example, if you have the sequence:

(0008,1032) SQ ProcedureCodeSequence = <sequence of 1 item>
  #0
  (0008,0100) SH CodeValue = ITC02 
  (0008,0102) SH CodingSchemeDesignator = BROKER

If the anonymization replace has been selected for the tag (0008,1032), replace will be applied to (0008,0100) and (0008,0102). Even if there is a rule saying that (0008,0102) should be anonymized with the delete method.

If this is an issue, we may improve this to apply any specific rule to sequences' sub-elements.

Let me know