-
-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warp and reorient a diffusion tensor image issue with "large" affine transformation, looking for help/confirmation #1137
Comments
Thank you @valeryozenne. I simplified further using only the affine transform
The results show clearly that the reorientation is different depending on whether the input is an Affine or Warp field. @ntustison @jeffduda I think there might be a serious problem with https://upenn.box.com/s/p5z05nnmolzi8sw9i4lg5slrm5xdw1dv for testing (enough to run my script above). |
I had tested for this issue in my orientation tests here https://github.com/cookpa/antsDTOrientationTests But it's possible that I didn't have the right combination of direction cosines / data transforms to see the problem. |
I re-ran the brain data tests from my repo above. I can't see any divergence between transforms stored as warp fields and those stored as matrices. I've noticed some differences between my brain tests and Valery's data, but I don't know if any of them are significant:
|
Hi Philip , Thanks for your input. There is something I'm not sure to fully understand. I'm writing my understanding below to be sure.
Please don't hesite to indicate if I can do something ? About the three points you mentionned, please find some comments (not sure it can help you) :
|
That looks to be the case for me. The results look quite different when calling
Right, essentially the same idea as above, but yes.
It costs space and might be theoretically worse because it is less precise and cannot be inverted analytically. That's why we don't normally do it, and I would tolerate small differences in the results from doing that. But there should not be large differences.
It's not in ANTs, but in ITK-SNAP, which follows NIFTI convention. http://www.itksnap.org/pmwiki/pmwiki.php?n=Documentation.DirectionMatrices But I tried converting to RPI last night and it didn't seem to help.
This is puzzling, but helpful to know. |
Also yes, you can run rigid then deformable registration if you want. I often do this for nonlinear correction of intra-subject images, where there is not necessarily an affine component to the deformation. |
Trying the same code for dt1 and dt2. The dt2 results don't look as different, but it might be because the rotation in the transform is smaller. I also tried padding the dt1 images to rule out boundary problems. It doesn't change the results. My concern is that the method for extracting the local rotation from warp fields is not very good at capturing large rotations, and that is why the results for dt 1 look bad when the transforms are concatenated into a single warp. |
Hi ANTs experts,
All data and scripts to reproduce the results is available at this link:
https://filesender.renater.fr/?s=download&token=491f1769-c437-426b-b210-51f2d65a0bf2
Data were down sampled to lower resolution to reduce the size of the files.
Methods
I have been using ANTs for some months for reorienting tensors. I'm really happy to use it. The wikipage was really useful.
https://github.com/ANTsX/ANTs/wiki/Warp-and-reorient-a-diffusion-tensor-image
I still have one surprising result when combining transformations (affine + warp) in some cases (when the affine transformation is significant). I wonder if you could have a look.
I try to simplify as much the script, and to follow the convention and naming of the documentation : the script either apply on tensor images
I have N datasets, here I shared only 2, (see the results below)
I'm suspecting either a mistake from my side or something related to the transformation itself, the affine transform make a significant shift. At the beginning, I also suspect the reference (fixed.nii.gz), or the physical space but the result is accurate if I apply transformations step by step.
Would it be possible the process, applyTransform + ReorientTensorImage uisng compose transform doesn't work for some specific tranformations ?
My full script (not include here) include Rigid + Affine + Warp , leading to 3 interpolation in step by step mode to get the correct orientation, I wish to do it in one step using compose transform .
Thanks in advance for your help.
Valéry
Results
I'm looking at the fiber orientation in the intraventricular septum, anatomy is simple, there are two distincts layers (in blue) fibers going up/down and (in green) fibers that are parallel to the tangent of the surface in the short axis view (transverse view).

For dataset 2 , comparison of COMPOSE MODE is similar to STEP BY STEP MODE, the difference is due to the fact that interpolation is done twice.

For dataset 1, COMPOSE MODE mode is wrong , while the STEP BY STEP MODE is accurate.

Figure were made with MRtrix as I don't know how to plot them in itksnap.
Tensor images conversion from 4D to 5D format and 5D to 4D format has been carefully checked (in a previous post, thanks to Philip Cook) and then used in multiple datasets, acquisitions & samples and can be considered as valid.
The text was updated successfully, but these errors were encountered: