<div dir="ltr">Thank you, I will try the mha format. I need the individual dcm though. I'm not sure if SimpleITK has a method to extract the dcm files from the mha and keep the origin of each file once I save it?</div><br><div class="gmail_quote"><div dir="ltr">El mié., 8 de mar. de 2017 a la(s) 16:27, Francois Budin <<a href="mailto:francois.budin@kitware.com">francois.budin@kitware.com</a>> escribió:<br></div><blockquote 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_msg"><div class="gmail_msg"><div class="gmail_msg">Hello Matias,<br class="gmail_msg"><br class="gmail_msg"></div>There are currently some limitations with what ITK can write in DICOM images. If you do not need to save a DICOM, you could save your image in a different format such at Nifti (.nii.gz), Meta (.mha), or NRRD (.nrrd), and the new origin will be saved.<br class="gmail_msg"><br class="gmail_msg"></div>Hope this helps,<br class="gmail_msg"></div>Francois<br class="gmail_msg"></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"></div></div><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg">On Tue, Mar 7, 2017 at 8:34 PM, Matias Montroull <span dir="ltr" class="gmail_msg"><<a href="mailto:matimontg@gmail.com" class="gmail_msg" target="_blank">matimontg@gmail.com</a>></span> wrote:<br class="gmail_msg"></div></div><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="m_-4271334358603136124m_-8780739369798379247inbox-inbox-uyb8Gf gmail_msg" style="color:rgb(33,33,33);font-size:13px"><div class="gmail_msg"><div class="m_-4271334358603136124m_-8780739369798379247inbox-inbox-F3hlO gmail_msg"><div dir="ltr" class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg">Hi,<div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"><br class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"></div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg">I have this simple code that creates blank images and I set the origin to 256 256, however, the resulting image doesn't seem to have the Origin set to what I specify, or at least I don't see it in the image tags..</div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"><br class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"></div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg">for (int i = 0; i < 160; i++)</div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"> {</div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"> itk.simple.Image image = new itk.simple.Image(512, 512, itk.simple.PixelIDValueEnum.sitkInt16);</div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"> image.SetOrigin(new VectorDouble(new Double[] {256,256,0}));</div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"><br class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"></div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"> itk.simple.ImageFileWriter writer_usuario = new ImageFileWriter();</div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"> writer_usuario.SetFileName("C:/temp/" + i + ".dcm");</div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"> writer_usuario.Execute(image);</div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"> }</div></div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"><br class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"></div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg">any clue?</div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"><br class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg"></div><div class="m_-4271334358603136124m_-8780739369798379247gmail_msg gmail_msg">Thanks,</div></div></div></div></div><div class="m_-4271334358603136124m_-8780739369798379247inbox-inbox-uyb8Gf gmail_msg" style="color:rgb(33,33,33);font-size:13px"><div class="gmail_msg"><div title="Mostrar texto citado" class="m_-4271334358603136124m_-8780739369798379247inbox-inbox-mg gmail_msg" style="border-radius:2px;color:rgb(117,117,117);display:inline-block;padding:0px 2px">…</div></div></div></div><span class="m_-4271334358603136124HOEnZb gmail_msg"><font color="#888888" class="gmail_msg"><div dir="ltr" class="gmail_msg">-- <br class="gmail_msg"></div><div data-smartmail="gmail_signature" class="gmail_msg"><div dir="ltr" class="gmail_msg">Matias</div></div>
</font></span><br class="gmail_msg"></blockquote></div></div><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_____________________________________<br class="gmail_msg">
Powered by <a href="http://www.kitware.com" rel="noreferrer" 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="noreferrer" 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="noreferrer" 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="noreferrer" 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="noreferrer" class="gmail_msg" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br class="gmail_msg">
<br class="gmail_msg"></blockquote></div><br class="gmail_msg"></div>
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">Matias</div></div>