[ITK] [ITK-users] How to remove a tag from MetaDataDictionary?
Matt McCormick
matt.mccormick at kitware.com
Mon Oct 6 11:08:10 EDT 2014
Hi Arnaud,
> I am trying to write a DICOM file in which, the orientation (among others)
> has changed in my pipeline...
>
> 1- After having a look
> https://github.com/Kitware/ITK/blob/master/Modules/IO/GDCM/src/itkGDCMImageIO.cxx#L883-L919
>
> It appears to me that if the orientation is in the MetaDataDictionary, it is
> saved anyway into the DICOM image, there is no way to force the ImageIO to
> recompute it from the image and save it ???
> If there is, can anyone give me a pointer?
If there is a Direction on the input image, it should use it [1]. But
the DICOM tag 0020|0037 cannot be present.
> 2- Since I can't find a way to update the image orientation in
> itk::GDCMImageIO, I have been looking at removing the corresponding tag from
> the MetaDataDictionary. I could not find any method or any way to do it???
> If there is, can anyone give me a pointer?
>
> I wish I would not have to copy the dictionary and add if statement to avoid
> copying the direction...
This is the method I usually apply...
Sorry for the lack of new tricks!
Matt
[1] https://github.com/Kitware/ITK/blob/master/Modules/IO/GDCM/src/itkGDCMImageIO.cxx#L816-L828
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list