JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for FSL Archives


FSL Archives

FSL Archives


FSL@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

FSL Home

FSL Home

FSL  2005

FSL 2005

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: negative pixdims - confusion revisited...

From:

Mark Jenkinson <[log in to unmask]>

Reply-To:

FSL - FMRIB's Software Library <[log in to unmask]>

Date:

Tue, 10 May 2005 22:18:27 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (354 lines)

Hi,

I just thought I should add my comments on this.

Firstly, I completely agree with Steve - nifti is designed so that these
issues will disappear.  However, in the very short term it is, unfortunately,
still probably necessary to deal with Analyze.

Tim is also correct in that the negative pixdim stuff is hard coded in the
lowest level i/o routines within FSL.  This is so that we could be completely
consistent with the avg152T1 image that has been distributed, which
has, and has always had, negative pixdims.

As for using positive pixdims within an FSL pipeline - that is fine, as long
as you don't use it to indicate a change in the left-right order.  We will
always assume that Analyze images are in "radiological ordering" (a
right-handed coordinate system, as Talairach is).  So be very careful
about left-right order - but if your Analyze images are always in
"radiological ordering" then the sign of the pixdim is irrelevant for FSL
and will be ignored (although a negative pixdim will always be *written*
on output).  See the FAQ for more details about coordinate systems and
left-right.  This isn't an easy issue and any change in how things work
(necessary for introducing nifti support) was always going to cause
headaches - for us and for users.

Finally, it is possible to write positive pixdims with the old FSL utilities.
All that you'd have to do is get an old copy of avwcreatehd from v3.1
and it would create pixdims of whatever sign you asked for.

So I hope that helps clarify everything.
Lastly, I would like to heartily recommend everyone to move to nifti1 format
soon as it will hopefully circumvent these problems.  However, for the moment
be warned that we do not recommend anything except "radiological
ordering" even in nifti files, although this will change in the next release.

All the best,
        Mark


