 Email discussion lists for the UK Education and Research communities  ## 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  FSL Home  FSL August 2009

#### Options  Subscribe or Unsubscribe   Log In   Get Password Subject: Re: Re : [FSL] Jacobian in FNIRT

From:  Date: Thu, 6 Aug 2009 14:50:40 +0100

Content-Type: text/plain

Parts/Attachments:  text/plain (41 lines)
 ```Dear Roberto, > that's good news! (I didn't know what had happened that all my brain > volumes were so similar :-) Thank you for you answers. > So, I'll compute the determinant of the affine.mat matrix and multiply > the volumes I computed from the jacobian by that value. What does the > nitpicky solution involve? you basically combine the affine part with the relevant partial derivative of the field for each of the components of the Jacobian matrix. This reduces to the multiplication of the determinants in some special cases where the off-diagonal elements of the affine and/or non- linear Jacobian are zero. In practice the differences are very small though. jac(i,j,k) = (a11+(1.0/dx.Vxs_x())*dxdx->element(indx)) * (a22+(1.0/ dy.Vxs_y())*dydy->element(indx)) * (a33+(1.0/dz.Vxs_z())*dzdz-  >element(indx));          jac(i,j,k) += (a12+(1.0/dx.Vxs_y())*dxdy->element(indx)) * (a23+(1.0/dy.Vxs_z())*dydz->element(indx)) * (a31+(1.0/ dz.Vxs_x())*dzdx->element(indx)); jac(i,j,k) += (a13+(1.0/dx.Vxs_z())*dxdz->element(indx)) * (a21+(1.0/ dy.Vxs_x())*dydx->element(indx)) * (a32+(1.0/dz.Vxs_y())*dzdy-  >element(indx));          jac(i,j,k) -= (a31+(1.0/dz.Vxs_x())*dzdx->element(indx)) * (a22+(1.0/dy.Vxs_y())*dydy->element(indx)) * (a13+(1.0/ dx.Vxs_z())*dxdz->element(indx));          jac(i,j,k) -= (a32+(1.0/dz.Vxs_y())*dzdy->element(indx)) * (a23+(1.0/dy.Vxs_z())*dydz->element(indx)) * (a11+(1.0/ dx.Vxs_x())*dxdx->element(indx));          jac(i,j,k) -= (a33+(1.0/dz.Vxs_z())*dzdz->element(indx)) * (a21+(1.0/dy.Vxs_x())*dydx->element(indx)) * (a12+(1.0/ dx.Vxs_y())*dxdy->element(indx)); > (Jasper, it would be great to have the full > jacobian right from fnirt!) I'll put it on the to-do list for the next release. Good luck J ```