Skip to content
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

Registering a floating quantitative map to a T1 image by ANTs? #994

Closed
tina-ebi opened this issue Apr 19, 2020 · 19 comments
Closed

Registering a floating quantitative map to a T1 image by ANTs? #994

tina-ebi opened this issue Apr 19, 2020 · 19 comments

Comments

@tina-ebi
Copy link

Hi there,
I would like to register a quantitative floating 3D map to a structural T1W template. But at every iteration, it gives so many warnings. finally, the result of registration is not good. Could you please help me to do the correct registration of a quantitative map to T1 image? (I should mention that I could register two structural T1 images very well. But once, I closed terminal page while it was running. After that time, I receive these many WARNINGs during the running of antsregistration.sh command.)
Thanks for any comment.

error_running2
register_result

@ntustison
Copy link
Member

Please post the data and the commands that you used to perform your registration.

@tina-ebi
Copy link
Author

Hi Nick,
I have attached my data and command. But I cannot attached t1template.nii because of its high volume.
Thanks again.
command.txt
OEF.zip
mask.zip

@ntustison
Copy link
Member

Because you are a novice user, you should use antsRegistrationSyN.sh or antsRegistrationSyNQuick.sh. Try doing

$ antsRegistrationSyNQuick.sh -d 3 -f t1template.nii -m OEF.nii -o registered1

The antsApplyTransforms call will be the same.

@cookpa
Copy link
Member

cookpa commented Apr 20, 2020

What is this quantitative image? From which image is it derived?

@tina-ebi
Copy link
Author

Thank you, Nick. I will try those commands.
Mr. Philip, my data is Oxygen Extraction Fraction (OEF) map. I've derived it from Quantitative Susceptibility Mapping (QSM) images. By using the magnitude and phase images of SWI sequence, It is possible to obtain QSM.

@cookpa
Copy link
Member

cookpa commented Apr 21, 2020

OK. You want to use an image with similar anatomical features to do the registration. You can then apply the warps to any other image that is in the same physical space as the image used for registration. For example,

antsRegistrationSyNQuick.sh -d 3 -f t1template.nii -m SWI.nii -o swiToTemplate

IF this registration works, you can do

antsApplyTransforms -d 3 -r t1template.nii -i OEM.nii -o oemDeformed.nii -t swiToTemplate1Warp.nii.gz -t swiToTemplate0GenericAffine.mat -v 1

I'm assuming here that SWI is in the same space as OEM.

@tina-ebi
Copy link
Author

Thank you very much, Nick and Philip. I could register my quantitative images very well. Your recommendation worked very well. I need to do BET for my T1 and SWI-magnitude images for better registration by ANTs. Is it possible to do brain extraction by ANTs?

@ntustison
Copy link
Member

Yes, here is a link to an example that you should try to run before running it on your data.

@tina-ebi
Copy link
Author

Dear Nick,
According to your recommendation, I tried to run antsBrainExtraction.sh in that link you sent (for 2D data) and fortunately, I could run it. But when I run that command for my 3D data by using 3D IXI templates (T_template0.nii and also T_template2.nii), the command gets to run but several minutes after the onset of running, I receive an error. Also, some files in output appear as well, but none of them is BETbrain. Could you please tell me what something wrong I have done?
Thank you.

BETcommand
output file

ANTS_BET

@ntustison
Copy link
Member

@cookpa would probably know better than I but given the "VirtualBox" environment, my guess is that you ran past memory limits and so your job was killed.

@dorianps
Copy link
Collaborator

dorianps commented Apr 23, 2020 via email

@gdevenyi
Copy link
Contributor

I have some benchmarking here https://github.com/gdevenyi/antsRegistration-benchmarking

@tina-ebi
Copy link
Author

Dear ANTs experts,
I have increased memory of VirtualBox machine up to 7GB and then run antsBrainExtraction.sh again. But I still receive an error without the creating any BETbrain image. That error contains this tens:

file /home/tinaeb/Desktop/BETANTs//Template/T_template2ProbabilityMask.nii.gz does not exist .
How can I get -m parameter in antsBrainExtraction.sh command? Also, how can I chose best 3D template for -e parameter?

output2

BETerror2

@ntustison
Copy link
Member

Where did you get the IXI templates?

@tina-ebi
Copy link
Author

you have introduced link below in issue #1:
https://figshare.com/articles/ANTs_ANTsR_Brain_Templates/915436
I got IXI.zip there.

@ntustison
Copy link
Member

Okay, the missing file should be in there.

@tina-ebi
Copy link
Author

Dear Nick,
You were right. For fixing the error, I just should have added that missing file to the path of Template. I thank you very much. But brain extraction of my data is not as good as ANTs data. Do you have any suggestion to doing better brain extraction (I mean to remove intervals of brain tissue and skull)?
Thank you very much for your helpful guide.

command

BrainExtraction

@ntustison
Copy link
Member

Perhaps you should look at FreeSurfer which tends to produce brain masks with tighter boundaries.

@tina-ebi
Copy link
Author

Dear Philip,
I could solve most of my problems with ANTs experts's help. I could register my OEF map by antsRegistratuinSyNQuick.sh command but not very well. Because when I analyze my map, the standard deviation of ROI is very high. This is because of not being good registration of OEF map and T1-structural brain. I decided to run your suggest in previous posts (first register SWI and T1, then apply transformation matrix on quantitative map). But result got worse. Could you please help me with finding the causes this problem?
Thank you.

OnlyantsQuick

Quick_plus_antstransform

@cookpa cookpa closed this as completed Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants