Anonymize some informations

43 views
Skip to first unread message

MMoury

unread,
Nov 21, 2008, 3:16:23 PM11/21/08
to pydicom
Hi all,

i have a dicom file and want to anonymize some informations as the
patient´s name in brief all the informations about the patient...If i
can anonymize some informations, do it mean that i can publish the
informations too?


can someone help me?

Darcy Mason

unread,
Nov 22, 2008, 12:57:38 PM11/22/08
to pydicom
Anonymizing DICOM files is a big topic. If you wish to post
information (for example, for programming advice on this group) it is
much safer to start with a non-patient file (e.g. a scan of a test
phantom) which illustrates the same problems rather than trying to
anonymize a real patient file. Even then it may contain information
such as the operator name or facility address.

I once read some detailed advice on anonymizing DICOM files but
unfortunately I can't find that web page any more. There is much more
to be done than just changing the patient name -- for example, the
screenshot at http://www.santesoft.com/howto/anonymize.html shows the
items that their software can remove or change. Many kinds of DICOM
attributes (including private tags) could contain private information.
Also images can have information "burned into" their pixels.

pydicom has an example program (http://code.google.com/p/pydicom/
source/browse/trunk/source/dicom/examples/anonymize.py) which changes
or removes some items, but it (like all of pydicom) is released under
the GPL license, so there is no warranty that this will work properly;
you must verify the results yourself. In fact, it has obvious faults
-- it only handles a few kinds of items which might contain sensitive
information, and does nothing about image pixels.

If you google for it, you will find many anonymizer programs. Whatever
method you choose, I suggest inspecting the file directly (including
images) after conversion to make sure there is nothing private
remaining.

And now I must also disclaim this advice, because it is almost
certainly incomplete. Ultimately you must take full responsibility for
verifying there is no private information in a file before publishing
it in any way.

-Darcy

MMoury

unread,
Nov 22, 2008, 3:59:01 PM11/22/08
to pydicom
Hi Darcy,

thanks for your explication...when i unterstand,it is necessary to
have a autorisation to remove
some Dicom files? I tried with the the example program "examples/
anonymize" but i don´t have any changes of the file.

Secondly i work in a project with dicom files.I have to extract the
contain of the dicom file to do a systematic analysis for them.
What python function enable that?

Marc





proportional

unread,
Nov 22, 2008, 5:35:38 PM11/22/08
to pydicom
Look the tutorial !!!

MMoury

unread,
Nov 22, 2008, 6:01:00 PM11/22/08
to pydicom
What tutorial? Do you mean the PydicomUserGuide?

Darcy Mason

unread,
Nov 22, 2008, 10:24:33 PM11/22/08
to pydicom

On Nov 22, 3:59 pm, MMoury <marc.mo...@yahoo.fr> wrote:
> Hi Darcy,
>
> thanks for your explication...when i unterstand,it is necessary to
> have a autorisation to remove
> some Dicom files? I tried with the the example program "examples/
> anonymize" but i don´t have any changes of the file.

The Usage line in the anonymize.py code shows how to use it. It does
not change the original file. It writes to another file name that you
specify. It is probably not an authorization problem because you would
see an error "unable to open file" or something like that.

>
> Secondly i work in a project with dicom files.I have to extract the
> contain of the dicom file to do a systematic analysis for them.
> What python function enable that?

The question is too vague to answer specifically. But the ReadFile
function in pydicom extracts all the contents of a dicom file into a
Dataset, which is essentially a python dict. How you use that
information is beyond the scope of this group -- if you are not
familiar with python or analysis in python, you should look into
python help files, or research the various statistics or scientific
packages available. The python.org website points to many of these.
Reply all
Reply to author
Forward
0 new messages