ANTsX / ANTs

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

Trying to get a 4D template I get a 3D one using buildtemplateparallel.sh #944

Open urrand opened 4 years ago

urrand commented 4 years ago

I am trying to build a 4D template from three 4D volumes using builtemplateparallel.sh. It keeps giving me as an output a 3D template because it seems to be reading the input images as 3D.

${ANTSPATH}/buildtemplateparallel.sh -d 4 -c 5 -m 100x100x0x0 -n 0 -o tmp_ -r 1 -s MI -i 1 -t SY time_c*.nii.gz

Here is the link to the material

https://drive.google.com/drive/folders/1OYqnA-fN59M0yj4hdxKdtAcyLYEC3vM9?usp=sharing

Why don't I get a 4D template from this command?

Running on Ubuntu 16.04.6 and ANTs 2.2.0

Thank you for your help!

urrand commented 4 years ago

Now the drive is publicly accessible. Sorry for the inconvenience!

ntustison commented 4 years ago

Can you please try antsMultivariateTemplateConstruction.sh and antsMultivariateTemplateConstruction2.sh? Both of those are meant as replacements for btp.sh.

urrand commented 4 years ago

I actually first tried with antsMultivariateTemplateConstruction2.sh (I used it before for 3D template construction) but I got the same issue, that's why I passed to btp...

urrand commented 4 years ago

4Dtmp.txt

This is the output using antsMultivariateTemplateConstruction2.sh

ntustison commented 4 years ago

I can work on this but you're going to need to put together a much smaller example.

urrand commented 4 years ago

Ok here are the reduced size volumes! Thank you!

time1_c2.nii.gz time1_c1.nii.gz time1_c3.nii.gz

ntustison commented 4 years ago

Okay, I took a look at all the scripts and their history and I don't believe that this functionality has been operable for awhile, at least. I could work on a fix but I have other to-do items that I would definitely prioritize over this. If I were you, I would hack it myself---simply extract each time point volume from each image and create multiple template volumes which you can then stitch back together.