brainlife / app-freesurfer

Freesurfer segments the t1w anatomical data into functionally different parts of the brain. Segmentation/parcellation can then be fed to many other subsequent analysis.
https://doi.org/10.25663/bl.app.0
8 stars 4 forks source link

multiple t1 and t2 inputs #7

Open bacaron opened 2 years ago

bacaron commented 2 years ago

Hello,

I was wondering if we could start taking advantage of Freesurfer's capabilities to take in multiple T1s at once.

Basically the recon-all command just becomes recon-all -i first_t1 -i second_t1 -T2 t2 or something similar.

Would this be possible?

Maybe a function like 'if multiple T1s, recon-all command line is this; else this'?

Happy to make a PR and get this started.

Brad

soichih commented 2 years ago

Will the multiple input mode also output multiple output? Right now, we don't have the capability to output multiple freesurfer outputs, but that might be the biggest challenge.

bacaron commented 2 years ago

Oh no it should only produce one freesurfer output. However it can take in multiple T1s, align and average them, and then use that to generate everything.

For example, for my concussion project I collected 3 T1ws per participant. I would like to be able to use all three in a singular run of Freeesurfer.

soichih commented 2 years ago

Ah ok. Yeah, that should be easy then. app-freesurfer-longitudinal app that I recently worked on basically runs in that mode (https://github.com/brainlife/app-freesurfer-longitudinal/blob/main/base.sh) In your case, I think it could be much simpler?

One issue that I still need to solve is how we handle multiple inputs in the pipeline rule. Right now, pipeline rule can't handle multiple input... but with the recent changes I made, I think I am pretty close to be able to implement this with out too much difficulty.

bacaron commented 2 years ago

Yeah I was looking into that app to see how you handled it. Was going to make a PR but ran out of time. Can send one tomorrow or Monday.

But oh yeah I forgot about this. We can obviously hold off on implementing the change on the app until the update to allow multiple inputs is ready to go. Or we can just make a temporary app the allows for multiple inputs on the meanwhile. No real rush on my end though!