> Hi - just a couple of quick points:
>
> The negative pixdim issues is covered briefly on the FAQ:
> http://www.fmrib.ox.ac.uk/fslfaq/#general_lr
>
> But, the most important answer is this: the whole point of NIFTI1 is to
> resolve the many different conflicting uses of some Analyze header
> fields - and these recent emails are further proof that _by far the
> best_ way to move forward and lose these problems is to start using
> NIFTI1 and not use Analyze at all! This isn't a political issue - all
> the major packages have switched or are switching to NIFTI - and this is
> the best way of making sure these ambiguities go away!
>
> Cheers, Steve.
>
>
>
>
>
> On Tue, 10 May 2005, Russ Poldrack wrote:
>
>> I would second the recommendation that FSL should not automatically
>> assign a negative pixdim by fiat, but rather should preserve the
>> pixdim from the original data.  many of us move between programs to do
>> various analysis steps, and these kinds of changes to pixdim could
>> result in lateralization errors.
>> cheers
>> russ
>>
>> On May 10, 2005, at 8:07 AM, Dr Krish Singh wrote:
>>
>> > Thanks, Tim.
>> >
>> > Now that I know what's happening I can write a program to fix it
>> myself - I
>> > just wanted to make sure my understanding was correct and that I
>> wouldn't be
>> > re-inventing the wheel (I usually find that when I write a program
>> there was
>> > an FSL tool that already did the job!).
>> >
>> > In terms of "fixing" things for the next version, I suppose my only
>> plea
>> > would be for avwcpgeom to actually preserve the sign of the pixdims
>> it is
>> > copying. Perhaps also a version of avwcreatehd that similarly
>> > respected the
>> > command line signs for the pixdims.
>> >
>> > All the best,
>> >
>> > Krish
>> >
>> >
>> >
>> > On 10/5/05 3:36 pm, "Tim Behrens" <[log in to unmask]> wrote:
>> >
>> >
>> >> Krish -
>> >> MJ may well correct this later, but as far as I understand you are
>> exactly
>> >> right:
>> >>
>> >> FSL _always_ writes analyze format images with a negative x pixdim.
>> The reason for this is that FSL _always_ interprets analyze format
>> files
>> >> as being in radiological convention. To be consistent with the
>> sform matrix in nifti, this means that the x dimension must be
>> negative. (As you move in a positive direction through voxels, you
>> are
>> >> moving in a
>> >> negative direction in real mm space).
>> >>
>> >> I think that this is written into the FSL utilities at the lowest
>> level;
>> >> so I don't think you will find a utility that will write a positive
>> analyze pixdim. Sorry.
>> >>
>> >> As I say - MJ may well correct this, but this is my understanding.
>> >>
>> >> Tim
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> On Tue, 10 May 2005, Dr Krish Singh wrote:
>> >>
>> >>
>> >>> Thanks for the advice, Brendon.
>> >>>
>> >>> However, now I am really confused.
>> >>>
>> >>> I have a 4D analyse file called clockwise.hdr. Using avwinfo gives
>> me:
>> >>>
>> >>> ------------------
>> >>> pixdim1        3.0000000000
>> >>> pixdim2        3.0000000000
>> >>> pixdim3        3.0000000000
>> >>> -------------------
>> >>>
>> >>> Then I do:
>> >>>
>> >>> ip clockwise.hdr smooth.hdr 0 -s 4.0
>> >>>
>> >>> To create a smoothed 4D file. Using "avwinfo smooth.hdr" on this
>> gives:
>> >>>
>> >>> -------------------
>> >>> pixdim1        -3.0000000000
>> >>> pixdim2        3.0000000000
>> >>> pixdim3        3.0000000000
>> >>> -------------------
>> >>>
>> >>> So, I tried your suggestion of using "avwcpgeom clockwise.hdr
>> smooth.hdr"
>> >>>
>> >>> Unfortunately, this doesn't work! I still get a negative pixdim in
>> smooth.hdr.
>> >>>
>> >>> So, next I tried using avwchpixdim, which as far as I can tell
>> changes the
>> >>> pixdims manually. So I tried:
>> >>>
>> >>> avwchpixdim smooth.hdr 3.0 3.0 3.0
>> >>>
>> >>> Still no joy i.e. smooth.hdr still has a negative pixdim.
>> >>>
>> >>> But then I got curious. It seems that avwchpixdim is just a
>> >>> script that
>> >>> calls avwcreatehd. So I created a completely new header using:
>> >>>
>> >>> avwcreatehd 64 64 30 72 3.0 3.0 3.0 1.0000000000 32 32 15 4
>> test.hdr
>> >>>
>> >>> This is where it gets weird. Despite the fact that I am telling
>> avwcreatehd
>> >>> to create a completely new header with pixdims of (3,3,3) it
>> actually
>> >>> creates one with pixdims of (-3,3,3) i.e. If I type avwinfo
>> >>> test.hdr, I get:
>> >>>
>> >>> ---------------------------------
>> >>> pixdim1        -3.0000000000
>> >>> pixdim2        3.0000000000
>> >>> pixdim3        3.0000000000
>> >>> ----------------------------------
>> >>>
>> >>> So, at least in my version of FSL, the creation of a negative x
>> pixdim seems
>> >>> almost hard-wired into the base-level code for creating Analyze
>> headers.
>> >>>
>> >>>
>> >>> I wonder if anyone has any insight/suggestions? Otherwise I will
>> have to
>> >>> write my own code for getting rid of negative pixdims.
>> >>>
>> >>> All the best and thanks again,
>> >>>
>> >>> Krish
>> >>>
>> >>> P.S. You might be wondering why I am bothered about this, given
>> that the FSL
>> >>> tools don't care. Its because I often use the FSL command-line
>> tools as
>> >>> preprocessing tools before analyses with other programs,
>> >>> including my own,
>> >>> some of which get very confused by negative pixdims.
>> >>>
>> >>>
>> >>> On 9/5/05 9:51 pm, "Brendon Nacewicz" <[log in to unmask]> wrote:
>> >>>
>> >>>
>> >>>> I had a similar problem with flirt & just used avwcpgeom to match
>> the
>> >>>> dimensions of my target image (or input image in this case).  I
>> realize
>> >>>> that's not ideal but it's
>> >>>> scriptable & it works.  I suppose if ip runs faster you might
>> also see
>> >>>> if two wrongs make a right & simply rerun it on the output image
>> with
>> >>>> 0 smoothing?
>> >>>>
>> >>>> Hope that helps,
>> >>>> Brendon
>> >>>>
>> >>>> --
>> >>>>
>> >>>> Brendon Nacewicz
>> >>>> Waisman Laboratory for Brain Imaging & Behavior
>> >>>> University of Wisconsin Medical School &
>> >>>> Neuroscience Training Program
>> >>>>
>> >>>>
>> >>>> On 5/9/05, Dr Krish Singh <[log in to unmask]
>> >>>> <mailto:[log in to unmask]>> wrote:
>> >>>>
>> >>>>> Hi everyone,
>> >>>>>
>> >>>>> I just used ip to spatially smooth some axial images and found
>> that, for
>> >>>>> Analyze output, it negates the first pixdim i.e. If the input
>> images have
>> >>>>> pixdims of (3x3x3 mm) than the output has pixdims of (-3x3x3
>> mm).
>> >>>>>
>> >>>>> I understand that there are complicated and deeply buried
>> >>>>> reasons why
>> >>>>>
>> >>>> this
>> >>>>
>> >>>>> was implemented, but its causing me some problems and I wonder
>> if
>> >>>>>
>> >>>> anyone had
>> >>>>
>> >>>>> a neat method for simply turning all the pixdims in an Analyze
>> header
>> >>>>> positive?
>> >>>>>
>> >>>>> All the best,
>> >>>>>
>> >>>>> Krish
>> >>>>>
>> >>>>> --
>> >>>>> Dr K.D. Singh
>> >>>>> Senior Lecturer and Convenor of the Neuroimaging Research Group,
>> Director, MRI Research Centre,
>> >>>>> Neurosciences Research Institute
>> >>>>> School of Life and Health Sciences
>> >>>>> Aston University, Birmingham B4 7ET, U.K.
>> >>>>> Tel/Fax: +44 (0)121 [204 3865/3864]/[333 4220]
>> >>>>> [log in to unmask] <mailto:[log in to unmask]>,
>> >>>>>
>> >>>> http://www.aston.ac.uk/lhs/staff/singhkd/
>> >>>> <http://www.aston.ac.uk/lhs/staff/singhkd/>
>> >>>>
>> >>>>>
>> >>>>>
>> >>>>
>> >>>>
>> >>>
>> >>> --
>> >>> Dr K.D. Singh
>> >>> Senior Lecturer and Convenor of the Neuroimaging Research Group,
>> Director, MRI Research Centre,
>> >>> Neurosciences Research Institute
>> >>> School of Life and Health Sciences
>> >>> Aston University, Birmingham B4 7ET, U.K.
>> >>> Tel/Fax: +44 (0)121 [204 3865/3864]/[333 4220]
>> >>> [log in to unmask], http://www.aston.ac.uk/lhs/staff/singhkd/
>> >>>
>> >>>
>> >>
>> >> --
>> >>
>> >>
>> > ----------------------------------------------------------------------
>> -------->
>> > -
>> >
>> >> Tim Behrens
>> >> Centre for Functional MRI of the Brain
>> >> The John Radcliffe Hospital
>> >> Headley Way Oxford OX3 9DU
>> >> Oxford University
>> >> Work 01865 222782
>> >> Mobile 07980 884537
>> >>
>> >>
>> > ----------------------------------------------------------------------
>> -------->
>> > -
>> >
>> >>
>> >>
>> >
>> > --
>> > Dr K.D. Singh
>> > Senior Lecturer and Convenor of the Neuroimaging Research Group,
>> Director, MRI Research Centre,
>> > Neurosciences Research Institute
>> > School of Life and Health Sciences
>> > Aston University, Birmingham B4 7ET, U.K.
>> > Tel/Fax: +44 (0)121 [204 3865/3864]/[333 4220]
>> > [log in to unmask], http://www.aston.ac.uk/lhs/staff/singhkd/
>> >
>>
>> ---
>> Russell A. Poldrack, Ph.d.
>> Assistant Professor
>> UCLA Department of Psychology
>> Franz  Hall, Box 951563
>> Los Angeles, CA 90095-1563
>>
>> phone: 310-794-1224
>> fax: 310-206-5895
>> email: [log in to unmask]
>> web: www.poldracklab.org
>>
>>
>
> --
>  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

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

May 2024
April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
2006
2005
2004
2003
2002
2001


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager