Aha - yes, you're right, I hadn't realised that: the unsigned short option
isn't actually supported by the Analyze format, so (whilst Analyze is
still supported at least) we don't support this (relatively unused)
datatype - it's an oversight that the _16UI binaries get created, sorry.
Likewise for signed chars.
Do you really need to convert away from float? I would have thought it
best just to leave it as is. Alternatively, if disk space is really that
tight, you could use 16SI, but of course you need to check that the data
fits the range (ie max of 32767 I think).
Cheers, Steve.
On Wed, 23 Feb 2005, Damian Stanley wrote:
> Hi - I've been having similar problems to the one described below. I'm
> trying to convert the 32 bit float data that comes out of slicetimer back to
> 16 bit unsigned integer data that we started with, however, the command
>
> avwmaths_16UI <slicetimer_output_filename> <slicetimer_output_filename>
>
> doesn't change the size of the file and when I use avwinfo and avwstats to
> check the file - the datatype and range of values seem to be the same as for
> the output from slicetimer (32 bit float) rather than being like that of my
> original, 16 bit UI data. Is there something I'm doing wrong? Thanks
>
> and cheers of course
>
> -Damian
>
>
> On Sat, 5 Feb 2005 05:06:38 +0900, [log in to unmask]
> <[log in to unmask]> wrote:
>
> >Thanks Stephen, it's working and it's so much better now.
> >cheers,
> >
> >>On Saturday 05 February 2005 04:05, Stephen Smith wrote:
> >> Hi - yes, just use avwmaths in float mode to rescale the values first,
> >> for example:
> >>
> >> avwmaths <image> -mul 1000 <newimage>
> >> avmaths_16SI <newimage> <newimage>
> >>
> >> Cheers.
> >>
> >> On Sat, 5 Feb 2005, [log in to unmask] wrote:
> >> > Hi Christian,
> >> >
> >> > Yes, I should have specified that on my first message. The original
> >> > images are floats between 0 and 1 stored as 32 bit. That explains why I
> >> > get a black output. Is there any way I could go around that? conversion
> >> > from float to integer for example...MRIcro does the job, but since it's
> >> > not command based and that I have to process all the slices one by one,
> >> > it's a little bit painful because I have a 256 slices data set that I
> >> > need to process. Thanks,
> >> >
> >> > >On Saturday 05 February 2005 02:56, Christian F.Beckmann wrote:
> >> > > Hi louien,
> >> > >
> >> > > avwmaths_16[S/U]I will convert to integers (and truncate the
> >> > > non-integer part !) If you currently store 0-1 values as 32bit floats
> >> > > then all you get is an empty image.
> >> > > cheers
> >> > > christian
> >> > >
> >> > > On 4 Feb 2005, at 13:53, [log in to unmask] wrote:
> >> > > > Hi Christian
> >> > > > Thanks. size wise the command seems to be working, but the image is
> >> > > > now black.
> >> > > > All the pixel have value 0. Would you know what's wrong?
> >> > > > thanks
> >> > > > cheers,
> >> > > >
> >> > > >> On Friday 04 February 2005 18:19, Christian F. Beckmann wrote:
> >> > > >> Hi
> >> > > >>
> >> > > >> you can use
> >> > > >>
> >> > > >> avwmaths_16SI infile outfile
> >> > > >>
> >> > > >> to do this. This will run avwmaths without performing any operation
> >> > > >> and
> >> > > >> force the output to 16 bit signed int. Use avwmaths_16UI for
> >> > > >> unsigned int
> >> > > >> cheers
> >> > > >> christian
> >> > > >>
> >> > > >> On 4 Feb 2005, at 05:13, [log in to unmask] wrote:
> >> > > >>> Hello list,
> >> > > >>> Can anyone specify the avw command for converting 32bits images to
> >> > > >>> 16bits
> >> > > >>> images?
> >> > > >>> Thanks in advance
> >> > > >>> cheers,
> >> > > >>
> >> > > >> --
> >> > > >> Christian F. Beckmann
> >> > > >> Oxford University Centre for Functional
> >> > > >> Magnetic Resonance Imaging of the Brain,
> >> > > >> John Radcliffe Hospital, Headington, Oxford OX3 9DU, UK
> >> > > >> Email: [log in to unmask] -
> >> > > >> http://www.fmrib.ox.ac.uk/~beckmann/
> >> > > >> Phone: +44(0)1865 222782 Fax: +44(0)1865 222717
> >> > > >
> >> > > > --
> >> > > > younes@home
> >> > >
> >> > > --
> >> > > Christian F. Beckmann
> >> > > Oxford University Centre for Functional
> >> > > Magnetic Resonance Imaging of the Brain,
> >> > > John Radcliffe Hospital, Headington, Oxford OX3 9DU, UK
> >> > > Email: [log in to unmask] - http://www.fmrib.ox.ac.uk/~beckmann/
> >> > > Phone: +44(0)1865 222782 Fax: +44(0)1865 222717
> >> >
> >> > --
> >> > younes@home
> >>
> >> --
> >> Stephen M. Smith DPhil
> >> Associate Director, FMRIB and Analysis Research Coordinator
> >>
> >> Oxford University Centre for Functional MRI of the Brain
> >> John Radcliffe Hospital, Headington, Oxford OX3 9DU, UK
> >> +44 (0) 1865 222726 (fax 222717)
> >>
> >> [log in to unmask] http://www.fmrib.ox.ac.uk/~steve
> >
> >--
> >younes@home
>
--
Stephen M. Smith DPhil
Associate Director, FMRIB and Analysis Research Coordinator
Oxford University Centre for Functional MRI of the Brain
John Radcliffe Hospital, Headington, Oxford OX3 9DU, UK
+44 (0) 1865 222726 (fax 222717)
[log in to unmask] http://www.fmrib.ox.ac.uk/~steve
|