Hi,
On Wed, Apr 4, 2012 at 8:28 AM, Pieter Vandemaele
<[log in to unmask]> wrote:
>
> Hi,
>
> I managed to get the scripts running, thanks for that.
>
> I am now thinking that we should use your second solution with the floating point option.
> I think that it would also be good to convert the smoothed and normalized nifti to nifti with slope and intercept applied to avoid scaling problems.
Here's a script to do that. This is the output from
``./to_floating.py --help``:
usage: to_floating.py [-h] [--output-type OUTPUT_TYPE] input_img output_img
"""
Convert image to unscaled floating point
positional arguments:
input_img input image filename
output_img output image filename
optional arguments:
-h, --help show this help message and exit
--output-type OUTPUT_TYPE
file type to write (default uses filename) options are
mgh, nifti_pair, spm2analyze, spm99analyze, mgz,
analyze, nifti_single
Convert input image to floating point
Examples
--------
Convert nifti scaled to nifti floating point::
to_floating.py my.nii myfloating.nii
Convert nifti scaled to analyze floating point::
to_floating.py --output-type=analyze my.nii myfloating.img
Convert analyze floating point to nifti floating point::
to_floating.py an_analyze.img a_nifti_floating.nii
The routine tries to guess the output file type from the extension unless you
specify with ``--output-type``. The default output type for an extension of
``.img`` is a nifti pair; to write Analyze use ``--output-type=analyze``.
"""
Let me know if that works,
Best,
Matthew
|