Closed jeremie-fouquet closed 1 month ago
After reviewing the code, it looks like quite a few of the options in (twolevel_)commonspace_resample.sh are named based on an individual -> common space direction (e.g., prepend-transforms
, append-transforms
, target-space
).
I think it might be simpler to create two new functions, for instance with names (twolevel_)reverse_commonspace_resample.sh
, instead of trying to accommodate the two directions in a single instance of the functions.
@gdevenyi , what do you think?
I think target-space
subject
or input
is a good choice here, and careful re-wording of prepend-transforms
and append-transforms
to indicate where they go in the the stack rather than describing a direction per-se solves the problem.
In the end, I found it difficult to implement the options I wanted for the "reverse" direction (commonspace -> subjectspace) without importantly modifying several parts of (twolevel_)commonspace_resample.sh
. Hence, as a first try, I created two new functions: subjectspace_resample.sh
and twolevel_subjectspace_resample.sh
.
I hope it helps to lay out the code needed. I'm happy to work on merging the two directions if required.
Also, I only tested the new functions on our MPM twolevel data set. Are there other tests I should perform?
Please open a PR to discuss the code :+1:
Add the possibility of transforming volumes from the common space to the individual spaces. It can be useful, for instance, to propagate a mask from the common space to all the individual spaces.