how to anonymize

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
blah
Posts: 6
Joined: Thu, 2007-04-26, 06:51

how to anonymize

#1 Post by blah »

hi,
i was looking in the dcmtk to find a way for anonymizing images, but in vein. I would much appreciate if anybody could give me some pointers

thanks..
Last edited by blah on Wed, 2011-02-16, 21:20, edited 2 times in total.

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

Hi,

for anonymizing DICOM files you have to delete some selected attributes or change their values. If you want to anonymize a complete set of images, e. g. images containing data from different patients, which have more than one study, etc. you have to build some intelligence into your anonymizer to keep your patient/studies/series/image hierarchy consistent between the different anonymized DICOM files. The deletion and modification of tags and tag values should be straigthforward to code using the DcmItem API.

Actually we internally have a DICOM anonymizer based on DCMTK doing all that stuff described above. Unfortunately it is not part of the public DICOM toolkit ...

Regards,
Michael

tinku99
Posts: 4
Joined: Thu, 2009-08-20, 04:21
Contact:

using dcmodify

#3 Post by tinku99 »

dcmodify -v -ea "(0010,0010)" -ea "(0010,0020)" -ea "(0010,0030)" -ea "(0020,000E)" -ea "(0020,000D)" -ea "(0008,0018)" -ea "(0008,0080)" -ea "(0008,0081)" -ea "(0008,0050)" -ea "(0008,0090)" -ea "(0008,1070)" -ea "(0008,1155)" -ea "(0010,1000)" -ea "(0020,0010)" -ea "(0020,4000)" *.dcm

Patient’s Name (0010,0010)
Patient ID (0010,0020)
Patient’s Birth Date (0010,0030)
Study Instance UID (0020,000D)
Series Instance UID (0020,000E)
SOP Instance UID (0008,0018)
Institution Name (0008,0080)
Institution Address (0008,0081)
Accession Number (0008,0050)
Referring Physician’s Name (0008,0090)
Operators’ Name (0008,1070)
Referenced SOP Instance UID (0008,1155)
Other Patient Ids (0010,1000)
Study ID (0020,0010)
Image Comments (0020,4000)

any others i missed?
any i don't need to erase?

its too bad if just one tag isn't found, no tags get erased
also an option to not create the backup file would be useful.
Thanks.

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#4 Post by Jörg Riesmeier »

Both options are available as part of the latest snapshot. The --ignore-errors option should also be present in the DCMTK 3.5.4 release.

tinku99
Posts: 4
Joined: Thu, 2009-08-20, 04:21
Contact:

updated dcmodify command

#5 Post by tinku99 »

Here is the updated command that might work. I generate a new SOPInstanceUID to overwrite the (0002,0003) tag.

Code: Select all

dcmodify -ie -gin -nb -ea "(0010,0010)" -ea "(0010,0020)" -ea "(0010,0030)" -ea "(0020,000E)" -ea "(0020,000D)" -ea "(0008,0080)" -ea "(0008,0081)" -ea "(0008,0050)" -ea "(0008,0090)" -ea "(0008,1070)" -ea "(0008,1155)" -ea "(0010,1000)" -ea "(0020,0010)" -ea "(0020,4000)" *.dcm 

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#6 Post by Michael Onken »

Hi,

part 15 of the DICOM standard gives in Annex E (ATTRIBUTE CONFIDENTIALITY PROFILES) a perfect overview of which attributes should be anonymized -- be sure to take a look ;)

Best regards,
Michael

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest