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  2002

FSL 2002

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: avwmerge problem

From:

Darren Weber <[log in to unmask]>

Reply-To:

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

Date:

Wed, 30 Oct 2002 15:22:41 +1030

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (324 lines)

OK, some documentation looks like this:

% short int dim[ ];      /* Array of the image dimensions */
%
% dim[0]      Number of dimensions in database; usually 4.
% dim[1]      Image X dimension; number of pixels in an image row.
% dim[2]      Image Y dimension; number of pixel rows in slice.
% dim[3]      Volume Z dimension; number of slices in a volume.
% dim[4]      Time points; number of volumes in database.
% dim[5]      Undocumented.
% dim[6]      Undocumented.
% dim[7]      Undocumented.
%

% float pixdim[]; Parallel array to dim[], giving real world measurements in
mm and ms.
%       pixdim[0]; Pixel dimensions?
%       pixdim[1]; Voxel width in mm.
%       pixdim[2]; Voxel height in mm.
%       pixdim[3]; Slice thickness in mm.
%       pixdim[4]; timeslice in ms.
%       pixdim[5]; Undocumented.
%       pixdim[6]; Undocumented.
%       pixdim[7]; Undocumented.
%

So, you would use pixdim[4] above to store the TR, in ms?

Thanks very much, Darren

PS, I sent a note about this issue to Xmedcon developers.



----- Original Message -----
From: "Mark Jenkinson" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Wednesday, October 30, 2002 2:43 PM
Subject: Re: avwmerge problem


Hi Darren,

Glad that fixed the problem.
As for the fields - time is always the fourth dimension, not zero.
That is dim4=number of time points,  pixdim4=TR.
Values of dim0 and pixdim0 both refer to the storage of intensity
(similar to bitpix).
I'm not exactly sure what they mean or how to interpret them (and
I don't think we use them ever), but the safest way to check is to
see what the output of avwmaths (or any other fsl program) is.

The other way to make sure that the header is correct is to create
a new one using avwcreatehd with the appropriate fields.  Only
the values which can be set as arguments to this are ever used
by fsl.

Cheers,
        Mark


On Wednesday, October 30, 2002, at 12:37  PM, Darren Weber wrote:

