-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resample template and save a temporary copy #11
Comments
but data and atlas should not already be on a standardized space (like But what is the actual impact in term of performance between:
It may be actually more "dumb" and always run a registration in any case, which mitigates even more the proposal (overall takes 2 registration instead of one: registered data to atlas -> LabelsMasker -> register but fast because already in atlas space -> timeserie) |
Some clarifications:
I am using some interchangeable jargon without realising it. See this tutorial to explain resampling
No. We are resampling the atlas to the data, not the other way round. It's far more efficient to do it on one file than all the subjects prerpocessed data. By default in nilearn maskers, all the mask and atlas are resampled to match the data, unless specified. Again, we are not doing a full registration here, just resampling.
If we are doing the thing I described, this comparison and comment don't apply. Also, nilearn is not checking the registration, it's only checking if the shape of the atlas matches a volume from the functional data, and if the affine matrix match. |
So resampling is actually two steps: registration and interpolation. |
fyi resampling means that you are changing the sampling rate (here spatial). This is typically done through interpolation. In general the term is used interchangeably, even though strictly speaking a complex transform is not just a change in sampling rate. In fMRI people use the term registration for the estimation of the transformation, which is separate from resampling itself. The reason is that sometimes you will chain multiple transformations and resample once, in order to avoid accumulating interpolation errors. So resampling and registration are often separate functions. |
That's a great explanation! So here's a proposed workflow:
This is not urgent btw, just logging some relevant insight from working on the denoising project |
@pbelled
Just realized that I meant resampling is: transformation (not registration, transformation is already estimated) + interpolation! At least using ITK convention (which is the standard): https://itk.org/ITKExamples/src/Filtering/ImageGrid/ResampleAnImage/Documentation.html.
So I don't get why you want to resample yourself, if nilearn already does it by default ? Will it take less time in total to resample ourself first, then run nilearn. Rather than letting nilearn resample it himself ?
|
A dataset is usually collected with the same protocol, so all the preprocessed data, registered to the same template, with the same shape and affine matrix. If you let nilearn check it itself, it will redo the resampling on the altas every time you run |
Ooooooh I get it now ^^' thanks for the explanation! This could save some time :) |
I recently find out if the atlas and the data are in the same space, it takes a split second for LabelsMasker to run. I think it is worth resampling the template before hand.
The text was updated successfully, but these errors were encountered: