Hi there,
I'm not sure I'll be able to answer all these questions, but I can have a
go at some of them....
>
> tstat1 (*.feat/stats folder 32 bit img file)
> to (Conversion 1)
> tstat1_highres (resampled to highres space using flirt)
> to (Conversion 2)
> tstat1_highres_16 (converted to a 16bit signed short image)
>
>
> I have a couple questions regarding each of the Conversions listed
> above:
>
> Conversion 1:
> I converted the file using flirt.
> Distressing, however is that when I check the data range I see this:
> avwstats tstat1.img -r
> -1.554848 1.625723
> tstat1_highres.img -r
> -0.845122 0.922256
> avwstats tstat1.img -R
> -4.851428 4.815962
> avwstats tstat1_highres.img -R
> -4.145343 4.230853
> The means are even slightly off (meaned using -M). This is rather
> distressing to me, but is it simply just a natural function of
> interpolation ?
Yep - exactly right - any smooth interpolation function (e.g.
trilinear) will have the effect of "squashing" outliers, so your maximum
and minimum T-scores will be reduced after applying a flirt transform.
> When I try outputing 16 bit short images from flirt (adding "-datatype
> short" to the command line syntax) the range becomes even worse off
> (+/- 4.000000 ) and the files don'e even qualitatively look similar.
>
Yep - this will just round to the nearest integer, and it will not apply
any scale factor to the image first, so your output will really contain
integers only.
>
> Conversion 2:
> Is there a quick, easy way to convert between 32-bit and 16-bit analyze
> images ?
Yes, you can do this with avwmaths
e.g. if you want to convert to 16 bit unsigned int, do
avwmaths_16UI <input> <output>
the following seem to be available here
avwmaths_16UI avwmaths_32SI avwmaths_64R avwmaths_8UI avwmaths_16SI
avwmaths_32R avwmaths_32UI avwmaths_8SI
but I guess 64 bit Real won't be available on most machines.
I'm afraid that if you want to include a scale factor so that you can
store t-scores in integer images, then you will have to do it manually
(i.e. multiply your image by e.g. 1000 before conversion).
Hope this helps
Tim
> I have tried a few different methods with varying results. The easiest
> method I've found is to use imgcon with this syntax:
> imgcon -short <filename.hdr>
> But the problem with that is that the values get scaled funny.
> Qualitatively, the 16-bit images look the same as their 32-bit parent,
> but the values are all wrong.
> The resampled img had this range:
> avwstats tstat1_highres_16.img -R
> -32767.000000 32766.000000
>
> Is there a way to get imgcon to rescale the data correctly, because I
> do like the simplicity and speed of the program. Or is there a better,
> more reliable way to do this?
>
>
> Any thoughts ?
>
> -Vikas
>
> ****
> Vikas Rao
> Lab Assistant
> [log in to unmask]
>
> Clinical Neuroscience Lab, UCLA
> www.cannonlab.net
> 310-794-9673
>
|