> Hi Mark,
>
> that's it.  There must be important differences in the header information
> expected.  My files were created with Xmedcon and avwmaths has corrected
> the
> fields to those expected by FSL.
>
> See below for details, but it appears that 'extents' should be 0, dim0
> should be 4 (even if it is only a 3D file for one time point), dim4 should
> be 1 (for one time point), and all the pixdim values are ordered so that
> pixdim0 is time (always zero?) and pixdim1-3 are XYZ (I guess).
>
> Cheers, Darren
>
> PS, I ran:
>
> [numerous siemens]$ avwhd c01 > c01.txt;
> [numerous siemens]$ avwhd newc01 > newc01.txt;
> [numerous siemens]$ diff -a c01.txt newc01.txt
>
> 1c1
> < filename       c01
> ---
>> filename       newc01
> 4,6c4,6
> < data_type      dsr
> < db_name               m003-ma0092
> < extents        16384
> ---
>> data_type
>> db_name
>> extents        0
> 9,10c9,10
> < hkey_un0
> < dim0           3
> ---
>> hkey_un0       ·
>> dim0           4
> 14c14
> < dim4           0
> ---
>> dim4           1
> 18c18
> < vox_units
> ---
>> vox_units      mm
> 23c23
> < pixdim0        3.0000000000
> ---
>> pixdim0        0.0000000000
> 35,36c35,36
> < cal_max        0.0000
> < cal_min        0.0000
> ---
>> cal_max        251.0000
>> cal_min        2.0000
> 39,41c39,41
> < glmax          11
> < glmin          0
> < descrip        Unknown
> ---
>> glmax          251
>> glmin          2
>> descrip
> 48c48
> < generated      (X)MedCon
> ---
>> generated
>
>
>
>
> ----- Original Message -----
> From: "Mark Jenkinson" <[log in to unmask]>
> To: <[log in to unmask]>
> Sent: Wednesday, October 30, 2002 11:42 AM
> Subject: Re: avwmerge problem
>
>
>> Hi Darren,
>>
>> I'm not sure what would be causing this, as I've never had a problem on
>> any redhat machine.
>>
>> I'd suggest first running your files through avwmaths just to make sure
>> that they have all the correct elements saved.  That is:
>> avwmaths c01 newc01
>> avwmaths c02 newc02
>>
>> then do:
>> avwmerge -t tmp newc01 newc02
>>
>> Then see if you still get the same problem.
>> Cheers,
>>         Mark
>>
>>
>> On Wednesday, October 30, 2002, at 12:00  PM, Darren Weber wrote:
>>
>>> Hi Tracy,
>>>
>>> this is curious.  It may not be your OS, it might be one of the
> components
>>> of avwmerge, as it appears to fail on my redhat linux 7.3 system.
>>>
>>> Just for kicks, I've tried to run avwmerge on a series of T1 MPRAGE
>>> anatomical volumes, to create a 4D file.  The .img files are axial
>>> unflipped, int16.
>>>
>>> The command was 'avwmerge -t tmp c01.img c02.img' - here's a matlab
>>> listing
>>> of the hdr.dime fields from c01 and the result tmp (note that tmp is a
> 4D
>>> file, but there is no size in the fourth dimension):
>>>
>>>>> c01.hdr.dime
>>>
>>> ans =
>>>
>>>            dim: [3 128 256 256 0 0 0 0]
>>>      vox_units: '    '
>>>      cal_units: '        '
>>>        unused1: 0
>>>       datatype: 4
>>>         bitpix: 16
>>>        dim_un0: 0
>>>         pixdim: [3 1.3047 0.9800 0.9800 0 0 0 0]
>>>     vox_offset: 0
>>>      roi_scale: 1
>>>       funused1: 0
>>>       funused2: 0
>>>        cal_max: 0
>>>        cal_min: 0
>>>     compressed: 0
>>>       verified: 0
>>>          glmax: 11
>>>          glmin: 0
>>>
>>>
>>> tmp.hdr.dime
>>>
>>> ans =
>>>
>>>            dim: [4 128 256 256 0 0 0 0]
>>>      vox_units: '    '
>>>      cal_units: '        '
>>>        unused1: 0
>>>       datatype: 4
>>>         bitpix: 16
>>>        dim_un0: 0
>>>         pixdim: [3 1.3047 0.9800 0.9800 0 0 0 0]
>>>     vox_offset: 0
>>>      roi_scale: 1
>>>       funused1: 0
>>>       funused2: 0
>>>        cal_max: 0
>>>        cal_min: 0
>>>     compressed: 0
>>>       verified: 0
>>>          glmax: 36
>>>          glmin: 0
>>>
>>>
>>>
>>> Cheers, Darren
>>>
>>>
>>> ----- Original Message -----
>>> From: "Tracy L. Luks" <[log in to unmask]>
>>> To: <[log in to unmask]>
>>> Sent: Wednesday, October 30, 2002 10:57 AM
>>> Subject: Re: avwmerge problem
>>>
>>>
>>>> Hi,
>>>>
>>>> I have double-checked the files in my directories, and I can't find
>>>> any abnormalities. There are no extra files, no 4D files, and no
>>>> evidence that OSX sees them differently than any other UNIX system:
>>>> there are 60 .img files and 60.hdr files. I'm still puzzled that
>>>> avwmerge behaves differently when I give it three specific files and
>>>> when I give it 30 specific files...
>>>>
>>>> Is there anything else that I can try?
>>>>
>>>> Thanks,
>>>> Tracy Luks
>>>>
>>>>> Hi - this is what you would get if you were mistakenly entering
>>>>> avwmerge -t OUT run1_f*
>>>>> ie if you left off the .img ....but you're not doing that....
>>>>>
>>>>> so I suspect it is an oddity of the strange macos filesystem....what
> do
>>>>> you get if you type
>>>>>
>>>>> echo run1_f*
>>>>>
>>>>> maybe you also have capitalised versions as well as lower case in the
>>>>> directory (macos can't see the difference)?
>>>>>
>>>>>         Thanks, Steve.
>>>>>
>>>>>
>>>>> On Sat, 26 Oct 2002, Tracy Luks wrote:
>>>>>
>>>>>>  I'm trying to use avwmerge with Mac OSX.2. I have a directory with
> 60
>>> 3D
>>>>>>  analyze files (i.e. 60 img and 60 hdr files). When I enter:
>>>>>>
>>>>>>  avwmerge -t OUT run1_f*.img
>>>>>>
>>>>>>  I get a 4D file with 120 volumes. If I enter the same thing with
>>>>>> three
>>>>>>  complete file names, I get a 4D file with 3 volumes, BUT if I enter
>>> the
>>>>>>  same thing with 30 complete file names, I get a 4D file with 60
>>> volumes.
>>>>>>
>>>>>>  Any ideas?
>>>>>>
>>>>>>  Thanks,
>>>>>>  Tracy Luks
>>>>>>
>>>>>>
>>>>>>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>  Tracy L. Luks, Ph.D.
>>>>>>  Magnetic Resonance Science Center
>>>>>>  1 Irving St., AC-109
>>>>>>  Department of Radiology
>>>>>>  University of California, San Francisco
>>>>>>  San Francisco CA 94143-1290
>>>>>>  Tel:   (415)514-0947
>>>>>>         (650)219-6927
>>>>>>  Email: [log in to unmask]
>>>>>>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>>
>>>>>
>>>>>  Stephen M. Smith
>>>>>  Head of Image Analysis, FMRIB
>>>>>
>>>>>  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
>>>>
>>>>
>>>> --
>>>> ********************************************************************
>>>> Tracy L. Luks Ph.D.
>>>> Dynamic NeuroImaging Lab
>>>> University of California San Francisco
>>>> [log in to unmask]
>>>> Office: 415-514-2527
>>>> Cell: 650-219-6927
>>>> Home: 415-459-5046
>>>>
>>

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

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