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
|