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  January 2011

FSL January 2011

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Combining Flirt Affine Matrices

From:

Mark Jenkinson <[log in to unmask]>

Reply-To:

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

Date:

Fri, 14 Jan 2011 23:33:51 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (184 lines)

Hi,

If you are matching high-resolution structural images from different
subjects with an affine registration, then the result is always poor.
This is partly why the registration accuracy is low and hence you
cannot expect too much - just look at the images and you will see
this.  However, such an affine registration is used in practice as an
initialisation for a non-linear registration, and so it only needs to be
approximate, and within 5mm would be sufficiently good in general
(although your 4.5mm combines two registrations and so is likely to
overestimate the single registration inaccuracy).

Furthermore, what you get from looking at the multiplication of
these matrices is a measure of consistency, not accuracy (although
they are related to some extent).  The default cost function that you
are using is correlation ratio and this is very asymmetric in its
formulation. Consequently, it is expected that it finds a different
registrations each way around to some degree.  The fact that it is
always finding a compromise situation (as the registration cannot
be that good for just an affine) means that this asymmetry tends
to be worse.  However, if you try a different cost function like 
normalised correlation (which is highly appropriate for this kind of
within-modality registration) then it should do much better.  I tried
this for a pair of OASIS images and the difference in registration
discrepancy (measured by how far off the multiplication is from a
perfect identity matrix) went from around 4mm to 0.18mm, which
is certainly a good level, at least for consistency, as the normalised
correlation is a much more symmetric measure of the alignment.
It does not mean that it is likely to be more accurate - just that the
solution it finds one way or the other way are more consistent.  I
suspect that all these registrations are effectively equivalent in terms
of quality, and all would be sufficiently good to run a successful 
non-linear registration.

I hope this clears things up.

All the best,
	Mark


On 14 Jan 2011, at 20:00, Andrew Asman wrote:

> Yes, the brain is extracted prior to registration. 
> 
> I pasted the image information (from MIPAV) for one of the OASIS volumes below. All of the volumes in the data set should have very similar information.
> 
> -Andrew
> 
>                      Image information
> 
> Dimension 0:          256
> Dimension 1:          256
> Dimension 2:          256
> Type:                 Unsigned Byte
> Min:                  0.0
> Max:                  227.0
> Modality:             Unknown Modality
> Slice origin upper left corner of image - right hand rule
>  Origin X (left to right) :         -128.0
>  Origin Y (top to bottom) :         11.0
>  Origin Z:(into the screen):        128.0
>  Origin T:(time):                   0.0
> Orientation:          Coronal 
> X axis orientation:   right to left 
> Y axis orientation:   superior to inferior 
> Z axis orientation:   posterior to anterior 
> Pixel resolution 0:  1.0  Millimeters 
> Pixel resolution 1:  1.0  Millimeters 
> Pixel resolution 2:  1.0  Millimeters 
> Slice thickness:     0.0
> Endianess: Little Endian 
> Matrix: 
>   1.0000  0.0000  0.0000  0.0000  
>   0.0000  1.0000  0.0000  0.0000  
>   0.0000  0.0000  1.0000  0.0000  
>   0.0000  0.0000  0.0000  1.0000  
> 
> 
> 
>                 Other information
> 
> Description = Unknown Modality
> Voxel Offset = 352.0
> Intent code = No intention
> X,Y,Z Coordinate system = Scanner-based anatomical
> Source type = sourceTypeString
> Slope scale = 1.0
> Added offset = 0.0
> Frequency encoding direction = none
> Phase encoding direction = none
> Slice acquisition direction = none
> Axis: x-orientation = Right to Left
> Axis: y-orientation = Superior to Inferior
> Axis: z-orientation = Posterior to Anterior
> X Origin: -128.0
> Y Origin: 11.0
> Z Origin: 128.0
> cal_min = 0.0
> cal_max = 0.0
> Bits per Pixel = 8
> Name or meaning of data = 
> No extended header is present
> Qform Matrix = 
>   1.0000  -0.0000  0.0000  -128.0000  
>   -0.0000  -0.0000  -1.0000  128.0000  
>   -0.0000  -1.0000  -0.0000  128.0000  
>   0.0000  0.0000  0.0000  1.0000  
> 
> On Fri, Jan 14, 2011 at 1:09 PM, Mark Jenkinson <[log in to unmask]> wrote:
> Hi,
> 
> Are you doing brain extraction prior to registration?
> We always recommend this before doing registrations.
> This may be the cause of the problems, especially if
> there is a lot of non-brain material, as FLIRT is optimised
> to work with brain extracted images.
> 
> All the best,
>        Mark
> 
> 
> On 14 Jan 2011, at 18:33, Andrew Asman wrote:
> 
> > Hello,
> >
> > Thanks for the response. The data that I am using is from the OASIS data set:
> >
> > http://www.oasis-brains.org/
> >
> > - The volumes are 1mm isotropic (256x256x256 voxels).
> > - Both the input image and the reference image are from the OASIS data set, thus, they should both be of approximately the same quality.
> > - The flirt command that I am using is fairly straightforward:
> >
> > flirt -in OAS1_0001.nii.gz -ref OAS1_0002.nii.gz -out OAS1_0001_to_OAS1_0002_affine_out.nii.gz -omat OAS1_0001_to_OAS1_0002_affine.txt
> >
> > - As far as I can tell, all images are of solid structural quality. I have used several different combinations of images and I get the reported result in all cases.
> >
> > Thanks,
> > Andrew
> >
> >
> >
> > On Thu, Jan 13, 2011 at 4:12 PM, Mark Jenkinson <[log in to unmask]> wrote:
> > Hi,
> >
> > Your method seems fine - flirt matrices should multiply
> > together in this way.  So this is a surprisingly large error.
> >
> > How big are your voxels?  If they are quite large then
> > this is possible.  Also, if you are running registration with
> > the reference image set to a lower quality image (e.g. an
> > EPI) then the cost functions can be poorly estimated and
> > the registrations can be worse for that.  Also, if there is a
> > lot of distortion (e.g. EPI) then this could cause problems
> > too.  However, if this is on two good quality structural images
> > then it is a bit surprising.
> >
> > Can you provide a bit more information about what kind of
> > images you've used?
> >
> > All the best,
> >        Mark
> >
> >
> > On 13 Jan 2011, at 20:17, Andrew Asman wrote:
> >
> > > I have two affine matrices resulting from two separate calls to flirt. One is used to register a2b and the other b2a. My minimal understanding of registration indicates that the product of these two matrices should be approximately the identity matrix, i.e. if I were to apply a2b and then b2a on 'a' then the result should be very close to the original 'a'. Is there any obvious reason why this should not be the case?
> > >
> > > The result of multiplying the two affine matrices gives the following result ....
> > >
> > >    1.0247    0.0059   -0.0048   -3.2806
> > >   -0.0022    1.0338   -0.0250   -0.4633
> > >    0.0126    0.0338    1.0336   -8.9326
> > >              0              0               0    1.0000
> > >
> > > where the main deviation from the identity matrix is in the 4th column. Note, the two images that I am registering have exactly the same dimensions and voxel resolution.
> > >
> > > I have written MATLAB code to convert the affine matrix to a deformation field and the resulting deformation field exactly matches the output of the 'img2imgcoord -vox ...' utility. Thus, I am confident that I am reading and applying the affine matrix appropriately. If I compose the two resulting deformation fields the mean displacement is about 4.5 mm, which seems a little high for simply applying an a2b then b2a affine transformation.
> > >
> > > -Andrew Asman
> > >
> >
> 

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