ANTsX / ANTs

Advanced Normalization Tools (ANTs)
Apache License 2.0
1.19k stars 380 forks source link

Scale diffusion data by Jacobian determinant? #217

Closed spinicist closed 8 years ago

spinicist commented 9 years ago

Hello, I'm trying to correct for EPI distortions in diffusion data (hence my earlier question about restrict-deformation). This paper - http://dx.doi.org/10.1016/j.neuroimage.2012.06.081 - indicates that best practice is to calculate the deformation as a pre-processing step before calculating the tensor, and importantly to scale the pre-processed images by the Jacobian determinants to correct for 'signal pile-up'. Am I correct in thinking that antsApplyTransforms does NOT scale by the Jacobian? In which case I think the pipeline should look like:

  1. Extract a b=0 image from my diffusion dataset
  2. Register to structural image with restrict-deformation ~1x0.1x0.1
  3. Calculate Jacobian with CreateJacobianDeterminantImage on the Inverse warp
  4. Apply the forward transformation to all diffusion images
  5. Multiply all diffusion images by the Jacobian
  6. Calculate my tensor + FA + MD etc...

Note that I do not have to worry about subject motion (ex-vivo samples).

My question is do I have steps 3 & 5 the correct way round - i.e. should I be using the Inverse warp & multiplying? Or should it be division, and/or the forward warp?

Hope that makes sense, and if I've missed an example that covers this just point me to it. Thanks, Toby

stnava commented 9 years ago

hi toby

antsApplyTransforms will not scale by the jacobian. you should calculate the jacobian of the mapping that is in the space of the structural image. if the t1 is the fixed image, then this is the forward transformation. then you would divide the signal intensity (voxel-wise) by the jacobian.

note: a possible problem with this solution is that there is true loss of information in the "signal pile up" which cannot be corrected.

brian

On Thu, Aug 6, 2015 at 1:59 AM, Tobias Wood notifications@github.com wrote:

Hello, I'm trying to correct for EPI distortions in diffusion data (hence my earlier question about restrict-deformation). This paper - http://dx.doi.org/10.1016/j.neuroimage.2012.06.081 - indicates that best practice is to calculate the deformation as a pre-processing step before calculating the tensor, and importantly to scale the pre-processed images by the Jacobian determinants to correct for 'signal pile-up'. Am I correct in thinking that antsApplyTransforms does NOT scale by the Jacobian? In which case I think the pipeline should look like:

  1. Extract a b=0 image from my diffusion dataset
  2. Register to structural image with restrict-deformation ~1x0.1x0.1
  3. Calculate Jacobian with CreateJacobianDeterminantImage on the Inverse warp
  4. Apply the forward transformation to all diffusion images
  5. Multiply all diffusion images by the Jacobian
  6. Calculate my tensor + FA + MD etc...

Note that I do not have to worry about subject motion (ex-vivo samples).

My question is do I have steps 3 & 5 the correct way round - i.e. should I be using the Inverse warp & multiplying? Or should it be division, and/or the forward warp?

Hope that makes sense, and if I've missed an example that covers this just point me to it. Thanks, Toby

— Reply to this email directly or view it on GitHub https://github.com/stnava/ANTs/issues/217.

cookpa commented 9 years ago

Hi,

When using the pipeline steps outlined below, the Jacobian is the same for all of the DWI volumes, and hence the intensity correction would also be constant, and would have no effect on the diffusion tensor calculation.

The Jacobian scaling is usually applied when correcting for eddy-current distortions. Often this is done by registering each DWI to the b=0 image, or to a T2 image. The distortion will differ across the DWI volumes, which makes the Jacobian correction necessary.

As Brian says, you can't recover details when there is a severe signal pileup, but if there is a small change in volume that retains the features of the image, the Jacobian correction can help.

On Aug 8, 2015, at 11:41 AM, stnava notifications@github.com wrote:

hi toby

antsApplyTransforms will not scale by the jacobian. you should calculate the jacobian of the mapping that is in the space of the structural image. if the t1 is the fixed image, then this is the forward transformation. then you would divide the signal intensity (voxel-wise) by the jacobian.

note: a possible problem with this solution is that there is true loss of information in the "signal pile up" which cannot be corrected.

brian

On Thu, Aug 6, 2015 at 1:59 AM, Tobias Wood notifications@github.com wrote:

Hello, I'm trying to correct for EPI distortions in diffusion data (hence my earlier question about restrict-deformation). This paper - http://dx.doi.org/10.1016/j.neuroimage.2012.06.081 - indicates that best practice is to calculate the deformation as a pre-processing step before calculating the tensor, and importantly to scale the pre-processed images by the Jacobian determinants to correct for 'signal pile-up'. Am I correct in thinking that antsApplyTransforms does NOT scale by the Jacobian? In which case I think the pipeline should look like:

  1. Extract a b=0 image from my diffusion dataset
  2. Register to structural image with restrict-deformation ~1x0.1x0.1
  3. Calculate Jacobian with CreateJacobianDeterminantImage on the Inverse warp
  4. Apply the forward transformation to all diffusion images
  5. Multiply all diffusion images by the Jacobian
  6. Calculate my tensor + FA + MD etc...

Note that I do not have to worry about subject motion (ex-vivo samples).

My question is do I have steps 3 & 5 the correct way round - i.e. should I be using the Inverse warp & multiplying? Or should it be division, and/or the forward warp?

Hope that makes sense, and if I've missed an example that covers this just point me to it. Thanks, Toby

— Reply to this email directly or view it on GitHub https://github.com/stnava/ANTs/issues/217.

— Reply to this email directly or view it on GitHub.

spinicist commented 9 years ago

Ah! Thanks Phillip, I had missed that the scaling was to correct for differences in eddy-currents between the b values.

In this case the more pressing problem is large EPI distortions in all the diffusion images, which may be too severe to recover with a non-linear registration. If I get a chance this week I will try to put an example image up somewhere and if anybody has time and is kind enough to have a try themselves I am open to suggestions.

Thanks both, Toby

stnava commented 8 years ago

closing due to lack of activity/interest.

dbergeba commented 6 years ago

Hi, I know this is an old threat, but if someone is still active I do appreciate: In a very similar procedure, I am mutiplying the gradients by the Jacobian from the transformation, however my question is: Should I mutiply by the Jacobian of the forward transformation, or the Jacobian of the inverse transformation (I guess that would be similar to dividing by the Jacobian)?

Thanks!