ANTsX / ANTs

Advanced Normalization Tools (ANTs)
Apache License 2.0
1.21k stars 381 forks source link

antsJointFusion vs antsJointLabelFusion #922

Closed whinds closed 4 years ago

whinds commented 4 years ago

I would like to use the updated function antsJointLabelFusion, but my installation only came with the old deprecated antsJointFusion. Here is the version information:

antsJointFusion --version ANTs Version: 3.0.0.0.dev122-g65096 Compiled: Sep 25 2019 14:49:39

installed on Ubuntu 18.04 with terminal command 'sudo apt-get install ants'

ntustison commented 4 years ago

antsJointLabelFusion.sh is a wrapper script for the antsJointFusion program.

whinds commented 4 years ago

Thanks for the reply! sorry for my ignorance.

Is antsJointLabelFusion2.sh also a wrapper script then? There are flags such as -q which I would like to try from anstJointLabelFusion, however these flags are not included as options in the anstJointFusion function I have. Have they been left out on purpose?

whinds commented 4 years ago

I'm a bit confused because in this previous issue: https://github.com/ANTsX/ANTs/issues/282 You said the opposite, that antsJointLabelFusion is the updated script...

ntustison commented 4 years ago

Is antsJointLabelFusion2.sh also a wrapper script then?

Yes, but more experimental. For your purposes, completely disregard antsJointLabelFusion2.sh.

There are flags such as -q which I would like to try from anstJointLabelFusion, however these flags are not included as options in the anstJointFusion function I have. Have they been left out on purpose?

You're misunderstanding the relationship between antsJointFusion and antsJointLabelFusion.sh. Let's take a step back so that we can tease this out. antsJointFusion is the C++ program used to perform the joint label fusion algorithm. However, and this is important, the input atlas sets to antsJointFusion are assumed to be pre-aligned. However, typical usage requires a normalization of all atlases to the target image before such assumptions are met. This is why we wrote the wrapper script antsJointLabelFusion.sh to wrap both the normalization step and the joint label fusion step while making cluster usage available. So nothing is getting "left out."

I'm a bit confused because in this previous issue: #282. You said the opposite, that antsJointLabelFusion is the updated script...

You're misreading what was discussed. The original issue concerned an ITK issue that was popping up while using antsJointLabelFusion.sh. We addressed it and updated the script so I was pointing out that the user should try the updated script.

whinds commented 4 years ago

Thank you so much for the extra explanations! The tools created by ANTs team are a great contribution to the community.

I've had two successful segmentations performed with the antsJointFusion, and interestingly, the inputs were NOT "pre-aligned". There were n=30 atlas/template pairs in their native space used as input, but none had been normalized to the target, as I assumed this step was included in the script..

Upon then trying antsJointFusion with a different dataset, the result was not good, and hence I began exploring the usage of antsJointLabelFusion.sh

Any idea why the first two attempts worked so well without first being pre-aligned? In antsJointFusion's help documentation it says "The target image (or multimodal target images) assumed to be aligned to a common image domain." This was not clear that the brains had to be first normalized to each other, so I thought being aligned in this context mean in the common image space was enough, as the script would perform the normalizations automatically. After re-reading both functions, I see that antsJointLabelFusion.sh includes this description "Atlas to be warped to target image" for the -g arguments. Please forgive my mixup of the two.

For the new dataset, I will try normalizing to the target image first to see if that improves the result. I will also go back and re-run the first two with normalized atlas/template to see if that changes the results, but by eye they looked great already.

Thanks again!

ntustison commented 4 years ago

Any idea why the first two attempts worked so well without first being pre-aligned?

Just coincidence/luck.