<div dir="ltr">Thanks Dzenam,<div><br></div><div>I actually have a resampler:</div><div><div><span class="Apple-tab-span" style="white-space:pre"> </span>typedef itk::ResampleImageFilter<InputImageType, OutputImageType > FilterType; //Filtro</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>FilterType::Pointer resampler = FilterType::New();</div></div><div><br></div><div>which is then passed to the writer:</div><div>writer->SetInput(resampler->GetOutput());<br></div><div><br></div><div>So I will try your suggestion and do this:</div><div>resampler->SetMetaDataDictionary(metadata);<br></div><div><br></div><div>or:</div><div><br></div><div>writer->SetMetaDataDictionary(metadata);<br></div><div><br></div>I will let you know how it goes.<div><br></div><div>Regards,</div><div><br></div><div>Matias<br><div class="gmail_quote"><div dir="ltr">El lun., 13 de mar. de 2017 a la(s) 10:02, Dženan Zukić [via ITK - Users] <<a href="/user/SendEmail.jtp?type=node&node=37994&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>> escribió:<br></div><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" class="gmail_msg"><div class="gmail_default gmail_msg" style="font-family:verdana,sans-serif;font-size:small">Hi Matias,</div><div class="gmail_default gmail_msg" style="font-family:verdana,sans-serif;font-size:small"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:verdana,sans-serif;font-size:small">what worked for me was:</div><div class="gmail_default gmail_msg" style="font-family:verdana,sans-serif;font-size:small"><br class="gmail_msg"></div><div class="gmail_default gmail_msg"><font face="monospace, monospace" class="gmail_msg">itk::MetaDataDictionary metadata = reader->GetMetaDataDictionary();<br class="gmail_msg"></font></div><div class="gmail_default gmail_msg"><font face="monospace, monospace" class="gmail_msg">//processing...</font></div><div class="gmail_default gmail_msg"><font face="monospace, monospace" class="gmail_msg">image->SetMetaDataDictionary(metadata);<br class="gmail_msg"></font></div><div class="gmail_default gmail_msg"><font face="monospace, monospace" class="gmail_msg">writer->SetInput(image);<br class="gmail_msg"></font></div><div class="gmail_default gmail_msg"><font face="monospace, monospace" class="gmail_msg">writer->Update();</font></div><div class="gmail_default gmail_msg"><font face="verdana, sans-serif" class="gmail_msg"><br class="gmail_msg"></font></div><div class="gmail_default gmail_msg"><font face="verdana, sans-serif" class="gmail_msg">Regards,</font></div><div class="gmail_default gmail_msg"><font face="verdana, sans-serif" class="gmail_msg">Dženan</font></div></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Mon, Mar 13, 2017 at 8:31 AM, Matias <span dir="ltr" class="gmail_msg"><<a href="http:///user/SendEmail.jtp?type=node&node=37990&i=0" rel="nofollow" link="external" class="gmail_msg" target="_blank">[hidden email]</a>></span> wrote:<br class="gmail_msg"><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote gmail_msg">Hi,<br class="gmail_msg">
<br class="gmail_msg">
I'm reading a directory which contains a series of Dicoms and then writting<br class="gmail_msg">
an .mha or .mhd file.<br class="gmail_msg">
<br class="gmail_msg">
I noticed the tags are lost (patient name, capture device, dates, series<br class="gmail_msg">
names, etc).<br class="gmail_msg">
<br class="gmail_msg">
How can I keep this information? I use a resampler filter and I have tried:<br class="gmail_msg">
resampler->SetMetaDataDictionary(reader->GetMetaDataDictionary());<br class="gmail_msg">
writer->SetInput(resampler->GetOutput());<br class="gmail_msg">
writer->UseInputMetaDataDictionaryOn();<br class="gmail_msg">
<br class="gmail_msg">
With no luck..<br class="gmail_msg">
<br class="gmail_msg">
Thank you,<br class="gmail_msg">
<br class="gmail_msg">
Matias.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
View this message in context: <a href="http://itk-users.7.n7.nabble.com/DicomTags-when-reading-directory-and-generating-mha-or-mhd-tp37989.html" rel="nofollow" link="external" class="gmail_msg" target="_blank">http://itk-users.7.n7.nabble.com/DicomTags-when-reading-directory-and-generating-mha-or-mhd-tp37989.html</a><br class="gmail_msg">
Sent from the ITK - Users mailing list archive at Nabble.com.<br class="gmail_msg">
_____________________________________<br class="gmail_msg">
Powered by <a href="http://www.kitware.com" rel="nofollow" link="external" class="gmail_msg" target="_blank">www.kitware.com</a><br class="gmail_msg">
<br class="gmail_msg">
Visit other Kitware open-source projects at<br class="gmail_msg">
<a href="http://www.kitware.com/opensource/opensource.html" rel="nofollow" link="external" class="gmail_msg" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br class="gmail_msg">
<br class="gmail_msg">
Kitware offers ITK Training Courses, for more information visit:<br class="gmail_msg">
<a href="http://www.kitware.com/products/protraining.php" rel="nofollow" link="external" class="gmail_msg" target="_blank">http://www.kitware.com/products/protraining.php</a><br class="gmail_msg">
<br class="gmail_msg">
Please keep messages on-topic and check the ITK FAQ at:<br class="gmail_msg">
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="nofollow" link="external" class="gmail_msg" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br class="gmail_msg">
<br class="gmail_msg">
Follow this link to subscribe/unsubscribe:<br class="gmail_msg">
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="nofollow" link="external" class="gmail_msg" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br class="gmail_msg">
</blockquote></div><br class="gmail_msg"></div>
<br class="gmail_msg">_____________________________________
<br class="gmail_msg">Powered by <a href="http://www.kitware.com" class="gmail_msg" target="_blank" rel="nofollow" link="external">www.kitware.com</a>
<br class="gmail_msg"><br class="gmail_msg">Visit other Kitware open-source projects at
<br class="gmail_msg"><a href="http://www.kitware.com/opensource/opensource.html" rel="nofollow" link="external" class="gmail_msg" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br class="gmail_msg"><br class="gmail_msg">Kitware offers ITK Training Courses, for more information visit:
<br class="gmail_msg"><a href="http://www.kitware.com/products/protraining.php" rel="nofollow" link="external" class="gmail_msg" target="_blank">http://www.kitware.com/products/protraining.php</a><br class="gmail_msg"><br class="gmail_msg">Please keep messages on-topic and check the ITK FAQ at:
<br class="gmail_msg"><a href="http://www.itk.org/Wiki/ITK_FAQ" rel="nofollow" link="external" class="gmail_msg" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br class="gmail_msg"><br class="gmail_msg">Follow this link to subscribe/unsubscribe:
<br class="gmail_msg"><a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="nofollow" link="external" class="gmail_msg" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<hr noshade size="1" color="#cccccc" class="gmail_msg">
<div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif" class="gmail_msg">
<div style="font-weight:bold" class="gmail_msg">If you reply to this email, your message will be added to the discussion below:</div>
<a href="http://itk-users.7.n7.nabble.com/DicomTags-when-reading-directory-and-generating-mha-or-mhd-tp37989p37990.html" class="gmail_msg" target="_blank" rel="nofollow" link="external">http://itk-users.7.n7.nabble.com/DicomTags-when-reading-directory-and-generating-mha-or-mhd-tp37989p37990.html</a>
</div>
<div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em" class="gmail_msg">
To unsubscribe from DicomTags when reading directory and generating mha or mhd..., <a href="" class="gmail_msg" target="_blank" rel="nofollow" link="external">click here</a>.<br class="gmail_msg">
<a href="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" rel="nofollow" style="font:9px serif" class="gmail_msg" target="_blank" link="external">NAML</a>
</div></blockquote></div></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">Matias</div></div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://itk-users.7.n7.nabble.com/DicomTags-when-reading-directory-and-generating-mha-or-mhd-tp37989p37994.html">Re: [ITK-users] DicomTags when reading directory and generating mha or mhd...</a><br/>
Sent from the <a href="http://itk-users.7.n7.nabble.com/">ITK - Users mailing list archive</a> at Nabble.com.<br/>