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

Matias matimontg at gmail.com
Mon Mar 13 10:09:47 EDT 2017


Thanks Dzenam,

I actually have a resampler:
typedef itk::ResampleImageFilter<InputImageType, OutputImageType >
FilterType; //Filtro
FilterType::Pointer resampler = FilterType::New();

which is then passed to the writer:
writer->SetInput(resampler->GetOutput());

So I will try your suggestion and do this:
resampler->SetMetaDataDictionary(metadata);

or:

writer->SetMetaDataDictionary(metadata);

I will let you know how it goes.

Regards,

Matias
El lun., 13 de mar. de 2017 a la(s) 10:02, Dženan Zukić [via ITK - Users] <
ml-node+s7n37990h59 at n7.nabble.com> escribió:

> 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 <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=37990&i=0>> 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
>
>
>
> _____________________________________
> 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
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://itk-users.7.n7.nabble.com/DicomTags-when-reading-directory-and-generating-mha-or-mhd-tp37989p37990.html
> To unsubscribe from DicomTags when reading directory and generating mha or
> mhd..., click here
> <http://itk-users.7.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=37989&code=bWF0aW1vbnRnQGdtYWlsLmNvbXwzNzk4OXwtMTk0NzIxNTA4Mw==>
> .
> NAML
> <http://itk-users.7.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
-- 
Matias




--
View this message in context: http://itk-users.7.n7.nabble.com/DicomTags-when-reading-directory-and-generating-mha-or-mhd-tp37989p37994.html
Sent from the ITK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20170313/a139fbd9/attachment.html>


More information about the Insight-users mailing list