Advice on antsMultivariateTemplateConstruction2 #1609
Replies: 8 comments 4 replies
-
My first guess would be that your transform model is too stiff. Without explicit specification, the B-spline SyN parameters default to human brain parameters. Try switching to |
Beta Was this translation helpful? Give feedback.
-
Some users have noticed (with ANTs and other tools) that very small image spacing can affect performance, sometimes these are the result of decisions embedded pretty deep in the underlying algorithms. Temporarily changing the image spacing to be ~ 1mm can help (#1540) However, if it works well when given an individual reference image, the problem might be a local minimum caused by a low-quality initialization. If initialized from an initial reference image, the template will be biased as you say, but it should converge towards an unbiased solution after many iterations (-i). Alternatively, you could try to create a better starting average by running a template with a restricted transform. For example, use |
Beta Was this translation helpful? Give feedback.
-
For a tool with a number of quality-of-life additions to smooth the rough edges of antsMultivariateTemplateConstruction2.sh, take a look at https://github.com/CoBrALab/optimized_antsMultivariateTemplateConstruction |
Beta Was this translation helpful? Give feedback.
-
Thank you all for these ideas! I tested an affine registration. It actually looks blurrier than what I was previously getting with the template construction. I'll try switching to Syn next. I do use Syn in antsRegistrationSyN so fingers crossed that works. I'll also take a look at optimized_antsMultivariateTemplateConstruction |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Yes, I was wondering if this comes down to a sharper reference image to work with. Totally understand it is hard to diagnose with this level of description. The next thing I'll try is the optimized_antsMultivariateTemplateConstruction script. If that fails, I'll put a couple brains in a dropbox folder with the inputs I used to share. I don't want to bother you with that until I've exhausted the options on my end. Thanks! |
Beta Was this translation helpful? Give feedback.
-
personally -I dont think it's a big deal to start with a single subject as reference. the scripts "debias" the images anyway, esp after several iterations. I would just go with that approach .... |
Beta Was this translation helpful? Give feedback.
-
Just wanted to follow up on this and say that starting with a single good brain as a reference and tweaking the antsMultivariateTemplateConstruction2 parameters to be in line with what I used in antsRegistrationSyN registration worked! The resulting template is crisp. Each subject looks well aligned and the template doesn't look to be biased in shape to the reference. Thanks so much for all of these suggestions! |
Beta Was this translation helpful? Give feedback.
-
Hi!
I'm trying to create a T2 template of 12 subjects. I've run antsMultivariateTemplateConstruction2.sh a couple times (iterating on the prior output) and the template0.nii.gz output doesn't look ideal - there are multiple "shadows" of each individual T2 indicating that the gross shape of the brains are not aligning well. I'm wondering if I'm running the function sub-optimally or maybe not running enough iterations. When I run antsRegistrationSyN.sh to co-register these individual images, they are spot-on. My subjects are rat-sized brains so I'm not dealing with high variability in folding.
For the template construction, the T2s are skull-stripped, N4 bias field corrected brains that have been rigidly aligned (if I don't do rigid alignment then the output template is severely clipped).
This is what I ran:
antsMultivariateTemplateConstruction2.sh -d 3 -j 4 -i 4 -n 0 -k 1 -f 4x2x1 -r 1 -s 2x1x0vox -q 30x20x4 -t BSplineSyN -m CC -c 0 -o ShrewTemplate *corrected_brain.nii.gz
I get fantastic registration for any two of my animals if I just run: antsRegistrationSyN.sh -f shrew1.nii.gz -m shrew2.nii.gz -d 3 -o shrew2_to_shrew1 -n 4
Also, if I run antsMultivariateTemplateConstruction2.sh where I define a starting template as the average of all my T2s that have been individually co-registered, then the resulting template is great. Of course, this is not ideal since it will have some degree of bias towards the original reference brain.
Other potentially relevant information: these data are 50um^3.
Any advice would be MUCH appreciated!
Thanks!
Mike
Beta Was this translation helpful? Give feedback.
All reactions