[Insight-developers] viewing nifti files with 3.2 release

Richard Beare richard.beare at gmail.com
Tue Sep 11 20:35:18 EDT 2007


Hi Everyone,

It is a little while since I updated, to this change may have been
around for a while without me noticing. I'm not sure what the best way
of dealing with this is.

The issue arose for me looking at nifti image tissue probability maps
generated by spm5. These images are stored as unsigned char along with
a scaling factor. Previously the ITK nifti reader ignored the scaling
factor, but it now seems to honor it. The problem arises when
software, such as ImageViewer, needs to attempt to guess the
appropriate voxel type to use.

Currently, I presume, it probes the reader reported pixel type using
something like:
reader->GetImageIO()->GetComponentTypeInfo();
and determines that the underlying type is an unsigned 8 bit integer.
The appropriate part of the ImageViewer is then called. However the
reader is then required to apply the scale transform such that the
output is an integer type which, in the case of a probability map,
results in an image of mostly zeros with the occasional 1.

Naturally enough, seeing blank images is a bit disconcerting. I'm not
sure if there is a better way of dealing with this problem - I
certainly don't see a solution that will work for every situation. Is
there some way of checking the reader for scaling, or
enabling/disabling it?


More information about the Insight-developers mailing list