[ITK-dev] Cannot write files ending '.img.nii.gz'

Francois Budin francois.budin at kitware.com
Fri May 19 13:28:52 EDT 2017


Hello Dorian,

ITK support a large number of file extensions including .hdr, .nii,
.nii.gz.
.hdr files are saved with a .img file (.hdr is the header and .img is the
data.
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.
You may want to change the file name you save your file as, and either
chose .img or .nii.gz, but not both.

Hope this helps,
Francois

On Fri, May 19, 2017 at 9:24 AM, Dorian P. <alb.net at gmail.com> wrote:

> I sent this in ITK users list, just forwarding it to developers as well.
>
> 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).
>
> Can you have a look if this is a bug that can be fixed in the near future?
>
> _______________________________________________
> 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://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-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-developers/attachments/20170519/a89fbea4/attachment.html>


More information about the Insight-developers mailing list