<div dir="ltr"><div><div><div><div><div>Hello Dorian,<br><br></div>ITK support a large number of file extensions including .hdr, .nii, .nii.gz. <br></div>.hdr files are saved with a .img file (.hdr is the header and .img is the data.<br></div><div>ITK decides which file format to save your data as based on the extension in the filename you provide. Since image format extensions can contain multiple "." (such as .nii.gz), it relies on finding the first "." and finds the extension name from there, thus the problem you are having.<br></div>You may want to change the file name you save your file as, and either chose .img or .nii.gz, but not both.<br><br></div>Hope this helps,<br></div>Francois<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 19, 2017 at 9:24 AM, Dorian P. <span dir="ltr"><<a href="mailto:alb.net@gmail.com" target="_blank">alb.net@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I sent this in ITK users list, just forwarding it to developers as well. </div><div><br></div><div>I use ANTs(R) which relies on ITK. When I try to save images ending in '.img.nii.gz' I end up getting files with a different extension '.hdr.gz'. These files are then unusuable, they cannot open anymore with ITK software (ANTsR, ITKsnap).</div><div><br></div><div>Can you have a look if this is a bug that can be fixed in the near future?</div></div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://kitware.com/products/<wbr>protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-<wbr>developers</a><br>
<br></blockquote></div><br></div>