[Insight-developers] anonymize DICOM files

Mathieu Malaterre mathieu.malaterre at kitware.com
Thu Feb 3 19:09:25 EST 2005


Kent,

	I take that back. The answer is in your mail. You are using gdcm which 
cannot read properly your image to write it down...

	gdcm will try to read it and then write it. The anonymize is only 
blanking the structures after they are read. You need 'hexedit' or 
something like that to anonymize a DICOM image for which gdcm is not 
able to read properly.

Sorry,
Mathieu

Kent Williams wrote:
> I have several DICOM data sets that for one reason or another are not 
> working properly with the gdcm Dicom reader.  The problems we're having 
> aren't a big deal -- and I can deal with it off the list with the GDCM 
> guy -- but I need to anonymize the datasets before sending them offsite.
> 
> My idea was to write a simple app that anonymizes the header and dumps a 
> new file out. gdcm::Header has a function called 'AnonymizeHeader' that 
> I copied to blank out the problem fields, but it's not clear to me how 
> to read in the whole dicom slice and write it back out along with the 
> pixel data -- using GDCM.
> 
> What's happening is that it appears the header is getting written out OK 
> but the pixel data is not.
> 
> Below is the program I wrote -- clearly I'm missing the 'read in the 
> data from the input data, attach it to the output file stage.'
> 
> I would have used an anonymizer someone else wrote -- if there was one I 
> could trust, that was free, and didn't have a stupid user interface! 
> Google didn't find anything like that!


More information about the Insight-developers mailing list