Dear Marco,

Thank you for your answer. I will look into DCMTK. I saw there was a 
function to anonymize a dataset:

gdcm::File::AnonymizeFile()

which I could use.

I am not modifying the image content in any way, only the header, and I 
would like to be able to reload the anonymized dataset using my 
application (I currently use mitk::IOUtil::Load).

The thing is, I do not only need to read and anonymize the dicom 
dataset, but I actually use it to perform a segmentation. The 
application then saves the segmented image and the anonymized dataset, 
in order to be able to reload them at a later time.

I would like to avoid reading twice the dicom dataset - once with DCMTK, 
to anonymize it, and once with Mitk. Is there a way to convert an image 
read by DCMTK into a mitk::Image ? Through Itk, I guess ?

Best regards,

Daphné


Le 16/11/2016 à 16:15, Marco Nolden a écrit :
> Hi Daphne,
>
> if you just want to remove or replce DICOM tags for anonymization, I
> think you should bypass both MITK and ITK and just use DCMTK methods.
> Using them it should be quite easy to read a dataset, manipulate it and
> write it back. Or you could even just call "dcmodify" as a command line
> tool, there are many examples online how to use it. If you are also
> modifying the image content ( pixel data), things become a bit more
> complicated, since formally you are then creating a new DICOM object
> with a new modality which is usually non-trivial to do in full
> accordance with the standard.
>
> What are you planning to do with the anonymized files? Which tool should
> be able to load them?
>
> Best,
> Marco
>
> Am 16.11.2016 um 05:35 schrieb Daphné Wallach:
>> Dear Mitk users,
>>
>> I am writing an application using Mitk, and I would now need to write a
>> dicom series from a mitk::Image.
>>
>> Here is what I am trying to do:
>> In one part of the code, I read the dicom series using
>> mitk::IOUtil::Load and load it to a mitk::Image. This image is then
>> passed to another function, where it should be anonymized and written to
>> a new dicom folder.
>>
>> It seems like mitk cannot write dicom images, and I need to use Itk to
>> do that, is that right ? My problem is when I convert the mitk::Image to
>> a itk::Image with CastToItkImage, all the dicom tags are lost.
>>
>> The solution I am considering is to pass the path to the dicom data to
>> the function in charge of anonymizing and writing the dicom data. This
>> function would read, modify and write back the data using only itk.
>>
>> Is there another solution? I would like to avoid re-reading the dicom
>> data from file if possible.
>>
>> As always, I would appreciate any help.
>>
>> Best regards,
>> Daphné
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> mitk-users mailing list
>> mitk-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
> ------------------------------------------------------------------------------
> _______________________________________________
> mitk-users mailing list
> mitk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to