3
votes

I'm triying to anonymize dcm (dicom) files before uploading it to the server. I want to do it on the client side using javascript. But I can't find more that dicom viewers.

I searched about the tags of dicom and I have found a lot of tools for remove metadata tags using python, java and ruby, but I don't know how to portrait it to javascript.

I have even decided what tags I would remove, but I'm not sure about how to do it.

Any ideas about?

1
I guess your solution has to deal with the file api. Is not possible to upload the full file, anonymize on server side and store the anonymized version?Prusse
Thanks for your answer, but no, the protocol establishes that the file must be anonymized before reaching the server.user3055867
This post describes how to upload files using javascript. You could obtain the binary data of the files (may copy) and edit prior uploading. This is based on HTML5 soo it is not standard and will not work on old browsers (not sure about recent IEs). Maybe a flash implementation will better suit your needs.Prusse
So the idea its to read the file in a buffer and modify it during the transmission? The flash it no a choice, html5 its fine.user3055867
Another thing to consider, do you need to anonymize both tags in the dicom as well as the pixel data itself? Some images, typically US, have PHI burned into each frame of the image, a trickier problem to solve, which makes the case for using an external library much stronger.Chris O

1 Answers

3
votes

You will find some excellent open source javascript DICOM libraries that could allow you to do what you want, or, at least, these will facilitate a lot your task.

I would suggest you to have a look at Cornerstone, DWV, or medview. There you will find tools, ideas and source code that will allow you to deal with DICOM images so you will able to modify the necessary Data Elements in order to anonymize the images on the client side.