mwaskom / lyman

Data pipelines and analysis library for functional MRI
http://www.cns.nyu.edu/~mwaskom/software/lyman
BSD 3-Clause "New" or "Revised" License
53 stars 22 forks source link

Plans for changes to lyman registration #91

Closed mwaskom closed 7 years ago

mwaskom commented 7 years ago

The purpose of this issue is to plan out some changes to lyman.

The main objective will be to change the order of operations related to registration to the shared epi space. The goal here is to decrease the need for processing time/space assuming that we will usually be doing things in epi space (or going to the surface), and to decrease the number of resamplings that are performed for epi registration.

Therefore, registration to the common epi space should occur as part of the preprocessing workflow, obviating the need for a -workflow reg -regspace epi run.

The plan will be to use the single frame transformation matrices from mcflirt and combine them with the functional-to-anatomical registration

Probably an ideal thing to do would be to estimate an intermediate common space, instead of using a frame from the first run.

We'll need to think about how complicated to make this, because in principle it might be ideal to do one round of motion correction, register the resulting mean timeseries image to the anatomy, and then go back and apply the combined registration. But this seems a little finicky.

In principle, an unwarping stage should also be combined into this transformation, but I think I would prefer to drop fieldmap unwarping altogether as it is not relevant given the NYU CBI reconstruction pipeline.

This change will have the effect of complicating the post-model outputs, as there will no longer by a symmetry between the two registration spaces (epi/mni) at subsequent steps.

mwaskom commented 7 years ago

Another change that should be done at the same time: move the masks output from the data_dir to the analysis_dir so that they are properly organized by experiment.

mwaskom commented 7 years ago

Also potentially move regexp from a command line argument to a parameter that is defined in the experiment file.

mwaskom commented 7 years ago

And I'd like to change the altmodel nomenclature to model. We could also consider more dramatically organizing the outputs so that model nesting occurs under the subject level, and there is no "default" model other than perhaps a denoising model. This is somewhat less relevant to the changes in how registrations work, (but would be good to fold into changes to the output hierarchy).

mwaskom commented 7 years ago

Probably an ideal thing to do would be to estimate an intermediate common space, instead of using a frame from the first run.

Relevent note is that the FSL binary midtrans can help here.

mwaskom commented 7 years ago

Also should maybe think about allowing a different image to be used for the registration to the anatomy — in the HCP pipelines they use the single-band image because it has better tissue contrast.

mwaskom commented 7 years ago

Maybe as part of this: organize the "space-defining" files more obviously and cache some useful things here, like the cortical ribbon in EPI space.

mwaskom commented 7 years ago

Also while we're at it let's improve the artifact detection — look in the Powers papers.

mwaskom commented 7 years ago

Another idea: make it an option to mask out everything that isn't cortex (conservatively) to facilitate compression of large datasets.

mwaskom commented 7 years ago

Largely closed with #106