[ITK-users] DicomTags when reading directory and generating mha or mhd...

Dženan Zukić dzenanz at gmail.com
Mon Mar 13 09:01:58 EDT 2017


Hi Matias,

what worked for me was:

itk::MetaDataDictionary metadata = reader->GetMetaDataDictionary();
//processing...
image->SetMetaDataDictionary(metadata);
writer->SetInput(image);
writer->Update();

Regards,
Dženan

On Mon, Mar 13, 2017 at 8:31 AM, Matias <matimontg at gmail.com> wrote:

> Hi,
>
> I'm reading a directory which contains a series of Dicoms and then writting
> an .mha or .mhd file.
>
> I noticed the tags are lost (patient name, capture device, dates, series
> names, etc).
>
> How can I keep this information? I use a resampler filter and I have tried:
> resampler->SetMetaDataDictionary(reader->GetMetaDataDictionary());
> writer->SetInput(resampler->GetOutput());
> writer->UseInputMetaDataDictionaryOn();
>
> With no luck..
>
> Thank you,
>
> Matias.
>
>
>
> --
> View this message in context: http://itk-users.7.n7.nabble.
> com/DicomTags-when-reading-directory-and-generating-mha-
> or-mhd-tp37989.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
> _____________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20170313/a6de989b/attachment.html>


More information about the Insight-users mailing list